Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProviderRunner ¶
func ProviderRunner[T any](providerFactory ProviderFactory, namespace string) func(context.Context) (T, error)
ProviderRunner returns the ProviderGetter function for a given generic type. If the returned provider is not of the expected type, a not supported error will be returned.
Types ¶
type Provider ¶
type Provider interface { // InstancePrechecker provides a means of "prechecking" placement // arguments before recording them in state. environs.InstancePrechecker // BootstrapEnviron defines methods for bootstrapping a controller. environs.BootstrapEnviron // ResourceAdopter defines methods for adopting resources. environs.ResourceAdopter }
Provider in the intersection of a environs.Environ and a caas.Broker.
We ideally don't want to import the environs package here, but I've not sure how to avoid it.
type ProviderFactory ¶
type ProviderFactory interface { // ProviderForModel returns the encapsulated provider for a given model // namespace. It will continue to be updated in the background for as long // as the Worker continues to run. If the worker is not a singular worker, // then an error will be returned. ProviderForModel(ctx context.Context, namespace string) (Provider, error) }
ProviderFactory is an interface that provides a way to get a provider for a given model namespace. It will continue to be updated in the background for as long as the Worker continues to run.
Click to show internal directories.
Click to hide internal directories.