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) 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) 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) 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
- type NodeAPI
- func (api *NodeAPI) AddDataNode(serverAddr string) (id uint64, err error)
- func (api *NodeAPI) AddMetaNode(serverAddr 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)
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) 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 MasterHelper instance.
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.
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 ¶
Click to show internal directories.
Click to hide internal directories.