Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DeployerInterface ¶
type DeployerInterface interface {
// RegisterFeatureID allows registering a feature ID.
// If a featureID is already registered, it returns an error.
RegisterFeatureID(
featureID string,
) error
// Deploy creates a request to deploy a feature in a given
// CAPI cluster (identified by clusterNamespace, clusterName).
// When worker is available to fulfill such request, RequestHandler
// will be invoked in the worker context.
// If featureID is not registered, an error will be returned.
// Applicant is an identifier of whatever is making this request.
// It can be left empty (in case there is no need to differentiate between
// different applicants).
Deploy(
ctx context.Context,
clusterNamespace, clusterName, applicant, featureID string,
f RequestHandler,
) error
// GetResult returns result for a given request.
GetResult(
ctx context.Context,
clusterNamespace, clusterName, applicant, featureID string,
) Result
}
type RequestHandler ¶
type Result ¶
type Result struct {
ResultStatus
Err error
}
type ResultStatus ¶
type ResultStatus int64
const ( Deployed ResultStatus = iota InProgress Failed )
func (ResultStatus) String ¶
func (r ResultStatus) String() string
Click to show internal directories.
Click to hide internal directories.