Documentation ¶
Index ¶
- type Provider
- type Service
- func (s *Service) ContainerConfig(ctx context.Context) (container.Config, error)
- func (s *Service) ContainerManagerConfigForType(ctx context.Context, containerType instance.ContainerType) (containermanager.Config, error)
- func (s *Service) ContainerNetworkingMethod(ctx context.Context) (containermanager.NetworkingMethod, error)
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider interface { // SupportsContainerAddresses returns true if the provider is able to // allocate addresses for containers. It may return false or an // [errors.NotSupported] if container addresses are not supported. SupportsContainerAddresses(ctx envcontext.ProviderCallContext) (bool, error) }
Provider represents an underlying cloud provider.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is an agent provisioner service that can be used by the provisioner to retrieve container configuration for provisioning.
func NewService ¶
func NewService( st State, providerGetter providertracker.ProviderGetter[Provider], ) *Service
NewService returns a new agent provisioner service.
func (*Service) ContainerConfig ¶
ContainerConfig returns the container config for the model.
func (*Service) ContainerManagerConfigForType ¶
func (s *Service) ContainerManagerConfigForType( ctx context.Context, containerType instance.ContainerType, ) (containermanager.Config, error)
ContainerManagerConfigForType returns the container manager config for the given container type.
func (*Service) ContainerNetworkingMethod ¶
func (s *Service) ContainerNetworkingMethod(ctx context.Context) (containermanager.NetworkingMethod, error)
ContainerNetworkingMethod determines the container networking method that should be used, based on the model config key "container-networking-method" and the current provider.
type State ¶
type State interface { // GetModelConfigKeyValues returns a model config object populated with // values for the provided keys. GetModelConfigKeyValues(context.Context, ...string) (map[string]string, error) // ModelID returns the UUID of the current model. ModelID(ctx context.Context) (model.UUID, error) }
State provides the service with access to controller/model config.