file

package
v1.1.4-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2022 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyFilter added in v0.6.1

func ApplyFilter(ops []*filev1beta1.Operation, uri string, opType string, done bool) ([]*filev1beta1.Operation, error)

func CompareInstances

func CompareInstances(a, b *ServiceInstance) error

func CreateBackpURI added in v0.3.1

func CreateBackpURI(obj *ServiceInstance, backupName, backupLocation string) (string, string, error)

This function returns the backup URI, the region that was picked to be the backup resource location and error.

func IsNotFoundErr added in v0.2.0

func IsNotFoundErr(err error) bool

func IsUserError added in v1.1.2

func IsUserError(err error) bool

This function returns true if the error is a googleapi error caused by users, such as Error 429: Quota limit exceeded, Error 403: Permission Denied, and Error 400: Bad Request

Types

type BackupInfo added in v0.3.1

type BackupInfo struct {
	Backup             *filev1beta1.Backup
	SourceVolumeHandle string
}

type Network

type Network struct {
	Name            string
	ConnectMode     string
	ReservedIpRange string
	Ip              string
}

type Service

type Service interface {
	CreateInstance(ctx context.Context, obj *ServiceInstance) (*ServiceInstance, error)
	DeleteInstance(ctx context.Context, obj *ServiceInstance) error
	GetInstance(ctx context.Context, obj *ServiceInstance) (*ServiceInstance, error)
	ListInstances(ctx context.Context, obj *ServiceInstance) ([]*ServiceInstance, error)
	ResizeInstance(ctx context.Context, obj *ServiceInstance) (*ServiceInstance, error)
	GetBackup(ctx context.Context, backupUri string) (*BackupInfo, error)
	CreateBackup(ctx context.Context, obj *ServiceInstance, backupId, backupLocation string) (*filev1beta1.Backup, error)
	DeleteBackup(ctx context.Context, backupId string) error
	CreateInstanceFromBackupSource(ctx context.Context, obj *ServiceInstance, volumeSourceSnapshotId string) (*ServiceInstance, error)
	HasOperations(ctx context.Context, obj *ServiceInstance, operationType string, done bool) (bool, error)
}

func NewFakeBlockingService added in v0.5.0

func NewFakeBlockingService(operationUnblocker chan chan struct{}) (Service, error)

func NewFakeService

func NewFakeService() (Service, error)

func NewGCFSService

func NewGCFSService(version string, client *http.Client) (Service, error)

type ServiceInstance added in v0.2.0

type ServiceInstance struct {
	Project    string
	Name       string
	Location   string
	Tier       string
	Network    Network
	Volume     Volume
	Labels     map[string]string
	State      string
	KmsKeyName string
}

type Volume

type Volume struct {
	Name      string
	SizeBytes int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL