Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultModelOperatorPort is the default port used for the api server on // the model operator DefaultModelOperatorPort = 17071 )
Variables ¶
This section is empty.
Functions ¶
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold returns a Manifold that encapsulates a Kubernetes model operator.
Types ¶
type ManifoldConfig ¶
type ManifoldConfig struct { // AgentName AgentName string // APICallerName is the name of the api caller dependency to fetch APICallerName string // BrokerName is the name of the api caller dependency to fetch BrokerName string // Logger to use in this worker Logger logger.Logger ModelUUID string }
ManifoldConfig describes the resources used by the CAASModelOperatorWorker
func (ManifoldConfig) Start ¶
func (m ManifoldConfig) Start(context context.Context, getter dependency.Getter) (worker.Worker, error)
Start is used to start the manifold an extract a worker from the supplied configuration
func (ManifoldConfig) Validate ¶
func (m ManifoldConfig) Validate() error
Validate checks all the config fields are valid for the Manifold to start
type ModelOperatorAPI ¶
type ModelOperatorAPI interface { SetPassword(ctx context.Context, password string) error ModelOperatorProvisioningInfo(context.Context) (caasmodeloperator.ModelOperatorProvisioningInfo, error) WatchModelOperatorProvisioningInfo(context.Context) (watcher.NotifyWatcher, error) }
type ModelOperatorBroker ¶
type ModelOperatorBroker interface { EnsureModelOperator(context.Context, string, string, *caas.ModelOperatorConfig) error ModelOperator(ctx context.Context) (*caas.ModelOperatorConfig, error) ModelOperatorExists(ctx context.Context) (bool, error) }
ModelOperatorBroker describes the caas broker interface needed for installing a ModelOperator into Kubernetes
type ModelOperatorManager ¶
type ModelOperatorManager struct {
// contains filtered or unexported fields
}
ModelOperatorManager defines the worker used for managing model operators in caas
func NewModelOperatorManager ¶
func NewModelOperatorManager( logger logger.Logger, api ModelOperatorAPI, broker ModelOperatorBroker, modelUUID string, agentConfig agent.Config, ) (*ModelOperatorManager, error)
NewModelOperatorManager constructs a new model operator manager worker
func (*ModelOperatorManager) Kill ¶
func (m *ModelOperatorManager) Kill()
Kill implements worker kill method
func (*ModelOperatorManager) Wait ¶
func (m *ModelOperatorManager) Wait() error
Wait implements worker Wait method
Click to show internal directories.
Click to hide internal directories.