vol

package
v0.0.0-...-18a434d Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(c *gin.Context, clusterAddr string, input *CreateInput) (interface{}, error)

func Delete

func Delete(c *gin.Context, clusterAddr string, input *DeleteInput) (interface{}, error)

func Expand

func Expand(c *gin.Context, clusterAddr string, input *ExpandInput) error

func Get

func Get(c *gin.Context, clusterAddr, keywords string) (*[]proto.VolInfo, error)

func GetByName

func GetByName(c *gin.Context, clusterAddr, name string) (*proto.SimpleVolView, error)

func Shrink

func Shrink(c *gin.Context, clusterAddr string, input *ExpandInput) error

func Update

func Update(c *gin.Context, clusterAddr string, input *UpdateInput) (interface{}, error)

Types

type ClientVol

type ClientVol struct {
	ID           uint64
	Name         string
	Owner        string
	OSSAccessKey string
	OSSSecretKey string

	Status uint8

	Capacity uint64 // GB
	VolType  int

	EbsBlkSize       int
	CacheCapacity    uint64
	CacheAction      int
	CacheThreshold   int
	CacheTTL         int
	CacheHighWater   int
	CacheLowWater    int
	CacheLRUInterval int
	CacheRule        string

	PreloadCacheOn     bool
	NeedToLowerReplica bool
	FollowerRead       bool
	// contains filtered or unexported fields
}

func ClientGet

func ClientGet(c *gin.Context, clusterAddr, owner, name string) (*ClientVol, error)

type CreateInput

type CreateInput struct {
	Name            string `json:"name"`
	Owner           string `json:"owner"`
	Capacity        uint64 `json:"capacity"`
	Description     string `json:"description"`
	VolType         int    `json:"volType"`
	CrossZone       bool   `json:"crossZone"`
	DefaultPriority bool   `json:"defaultPriority"`
	ReplicaNumber   int    `json:"replicaNum"`
	CacheCap        int    `json:"cacheCap"`
	FollowerRead    bool   `json:"followerRead"`
}

func (*CreateInput) QueryParams

func (c *CreateInput) QueryParams() string

type DeleteInput

type DeleteInput struct {
	Name    string `json:"name"`
	AuthKey string `json:"authKey"`
}

type ExpandInput

type ExpandInput struct {
	Name     string `json:"name"`
	Capacity uint64 `json:"capacity"`
	AuthKey  string `json:"authKey"`
}

type UpdateInput

type UpdateInput struct {
	Name           string `json:"name"`
	AuthKey        string `json:"authKey"`
	CacheCap       uint64 `json:"cacheCap"`
	CacheThreshold int    `json:"cacheThreshold"`
	CacheTTL       int    `json:"cacheTTL"`
	ReplicaNumber  *uint8 `json:"replicaNum,omitempty"`
	FollowerRead   *bool  `json:"followerRead,omitempty"`
}

Jump to

Keyboard shortcuts

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