Documentation
¶
Index ¶
- func AcquireVPCPowerLock(ctx context.Context, tx *cdb.Tx, vpcID uuid.UUID) error
- func GetIntPtrToUint32Ptr(i *int) (*uint32, error)
- func ProvisionMachineBatchPower(ctx context.Context, provisioner dpsclient.PowerProvisioner, ...) (func() error, error)
- func ProvisionMachinePower(ctx context.Context, provisioner dpsclient.PowerProvisioner, ...) (func() error, error)
- func StringPtrToPortRangeUint32PtrPair(s *string) (start *uint32, end *uint32, err error)
- func StringToPortRangeUint32PtrPair(s string) (start *uint32, end *uint32, err error)
- func StringToUint32Ptr(s string) (*uint32, error)
- func UpdateMachinePower(ctx context.Context, provisioner dpsclient.PowerProvisioner, ...) (func() error, error)
- type MachinePowerAssignment
- type PowerChange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcquireVPCPowerLock ¶
AcquireVPCPowerLock serializes DPS operations for one VPC transaction.
func GetIntPtrToUint32Ptr ¶
A convenience function for converting a pointer to a native Go integer to a pointer to a uint32 for use with a protobuf message. Accepts a pointer to an int and returns a uint32 pointer.
If the input is nil, nil will be returned. If a pointer to a value greater than uint32 max is submitted, an error will be returned.
func ProvisionMachineBatchPower ¶
func ProvisionMachineBatchPower(ctx context.Context, provisioner dpsclient.PowerProvisioner, resourceGroup string, assignments []MachinePowerAssignment) (func() error, error)
ProvisionMachineBatchPower authorizes and assigns machines to a DPS resource group.
func ProvisionMachinePower ¶
func ProvisionMachinePower(ctx context.Context, provisioner dpsclient.PowerProvisioner, resourceGroup string, assignment MachinePowerAssignment) (func() error, error)
ProvisionMachinePower authorizes and assigns one machine to a DPS resource group.
func StringPtrToPortRangeUint32PtrPair ¶
A convenience function for converting a *string hold a string of the form "<start>-<end>"to a pair of *uint32 representing the start and end of a port range.
Spaces will be stripped automatically. If nil is passed in, the resulting *uint32 values will be nil.
func StringToPortRangeUint32PtrPair ¶
A convenience function for converting a string of the form "<start>-<end>"to a pair of *uint32 representing the start and end of a port range.
Spaces will be stripped automatically.
func StringToUint32Ptr ¶
A convenience function for converting a string to a *uint32 for use with a protobuf message.
func UpdateMachinePower ¶
func UpdateMachinePower(ctx context.Context, provisioner dpsclient.PowerProvisioner, resourceGroup string, assignment MachinePowerAssignment, previousProfile string) (func() error, error)
UpdateMachinePower authorizes and updates one machine's DPS power profile.
Types ¶
type MachinePowerAssignment ¶
MachinePowerAssignment describes one machine's DPS policy assignment.
type PowerChange ¶
type PowerChange struct {
// contains filtered or unexported fields
}
PowerChange contains the compensation and completion actions for a prepared DPS resource-group change.
func PreparePowerResourceGroupChange ¶
func PreparePowerResourceGroupChange(ctx context.Context, provisioner dpsclient.PowerProvisioner, externalID int64, oldGroup, newGroup string, assignments []MachinePowerAssignment) (*PowerChange, error)
PreparePowerResourceGroupChange prepares a VPC's DPS resource-group migration.
func (*PowerChange) Complete ¶
func (change *PowerChange) Complete() error
Complete performs cleanup after a prepared DPS resource-group change commits.
func (*PowerChange) Rollback ¶
func (change *PowerChange) Rollback() error
Rollback compensates a prepared DPS resource-group change.