Documentation
¶
Index ¶
Constants ¶
View Source
const ( // bit StoreStatusEnableBit = 31 StoreStatusReadBit = 0 StoreStatusWriteBit = 1 StoreStatusSyncBit = 2 // status StoreStatusInit = 0 // 0 StoreStatusEnable = (1 << StoreStatusEnableBit) // 2147483648 StoreStatusRead = StoreStatusEnable | (1 << StoreStatusReadBit) // 2147483649 StoreStatusWrite = StoreStatusEnable | (1 << StoreStatusWriteBit) // 2147483650 StoreStatusHealth = StoreStatusRead | StoreStatusWrite // 2147483651 StoreStatusSync = StoreStatusEnable | (1 << StoreStatusSyncBit) // 2147483652 StoreStatusFail = StoreStatusEnable // 2147483648 )
Store status const.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgAddFreeVolume ¶
type ArgAddFreeVolume struct { Group string `form:"group" validate:"required"` Dir string `form:"dir" validate:"required"` Num int64 `form:"num" validate:"required"` }
ArgAddFreeVolume add free volume
type ArgAddVolume ¶
type ArgAddVolume struct { Group string `form:"group" validate:"required"` Num int64 `form:"num" validate:"required"` }
ArgAddVolume add volume
type ArgCluster ¶
type ArgCluster struct {
Cluster string `form:"cluster" validate:"required"`
}
ArgCluster .
type ArgCompact ¶
ArgCompact group compact
type ArgGroupStatus ¶
type ArgGroupStatus struct { Group string `form:"group" validate:"required"` Status string `form:"status" validate:"required"` }
ArgGroupStatus group status
type Group ¶
type Group struct { Stores []string `json:"stores"` StoreDatas map[string]*Store `json:"store_datas"` Total struct { Space int64 `json:"space"` FreeSpace int64 `json:"free_space"` Volumes int64 `json:"volumes"` } `json:"total"` }
Group .
type RespTotal ¶
type RespTotal struct { Space int64 `json:"space"` FreeSpace int64 `json:"free_space"` Groups int64 `json:"groups"` Stores int64 `json:"stores"` Volumes int64 `json:"volumes"` }
RespTotal .
type RespVolume ¶
type RespVolume struct {
Volumes map[string]*VolumeState `json:"volumes"`
}
RespVolume .
type Store ¶
type Store struct { Stat string `json:"stat"` Admin string `json:"admin"` API string `json:"api"` ID string `json:"id"` Rack string `json:"rack"` Status int `json:"status"` States struct { Init bool `json:"init"` Enable bool `json:"enable"` Read bool `json:"read"` Write bool `json:"write"` Sync bool `json:"sync"` Fail bool `json:"fail"` } `json:"states"` Volumes []string `json:"volumes"` }
Store meta data.
Click to show internal directories.
Click to hide internal directories.