Documentation ¶
Index ¶
- Variables
- func ErrIsInvalidArgument(err error) bool
- func ErrIsMultiVolumes(err error) bool
- func ErrIsNotFound(err error) bool
- func InitLog()
- type Auth
- type AuthMode
- type BOSService
- type Billing
- type CDSVolume
- type CDSVolumeService
- type CreateCDSVolumeArgs
- type MetaDataService
- type Node
- type NodeService
- type Reservation
- type ResizeCSDVolumeArgs
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyInstanceID = errors.New("meta service returns empty instanceID") ErrEmptyZone = errors.New("meta service returns empty zone") )
View Source
var (
ErrMultiVolumes = fmt.Errorf("multi volumes with same name")
)
Functions ¶
func ErrIsInvalidArgument ¶
func ErrIsMultiVolumes ¶
func ErrIsNotFound ¶
Types ¶
type Auth ¶
type Auth interface { GetSigner(ctx context.Context) auth.Signer GetCredentials(ctx context.Context) *auth.BceCredentials GetSignOptions(ctx context.Context) *auth.SignOptions }
func NewAccessKeyPairAuth ¶
func NewCCEGatewayAuth ¶
type BOSService ¶
type BOSService interface {
BucketExists(ctx context.Context, bucketName string, auth Auth) (bool, error)
}
func NewBOSService ¶
func NewBOSService(endpoint string) (BOSService, error)
type Billing ¶
type Billing struct { PaymentTiming string Reservation *Reservation }
type CDSVolume ¶
type CDSVolume interface { Delete(ctx context.Context) error Attach(ctx context.Context, instanceID string) (*bccapi.VolumeAttachmentModel, error) Detach(ctx context.Context, instanceID string) error Resize(ctx context.Context, args *ResizeCSDVolumeArgs) error ID() string Zone() string SizeGB() int Detail() *bccapi.VolumeModel IsAvailable() bool IsInUse() bool IsScaling() bool IsAttached() bool IsAttaching() bool IsDetaching() bool IsCreating() bool }
type CDSVolumeService ¶
type CDSVolumeService interface { CreateVolume(ctx context.Context, args *CreateCDSVolumeArgs, auth Auth) (string, error) GetVolumeByID(ctx context.Context, id string, auth Auth) (CDSVolume, error) GetVolumeByName(ctx context.Context, name string, auth Auth) (CDSVolume, error) }
func NewCDSService ¶
func NewCDSService(endpoint, region string) (CDSVolumeService, error)
type CreateCDSVolumeArgs ¶
type MetaDataService ¶
type MetaDataService interface { // InstanceID returns instance id of which the instance is in. InstanceID() string // Zone returns zone of which the instance is in. Zone() string }
MetaDataService represents BaiduCloud BCC meta data service.
func NewMetaDataService ¶
func NewMetaDataService() (MetaDataService, error)
NewMetaDataService returns a new MetaDataService implementation.
type NodeService ¶
type NodeService interface {
GetNodeByID(ctx context.Context, nodeID string, auth Auth) (Node, error)
}
func NewBCCService ¶
func NewBCCService(endpoint, region string) (NodeService, error)
type Reservation ¶
type ResizeCSDVolumeArgs ¶
type ResizeCSDVolumeArgs struct { NewCdsSizeInGB int NewVolumeType bccapi.StorageType }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.