Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustRegister ¶
func MustRegister(provider string, deployerConstructor AssetDeployerConstructor)
MustRegister will mustRegister a deployer constructor corresponding to the provider to the list. The provider should be a globally unique human-readable identifier which will be used as Asset.Provider and the value of 'cloud-providers[i].provider' in profile. e.g. TencentCloud
All Deployer must call this function in init function to mustRegister itself.
Types ¶
type DeployError ¶
func NewDeployError ¶
func NewDeployError(asset asset.Asseter, err error) *DeployError
func (*DeployError) Error ¶
func (d *DeployError) Error() string
type Deployer ¶
type Deployer interface {
// Deploy the given pem cert to the all assets.
//
// Returns assets that were successfully deployed and errors. Please note that there is no
// guarantee that len(deployedAsseters)+len(deployErrs)=len(assets), because some minor
// problems do not count as errors, such as provider mismatch.
Deploy(assets []asset.Asseter, cert []byte, key []byte) (deployedAsseters []asset.Asseter,
deployErrs []*DeployError)
}
type UnionDeployer ¶
type UnionDeployer struct {
// contains filtered or unexported fields
}
UnionDeployer will not be registered to the list. Instead, it is responsible for instantiating registered deployers based on configuration and call each of them.
The main program usually wants to use this structure to perform the operation.
func NewUnionDeployer ¶
func NewUnionDeployer(logger *zap.SugaredLogger, providersConfig []config.CloudProvider) *UnionDeployer
Click to show internal directories.
Click to hide internal directories.