Documentation ¶
Index ¶
- Variables
- type AdminAPI
- func (api *AdminAPI) AddDataReplica(dataPartitionID uint64, nodeAddr string) (err error)
- func (api *AdminAPI) CreateDataPartition(volName string, count int) (err error)
- func (api *AdminAPI) CreateDefaultVolume(volName, owner string) (err error)
- func (api *AdminAPI) CreateMetaPartition(volName string, inodeStart uint64) (err error)
- func (api *AdminAPI) CreateVolume(volName, owner string, mpCount int, dpSize uint64, capacity uint64, ...) (err error)
- func (api *AdminAPI) DecommissionDataPartition(dataPartitionID uint64, nodeAddr string) (err error)
- func (api *AdminAPI) DeleteDataReplica(dataPartitionID uint64, nodeAddr string) (err error)
- func (api *AdminAPI) DeleteVolume(volName, authKey string) (err error)
- func (api *AdminAPI) GetCluster() (cv *proto.ClusterView, err error)
- func (api *AdminAPI) GetClusterInfo() (ci *proto.ClusterInfo, err error)
- func (api *AdminAPI) GetDataPartition(volName string, partitionID uint64) (partition *proto.DataPartitionInfo, err error)
- func (api *AdminAPI) GetVolumeSimpleInfo(volName string) (vv *proto.SimpleVolView, err error)
- func (api *AdminAPI) ListVols(keywords string) (volsInfo []*proto.VolInfo, err error)
- func (api *AdminAPI) LoadDataPartition(volName string, partitionID uint64) (err error)
- func (api *AdminAPI) UpdateVolume(volName string, capacity uint64, replicas int, followerRead bool, ...) (err error)
- type ClientAPI
- func (api *ClientAPI) GetDataPartitions(volName string) (view *proto.DataPartitionsView, err error)
- func (api *ClientAPI) GetMetaPartition(partitionID uint64) (partition *proto.MetaPartitionInfo, err error)
- func (api *ClientAPI) GetMetaPartitions(volName string) (views []*proto.MetaPartitionView, err error)
- func (api *ClientAPI) GetToken(volName, tokenKey string) (token *proto.Token, err error)
- func (api *ClientAPI) GetVolume(volName string, authKey string) (vv *proto.VolView, err error)
- func (api *ClientAPI) GetVolumeStat(volName string) (info *proto.VolStatInfo, err error)
- func (api *ClientAPI) GetVolumeWithAuthnode(volName string, authKey string, token string, decoder Decoder) (vv *proto.VolView, err error)
- func (api *ClientAPI) GetVolumeWithoutAuthKey(volName string) (vv *proto.VolView, err error)
- type Decoder
- type MasterClient
- func (c *MasterClient) AddNode(address string)
- func (c *MasterClient) AdminAPI() *AdminAPI
- func (c *MasterClient) ClientAPI() *ClientAPI
- func (c *MasterClient) Leader() (addr string)
- func (c *MasterClient) NodeAPI() *NodeAPI
- func (c *MasterClient) Nodes() (nodes []string)
- func (c *MasterClient) UserAPI() *UserAPI
- type NodeAPI
- func (api *NodeAPI) AddDataNode(serverAddr, zoneName string) (id uint64, err error)
- func (api *NodeAPI) AddMetaNode(serverAddr, zoneName string) (id uint64, err error)
- func (api *NodeAPI) GetDataNode(serverHost string) (node *proto.DataNodeInfo, err error)
- func (api *NodeAPI) GetMetaNode(serverHost string) (node *proto.MetaNodeInfo, err error)
- func (api *NodeAPI) ResponseDataNodeTask(task *proto.AdminTask) (err error)
- func (api *NodeAPI) ResponseMetaNodeTask(task *proto.AdminTask) (err error)
- type UserAPI
- func (api *UserAPI) CreateUser(param *proto.UserCreateParam) (userInfo *proto.UserInfo, err error)
- func (api *UserAPI) DeleteUser(userID string) (err error)
- func (api *UserAPI) DeleteVolPolicy(vol string) (err error)
- func (api *UserAPI) GetAKInfo(accesskey string) (userInfo *proto.UserInfo, err error)
- func (api *UserAPI) GetUserInfo(userID string) (userInfo *proto.UserInfo, err error)
- func (api *UserAPI) ListUsers(keywords string) (users []*proto.UserInfo, err error)
- func (api *UserAPI) RemovePolicy(param *proto.UserPermRemoveParam) (userInfo *proto.UserInfo, err error)
- func (api *UserAPI) TransferVol(param *proto.UserTransferVolParam) (userInfo *proto.UserInfo, err error)
- func (api *UserAPI) UpdatePolicy(param *proto.UserPermUpdateParam) (userInfo *proto.UserInfo, err error)
- func (api *UserAPI) UpdateUser(param *proto.UserUpdateParam) (userInfo *proto.UserInfo, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoValidMaster = errors.New("no valid master")
)
Functions ¶
This section is empty.
Types ¶
type AdminAPI ¶
type AdminAPI struct {
// contains filtered or unexported fields
}
func (*AdminAPI) AddDataReplica ¶
func (*AdminAPI) CreateDataPartition ¶
func (*AdminAPI) CreateDefaultVolume ¶
func (*AdminAPI) CreateMetaPartition ¶
func (*AdminAPI) CreateVolume ¶
func (*AdminAPI) DecommissionDataPartition ¶
func (*AdminAPI) DeleteDataReplica ¶
func (*AdminAPI) DeleteVolume ¶
func (*AdminAPI) GetCluster ¶
func (api *AdminAPI) GetCluster() (cv *proto.ClusterView, err error)
func (*AdminAPI) GetClusterInfo ¶
func (api *AdminAPI) GetClusterInfo() (ci *proto.ClusterInfo, err error)
func (*AdminAPI) GetDataPartition ¶
func (*AdminAPI) GetVolumeSimpleInfo ¶
func (api *AdminAPI) GetVolumeSimpleInfo(volName string) (vv *proto.SimpleVolView, err error)
func (*AdminAPI) LoadDataPartition ¶
type ClientAPI ¶
type ClientAPI struct {
// contains filtered or unexported fields
}
func (*ClientAPI) GetDataPartitions ¶
func (api *ClientAPI) GetDataPartitions(volName string) (view *proto.DataPartitionsView, err error)
func (*ClientAPI) GetMetaPartition ¶
func (api *ClientAPI) GetMetaPartition(partitionID uint64) (partition *proto.MetaPartitionInfo, err error)
func (*ClientAPI) GetMetaPartitions ¶
func (api *ClientAPI) GetMetaPartitions(volName string) (views []*proto.MetaPartitionView, err error)
func (*ClientAPI) GetVolumeStat ¶
func (api *ClientAPI) GetVolumeStat(volName string) (info *proto.VolStatInfo, err error)
func (*ClientAPI) GetVolumeWithAuthnode ¶
type MasterClient ¶
func NewMasterClient ¶
func NewMasterClient(masters []string, useSSL bool) *MasterClient
NewMasterHelper returns a new MasterClient instance.
func NewMasterClientFromString ¶
func NewMasterClientFromString(masterAddr string, useSSL bool) *MasterClient
NewMasterClientFromString parse raw master address configuration string and returns a new MasterClient instance. Notes that a valid format raw string must match: "{HOST}:{PORT},{HOST}:{PORT}"
func (*MasterClient) AddNode ¶
func (c *MasterClient) AddNode(address string)
AddNode add the given address as the master address.
func (*MasterClient) AdminAPI ¶
func (c *MasterClient) AdminAPI() *AdminAPI
func (*MasterClient) ClientAPI ¶
func (c *MasterClient) ClientAPI() *ClientAPI
func (*MasterClient) Leader ¶
func (c *MasterClient) Leader() (addr string)
Leader returns the current leader address.
func (*MasterClient) NodeAPI ¶
func (c *MasterClient) NodeAPI() *NodeAPI
func (*MasterClient) Nodes ¶
func (c *MasterClient) Nodes() (nodes []string)
Nodes returns all master addresses.
func (*MasterClient) UserAPI ¶
func (c *MasterClient) UserAPI() *UserAPI
type NodeAPI ¶
type NodeAPI struct {
// contains filtered or unexported fields
}
func (*NodeAPI) AddDataNode ¶
func (*NodeAPI) AddMetaNode ¶
func (*NodeAPI) GetDataNode ¶
func (api *NodeAPI) GetDataNode(serverHost string) (node *proto.DataNodeInfo, err error)
func (*NodeAPI) GetMetaNode ¶
func (api *NodeAPI) GetMetaNode(serverHost string) (node *proto.MetaNodeInfo, err error)
func (*NodeAPI) ResponseDataNodeTask ¶
type UserAPI ¶
type UserAPI struct {
// contains filtered or unexported fields
}
func (*UserAPI) CreateUser ¶
func (*UserAPI) DeleteUser ¶
func (*UserAPI) DeleteVolPolicy ¶
func (*UserAPI) GetUserInfo ¶
func (*UserAPI) RemovePolicy ¶
func (*UserAPI) TransferVol ¶
func (*UserAPI) UpdatePolicy ¶
func (*UserAPI) UpdateUser ¶
Click to show internal directories.
Click to hide internal directories.