Documentation ¶
Index ¶
Constants ¶
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 Logger ¶
type Logger interface {
Debugf(string, ...interface{})
}
Logger is the interface this work requires for logging.
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 ModelUUID string }
ManifoldConfig describes the resources used by the CAASModelOperatorWorker
func (ManifoldConfig) Start ¶
func (m ManifoldConfig) Start(context dependency.Context) (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(password string) error ModelOperatorProvisioningInfo() (caasmodeloperator.ModelOperatorProvisioningInfo, error) }
type ModelOperatorBroker ¶
type ModelOperatorBroker interface { EnsureModelOperator(string, string, *caas.ModelOperatorConfig) error ModelOperator() (*caas.ModelOperatorConfig, error) ModelOperatorExists() (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, 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