Interface ServerContext.ProviderRateCardFactory

Enclosing class:
ServerContext
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ServerContext.ProviderRateCardFactory
Creates the live pricing adapter for a provider. Replaceable for tests (canned or failing cards) and for embedders with custom pricing endpoints. Invoked at most once per provider per context - ServerContext.providerRateCard(CloudProviderType) caches the result.
  • Method Details

    • create

      Optional<RateCard> create(CloudProviderType provider, ServerContext context)
      Parameters:
      provider - the cloud provider to price against
      context - the owning context (for environment lookups)
      Returns:
      the adapter, or empty when none is available