volume

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeneralResp

type GeneralResp struct {
	Code    int32
	Message string
}

type RWMutex

type RWMutex struct {
}

type SimpleVolView

type SimpleVolView struct {
	Authenticate       bool
	Capacity           uint64
	CreateTime         string
	CrossZone          bool
	Description        string
	DpCnt              int
	DpReplicaNum       uint8
	EnableToken        bool
	FollowerRead       bool
	ID                 uint64
	MpCnt              int
	MpReplicaNum       uint8
	Name               string
	NeedToLowerReplica bool
	Owner              string
	RwDpCnt            int
	Status             uint8
	ZoneName           string
}

type Token

type Token struct {
	TokenType int8
	Value     string
	VolName   string
}

struct begin .....

type UserPermission

type UserPermission struct {
	Access []string
	Edit   bool
	UserID string
}

type Vol

type Vol struct {
	Capacity           uint64
	CreateTime         int64
	DpReplicaNum       int32
	FollowerRead       bool
	ID                 uint64
	Name               string
	NeedToLowerReplica bool
	OSSAccessKey       string
	OSSSecretKey       string
	Occupied           int64
	Owner              string
	RWMutex            RWMutex
	Status             uint8
	ToSimpleVolView    *SimpleVolView
	Tokens             []Token
}

type VolumeClient

type VolumeClient struct {
	*client.MasterGClient
}

func NewVolumeClient

func NewVolumeClient(c *client.MasterGClient) *VolumeClient

func (*VolumeClient) CreateVolume

func (c *VolumeClient) CreateVolume(ctx context.Context, authenticate bool, capacity uint64, crossZone bool, dataPartitionSize uint64, description string, dpReplicaNum uint64, enableToken bool, followerRead bool, mpCount uint64, name string, owner string, zoneName string) (*Vol, error)

function begin .....

func (*VolumeClient) DeleteVolume

func (c *VolumeClient) DeleteVolume(ctx context.Context, authKey string, name string) (*GeneralResp, error)

func (*VolumeClient) GetVolume

func (c *VolumeClient) GetVolume(ctx context.Context, name string) (*Vol, error)

func (*VolumeClient) ListVolume

func (c *VolumeClient) ListVolume(ctx context.Context, keyword *string, userID *string) ([]Vol, error)

func (*VolumeClient) UpdateVolume

func (c *VolumeClient) UpdateVolume(ctx context.Context, authKey string, authenticate *bool, capacity *uint64, description *string, enableToken *bool, followerRead *bool, name string, replicaNum *uint64, zoneName *string) (*Vol, error)

func (*VolumeClient) VolPermission

func (c *VolumeClient) VolPermission(ctx context.Context, userID *string, volName string) ([]UserPermission, error)

Jump to

Keyboard shortcuts

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