Documentation ¶
Index ¶
- Constants
- Variables
- func NewConfigCtor(configID string, f controller.Factory) config.Constructor
- type ConfigCtor
- type Resolver
- func (r *Resolver) AddFactory(factory controller.Factory)
- func (r *Resolver) GetConfigCtorByID(ctx context.Context, id string) (config.Constructor, error)
- func (r *Resolver) GetFactoryMatchingConfig(ctx context.Context, c config.Config) (controller.Factory, error)
- func (r *Resolver) GetResolverID() string
- func (r *Resolver) GetResolverVersion() semver.Version
Constants ¶
const ResolverID = "static"
ResolverID is the resolver identifier.
Variables ¶
var Version = semver.MustParse("0.0.1")
Version is the resolver version.
Functions ¶
func NewConfigCtor ¶
func NewConfigCtor(configID string, f controller.Factory) config.Constructor
NewConfigCtor builds a new configuration constructor.
Types ¶
type ConfigCtor ¶
type ConfigCtor struct {
// contains filtered or unexported fields
}
ConfigCtor implements config.Constructor
func (*ConfigCtor) ConstructConfig ¶
func (c *ConfigCtor) ConstructConfig() config.Config
ConstructConfig constructs a new configuration object.
func (*ConfigCtor) GetConfigID ¶
func (c *ConfigCtor) GetConfigID() string
GetConfigID returns the unique string for this configuration type.
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver implements the controller resolver using a list of built-in controller implementations.
func NewResolver ¶
func NewResolver(factories ...controller.Factory) *Resolver
NewResolver constructs a new resolver.
func (*Resolver) AddFactory ¶
func (r *Resolver) AddFactory(factory controller.Factory)
AddFactory adds a factory to the resolver.
func (*Resolver) GetConfigCtorByID ¶
GetConfigCtorByID returns a config constructor matching the ID. If none found, return nil, nil
func (*Resolver) GetFactoryMatchingConfig ¶
func (r *Resolver) GetFactoryMatchingConfig( ctx context.Context, c config.Config, ) (controller.Factory, error)
GetFactoryMatchingConfig returns the factory that matches the config. If no factory is found, return nil. If an unexpected error occurs, return it.
func (*Resolver) GetResolverID ¶
GetResolverID returns the resolver identifier.
func (*Resolver) GetResolverVersion ¶
GetResolverVersion returns the resolver version.