master

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 19 Imported by: 26

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoValidMaster = errors.New("no valid master")
View Source
var ReqHeaderUA = fmt.Sprintf("cubefs-sdk/%v (commit %v)", proto.Version, proto.CommitID)

Functions

func IsValidDomain added in v1.34.0

func IsValidDomain(domain string) bool

Types

type AdminAPI

type AdminAPI struct {
	// contains filtered or unexported fields
}

func (*AdminAPI) AbortDiskDecommission added in v1.34.0

func (api *AdminAPI) AbortDiskDecommission(addr string, disk string) (err error)

func (*AdminAPI) AddDataReplica

func (api *AdminAPI) AddDataReplica(dataPartitionID uint64, nodeAddr, clientIDKey string) (err error)

func (*AdminAPI) AddMetaReplica added in v1.34.0

func (api *AdminAPI) AddMetaReplica(metaPartitionID uint64, nodeAddr string, clientIDKey string) (err error)

func (*AdminAPI) CheckACL added in v1.34.0

func (api *AdminAPI) CheckACL() (ci *proto.ClusterInfo, err error)

access control list

func (*AdminAPI) CreateDataPartition

func (api *AdminAPI) CreateDataPartition(volName string, count int, clientIDKey string) (err error)

func (*AdminAPI) CreateDefaultVolume added in v1.34.0

func (api *AdminAPI) CreateDefaultVolume(volName, owner string) (err error)

func (*AdminAPI) CreateMetaPartition

func (api *AdminAPI) CreateMetaPartition(volName string, count int, clientIDKey string) (err error)

func (*AdminAPI) CreatePreLoadDataPartition added in v1.34.0

func (api *AdminAPI) CreatePreLoadDataPartition(volName string, count int, capacity, ttl uint64, zongs string) (view *proto.DataPartitionsView, err error)

func (*AdminAPI) CreateQuota added in v1.34.0

func (api *AdminAPI) CreateQuota(volName string, quotaPathInfos []proto.QuotaPathInfo, maxFiles uint64, maxBytes uint64) (quotaId uint32, err error)

func (*AdminAPI) CreateVersion added in v1.34.0

func (api *AdminAPI) CreateVersion(volName string) (ver *proto.VolVersionInfo, err error)

func (*AdminAPI) CreateVolName added in v1.34.0

func (api *AdminAPI) CreateVolName(volName, owner string, capacity uint64, deleteLockTime int64, crossZone, normalZonesFirst bool, business string,
	mpCount, dpCount, replicaNum, dpSize, volType int, followerRead bool, zoneName, cacheRuleKey string, ebsBlkSize,
	cacheCapacity, cacheAction, cacheThreshold, cacheTTL, cacheHighWater, cacheLowWater, cacheLRUInterval int,
	dpReadOnlyWhenVolFull bool, txMask string, txTimeout uint32, txConflictRetryNum int64, txConflictRetryInterval int64, optEnableQuota string,
	clientIDKey string,
) (err error)

func (*AdminAPI) DecommissionDataPartition

func (api *AdminAPI) DecommissionDataPartition(dataPartitionID uint64, nodeAddr string, raftForce bool, clientIDKey, decommissionType string) (err error)

func (*AdminAPI) DecommissionDisk added in v1.34.0

func (api *AdminAPI) DecommissionDisk(addr string, disk string) (err error)

func (*AdminAPI) DecommissionMetaPartition added in v1.34.0

func (api *AdminAPI) DecommissionMetaPartition(metaPartitionID uint64, nodeAddr, clientIDKey string) (err error)

func (*AdminAPI) DelBucketLifecycle added in v1.34.0

func (api *AdminAPI) DelBucketLifecycle(volume string) (err error)

func (*AdminAPI) DeleteDataReplica

func (api *AdminAPI) DeleteDataReplica(dataPartitionID uint64, nodeAddr, clientIDKey string, raftForce bool) (err error)

func (*AdminAPI) DeleteMetaReplica added in v1.34.0

func (api *AdminAPI) DeleteMetaReplica(metaPartitionID uint64, nodeAddr string, clientIDKey string) (err error)

func (*AdminAPI) DeleteQuota added in v1.34.0

func (api *AdminAPI) DeleteQuota(volName string, quotaId string) (err error)

func (*AdminAPI) DeleteVersion added in v1.34.0

func (api *AdminAPI) DeleteVersion(volName string, verSeq string) (err error)

func (*AdminAPI) DeleteVolume

func (api *AdminAPI) DeleteVolume(volName, authKey string) (err error)

func (*AdminAPI) DeleteVolumeWithAuthNode added in v1.34.0

func (api *AdminAPI) DeleteVolumeWithAuthNode(volName, authKey, clientIDKey string) (err error)

func (*AdminAPI) DiagnoseDataPartition added in v1.34.0

func (api *AdminAPI) DiagnoseDataPartition(ignoreDiscardDp bool) (diagnosis *proto.DataPartitionDiagnosis, err error)

func (*AdminAPI) DiagnoseMetaPartition added in v1.34.0

func (api *AdminAPI) DiagnoseMetaPartition() (diagnosis *proto.MetaPartitionDiagnosis, err error)

func (*AdminAPI) EncodingGzip added in v1.34.0

func (api *AdminAPI) EncodingGzip() *AdminAPI

func (*AdminAPI) EncodingWith added in v1.34.0

func (api *AdminAPI) EncodingWith(encoding string) *AdminAPI

func (*AdminAPI) GetBucketLifecycle added in v1.34.0

func (api *AdminAPI) GetBucketLifecycle(volume string) (lcConf *proto.LcConfiguration, err error)

func (*AdminAPI) GetCluster

func (api *AdminAPI) GetCluster() (cv *proto.ClusterView, err error)

func (*AdminAPI) GetClusterDataNodes added in v1.34.0

func (api *AdminAPI) GetClusterDataNodes() (nodes []proto.NodeView, err error)

func (*AdminAPI) GetClusterIP added in v1.34.0

func (api *AdminAPI) GetClusterIP() (cp *proto.ClusterIP, err error)

func (*AdminAPI) GetClusterInfo

func (api *AdminAPI) GetClusterInfo() (ci *proto.ClusterInfo, err error)

func (*AdminAPI) GetClusterMetaNodes added in v1.34.0

func (api *AdminAPI) GetClusterMetaNodes() (nodes []proto.NodeView, err error)

func (*AdminAPI) GetClusterNodeInfo added in v1.34.0

func (api *AdminAPI) GetClusterNodeInfo() (cn *proto.ClusterNodeInfo, err error)

func (*AdminAPI) GetClusterParas added in v1.34.0

func (api *AdminAPI) GetClusterParas() (delParas map[string]string, err error)

func (*AdminAPI) GetClusterStat added in v1.34.0

func (api *AdminAPI) GetClusterStat() (cs *proto.ClusterStatInfo, err error)

func (*AdminAPI) GetDataPartition

func (api *AdminAPI) GetDataPartition(volName string, partitionID uint64) (partition *proto.DataPartitionInfo, err error)

func (*AdminAPI) GetDataPartitionById added in v1.34.0

func (api *AdminAPI) GetDataPartitionById(partitionID uint64) (partition *proto.DataPartitionInfo, err error)

func (*AdminAPI) GetDiscardDataPartition added in v1.34.0

func (api *AdminAPI) GetDiscardDataPartition() (discardDpInfos *proto.DiscardDataPartitionInfos, err error)

func (*AdminAPI) GetLatestVer added in v1.34.0

func (api *AdminAPI) GetLatestVer(volName string) (ver *proto.VolVersionInfo, err error)

func (*AdminAPI) GetMonitorPushAddr added in v1.34.0

func (api *AdminAPI) GetMonitorPushAddr() (addr string, err error)

func (*AdminAPI) GetNodeSet added in v1.34.0

func (api *AdminAPI) GetNodeSet(nodeSetId string) (nodeSetStatInfo *proto.NodeSetStatInfo, err error)

func (*AdminAPI) GetQuota added in v1.34.0

func (api *AdminAPI) GetQuota(volName string, quotaId string) (quotaInfo *proto.QuotaInfo, err error)

func (*AdminAPI) GetS3QoSInfo added in v1.34.0

func (api *AdminAPI) GetS3QoSInfo() (data []byte, err error)

func (*AdminAPI) GetVerInfo added in v1.34.0

func (api *AdminAPI) GetVerInfo(volName string) (ci *proto.VolumeVerInfo, err error)

func (*AdminAPI) GetVerList added in v1.34.0

func (api *AdminAPI) GetVerList(volName string) (verList *proto.VolVersionInfoList, err error)

func (*AdminAPI) GetVolumeSimpleInfo

func (api *AdminAPI) GetVolumeSimpleInfo(volName string) (vv *proto.SimpleVolView, err error)

func (*AdminAPI) GetVolumeSimpleInfoWithFlowInfo added in v1.34.0

func (api *AdminAPI) GetVolumeSimpleInfoWithFlowInfo(volName string) (vv *proto.SimpleVolView, err error)

func (*AdminAPI) IsFreezeCluster added in v1.34.0

func (api *AdminAPI) IsFreezeCluster(isFreeze bool, clientIDKey string) (err error)

func (*AdminAPI) ListNodeSets added in v1.34.0

func (api *AdminAPI) ListNodeSets(zoneName string) (nodeSetStats []*proto.NodeSetStat, err error)

func (*AdminAPI) ListQuota added in v1.34.0

func (api *AdminAPI) ListQuota(volName string) (quotaInfo []*proto.QuotaInfo, err error)

func (*AdminAPI) ListQuotaAll added in v1.34.0

func (api *AdminAPI) ListQuotaAll() (volsInfo []*proto.VolInfo, err error)

func (*AdminAPI) ListVols added in v1.34.0

func (api *AdminAPI) ListVols(keywords string) (volsInfo []*proto.VolInfo, err error)

func (*AdminAPI) ListZones added in v1.34.0

func (api *AdminAPI) ListZones() (zoneViews []*proto.ZoneView, err error)

func (*AdminAPI) LoadDataPartition

func (api *AdminAPI) LoadDataPartition(volName string, partitionID uint64, clientIDKey string) (err error)

func (*AdminAPI) PutDataPartitions added in v1.34.0

func (api *AdminAPI) PutDataPartitions(volName string, dpsView []byte) (err error)

func (*AdminAPI) QueryBadDisks added in v1.34.0

func (api *AdminAPI) QueryBadDisks() (badDisks *proto.BadDiskInfos, err error)

func (*AdminAPI) QueryDataPartitionDecommissionStatus added in v1.34.0

func (api *AdminAPI) QueryDataPartitionDecommissionStatus(partitionId uint64) (info *proto.DecommissionDataPartitionInfo, err error)

func (*AdminAPI) QueryDecommissionDiskProgress added in v1.34.0

func (api *AdminAPI) QueryDecommissionDiskProgress(addr string, disk string) (progress *proto.DecommissionProgress, err error)

func (*AdminAPI) QueryDecommissionFailedDisk added in v1.34.0

func (api *AdminAPI) QueryDecommissionFailedDisk(decommType int) (diskInfo []*proto.DecommissionFailedDiskInfo, err error)

func (*AdminAPI) QueryDecommissionToken added in v1.34.0

func (api *AdminAPI) QueryDecommissionToken() (status []proto.DecommissionTokenStatus, err error)

func (*AdminAPI) RecommissionDisk added in v1.34.0

func (api *AdminAPI) RecommissionDisk(addr string, disk string) (err error)

func (*AdminAPI) ResetDataPartitionRestoreStatus added in v1.34.0

func (api *AdminAPI) ResetDataPartitionRestoreStatus(dpId uint64) (ok bool, err error)

func (*AdminAPI) SetAutoDecommissionDisk added in v1.34.0

func (api *AdminAPI) SetAutoDecommissionDisk(enable bool) (err error)

func (*AdminAPI) SetBucketLifecycle added in v1.34.0

func (api *AdminAPI) SetBucketLifecycle(req *proto.LcConfiguration) (err error)

func (*AdminAPI) SetClusterDecommissionLimit added in v1.34.0

func (api *AdminAPI) SetClusterDecommissionLimit(limit int32) (err error)

func (*AdminAPI) SetClusterParas added in v1.34.0

func (api *AdminAPI) SetClusterParas(batchCount, markDeleteRate, deleteWorkerSleepMs, autoRepairRate, loadFactor, maxDpCntLimit, maxMpCntLimit, clientIDKey string,
	enableAutoDecommissionDisk string, autoDecommissionDiskInterval string,
	enableAutoDpMetaRepair string, autoDpMetaRepairParallelCnt string,
	dpRepairTimeout string, dpTimeout string, dpBackupTimeout string, decommissionDpLimit, decommissionDiskLimit string,
) (err error)

func (*AdminAPI) SetDataPartitionDiscard added in v1.34.0

func (api *AdminAPI) SetDataPartitionDiscard(partitionId uint64, discard bool, force bool) (err error)

func (*AdminAPI) SetDecommissionDiskLimit added in v1.34.0

func (api *AdminAPI) SetDecommissionDiskLimit(limit uint32) (err error)

func (*AdminAPI) SetForbidMpDecommission added in v1.34.0

func (api *AdminAPI) SetForbidMpDecommission(disable bool) (err error)

func (*AdminAPI) SetMasterVolDeletionDelayTime added in v1.34.0

func (api *AdminAPI) SetMasterVolDeletionDelayTime(volDeletionDelayTimeHour int) (err error)

func (*AdminAPI) SetMetaNodeThreshold added in v1.34.0

func (api *AdminAPI) SetMetaNodeThreshold(threshold float64, clientIDKey string) (err error)

func (*AdminAPI) SetStrategy added in v1.34.0

func (api *AdminAPI) SetStrategy(volName string, periodic string, count string, enable string, force string) (err error)

func (*AdminAPI) SetVolTrashInterval added in v1.34.0

func (api *AdminAPI) SetVolTrashInterval(volName string, authKey string, interval time.Duration) (err error)

func (*AdminAPI) SetVolumeAuditLog added in v1.34.0

func (api *AdminAPI) SetVolumeAuditLog(volName string, enable bool) (err error)

func (*AdminAPI) SetVolumeDpRepairBlockSize added in v1.34.0

func (api *AdminAPI) SetVolumeDpRepairBlockSize(volName string, repairSize uint64) (err error)

func (*AdminAPI) SetVolumeForbidden added in v1.34.0

func (api *AdminAPI) SetVolumeForbidden(volName string, forbidden bool) (err error)

func (*AdminAPI) Topo added in v1.34.0

func (api *AdminAPI) Topo() (topo *proto.TopologyView, err error)

func (*AdminAPI) UnDeleteVolume added in v1.34.0

func (api *AdminAPI) UnDeleteVolume(volName, authKey string, status bool) (err error)

func (*AdminAPI) UpdateNodeSet added in v1.34.0

func (api *AdminAPI) UpdateNodeSet(nodeSetId string, dataNodeSelector string, metaNodeSelector string) (err error)

func (*AdminAPI) UpdateQuota added in v1.34.0

func (api *AdminAPI) UpdateQuota(volName string, quotaId string, maxFiles uint64, maxBytes uint64) (err error)

func (*AdminAPI) UpdateVolume

func (api *AdminAPI) UpdateVolume(
	vv *proto.SimpleVolView,
	txTimeout int64,
	txMask string,
	txForceReset bool,
	txConflictRetryNum int64,
	txConflictRetryInterval int64,
	txOpLimit int,
	clientIDKey string,
) (err error)

func (*AdminAPI) UpdateZone added in v1.34.0

func (api *AdminAPI) UpdateZone(name string, enable bool, dataNodesetSelector string, metaNodesetSelector string, dataNodeSelector string, metaNodeSelector string) (err error)

func (*AdminAPI) UploadFlowInfo added in v1.34.0

func (api *AdminAPI) UploadFlowInfo(volName string, flowInfo *proto.ClientReportLimitInfo) (vv *proto.LimitRsp2Client, err error)

func (*AdminAPI) VolExpand added in v1.34.0

func (api *AdminAPI) VolExpand(volName string, capacity uint64, authKey, clientIDKey string) (err error)

func (*AdminAPI) VolShrink added in v1.34.0

func (api *AdminAPI) VolShrink(volName string, capacity uint64, authKey, clientIDKey string) (err error)

func (*AdminAPI) WithHeader added in v1.34.0

func (api *AdminAPI) WithHeader(key, val string) *AdminAPI

type ClientAPI

type ClientAPI struct {
	// contains filtered or unexported fields
}

func (*ClientAPI) EncodingGzip added in v1.34.0

func (api *ClientAPI) EncodingGzip() *ClientAPI

func (*ClientAPI) EncodingWith added in v1.34.0

func (api *ClientAPI) EncodingWith(encoding string) *ClientAPI

func (*ClientAPI) GetDataPartitions

func (api *ClientAPI) GetDataPartitions(volName string) (view *proto.DataPartitionsView, err error)

func (*ClientAPI) GetDataPartitionsFromLeader added in v1.34.0

func (api *ClientAPI) GetDataPartitionsFromLeader(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) GetPreLoadDataPartitions added in v1.34.0

func (api *ClientAPI) GetPreLoadDataPartitions(volName string) (view *proto.DataPartitionsView, err error)

func (*ClientAPI) GetVolume

func (api *ClientAPI) GetVolume(volName string, authKey string) (vv *proto.VolView, err error)

func (*ClientAPI) GetVolumeStat

func (api *ClientAPI) GetVolumeStat(volName string) (info *proto.VolStatInfo, err error)

func (*ClientAPI) GetVolumeWithAuthnode

func (api *ClientAPI) GetVolumeWithAuthnode(volName string, authKey string, token string, decoder Decoder) (vv *proto.VolView, err error)

func (*ClientAPI) GetVolumeWithoutAuthKey

func (api *ClientAPI) GetVolumeWithoutAuthKey(volName string) (vv *proto.VolView, err error)

func (*ClientAPI) WithHeader added in v1.34.0

func (api *ClientAPI) WithHeader(key, val string) *ClientAPI

type Decoder

type Decoder func([]byte) ([]byte, error)

func (Decoder) Decode

func (d Decoder) Decode(raw []byte) ([]byte, error)

type IpCache added in v1.34.0

type IpCache struct {
	sync.RWMutex
	Ts  int64 // time.Now().Unix()
	Ips []string
}

func (*IpCache) GetAllIps added in v1.34.0

func (ic *IpCache) GetAllIps() (ips []string, err error)

func (*IpCache) GetRandomIp added in v1.34.0

func (ic *IpCache) GetRandomIp() (ip string, err error)

func (*IpCache) SetIps added in v1.34.0

func (ic *IpCache) SetIps(ips []string)

func (*IpCache) UpdateTs added in v1.34.0

func (ic *IpCache) UpdateTs()

type MasterCLientWithResolver added in v1.34.0

type MasterCLientWithResolver struct {
	MasterClient
	// contains filtered or unexported fields
}

func NewMasterCLientWithResolver added in v1.34.0

func NewMasterCLientWithResolver(masters []string, useSSL bool, updateInverval int) *MasterCLientWithResolver

func (*MasterCLientWithResolver) Start added in v1.34.0

func (mc *MasterCLientWithResolver) Start() (err error)

func (*MasterCLientWithResolver) Stop added in v1.34.0

func (mc *MasterCLientWithResolver) Stop()

type MasterClient

type MasterClient struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewMasterClient

func NewMasterClient(masters []string, useSSL bool) *MasterClient

NewMasterHelper returns a new MasterClient instance.

func NewMasterClientFromString added in v1.34.0

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) ClientIDKey added in v1.34.0

func (c *MasterClient) ClientIDKey() string

func (*MasterClient) GetMasterAddresses added in v1.34.0

func (c *MasterClient) GetMasterAddresses() (addrs []string)

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) ReplaceMasterAddresses added in v1.34.0

func (c *MasterClient) ReplaceMasterAddresses(addrs []string)

func (*MasterClient) SetClientIDKey added in v1.34.0

func (c *MasterClient) SetClientIDKey(clientIDKey string)

func (*MasterClient) SetLeader added in v1.34.0

func (c *MasterClient) SetLeader(addr string)

Change the leader address.

func (*MasterClient) SetTimeout added in v1.34.0

func (c *MasterClient) SetTimeout(timeout uint16)

Change the request timeout

func (*MasterClient) SetTransport added in v1.34.0

func (c *MasterClient) SetTransport(tr http.RoundTripper)

func (*MasterClient) UserAPI added in v1.34.0

func (c *MasterClient) UserAPI() *UserAPI

type NameResolver added in v1.34.0

type NameResolver struct {
	// contains filtered or unexported fields
}

func NewNameResolver added in v1.34.0

func NewNameResolver(addrPorts []string) (ns *NameResolver, err error)

NewNameResolver parse raw master address configuration string and returns a new NameResolver instance. Notes that a valid format raw string member of addrs must match: "IP:PORT" or "DOMAIN:PORT" and PORT must be the same

func (*NameResolver) GetAllAddresses added in v1.34.0

func (ns *NameResolver) GetAllAddresses() (addrs []string, err error)

func (*NameResolver) GetAllIps added in v1.34.0

func (ns *NameResolver) GetAllIps() (ips []string, err error)

func (*NameResolver) GetRandomIp added in v1.34.0

func (ns *NameResolver) GetRandomIp() (ip string, err error)

func (*NameResolver) Resolve added in v1.34.0

func (ns *NameResolver) Resolve() (changed bool, err error)

type NodeAPI

type NodeAPI struct {
	// contains filtered or unexported fields
}

func (*NodeAPI) AddDataNode

func (api *NodeAPI) AddDataNode(serverAddr, zoneName string) (id uint64, err error)

func (*NodeAPI) AddDataNodeWithAuthNode added in v1.34.0

func (api *NodeAPI) AddDataNodeWithAuthNode(serverAddr, zoneName, clientIDKey string) (id uint64, err error)

func (*NodeAPI) AddLcNode added in v1.34.0

func (api *NodeAPI) AddLcNode(serverAddr string) (id uint64, err error)

func (*NodeAPI) AddMetaNode

func (api *NodeAPI) AddMetaNode(serverAddr, zoneName string) (id uint64, err error)

func (*NodeAPI) AddMetaNodeWithAuthNode added in v1.34.0

func (api *NodeAPI) AddMetaNodeWithAuthNode(serverAddr, zoneName, clientIDKey string) (id uint64, err error)

func (*NodeAPI) DataNodeDecommission added in v1.34.0

func (api *NodeAPI) DataNodeDecommission(nodeAddr string, count int, clientIDKey string, raftForce bool) (err error)

func (*NodeAPI) DataNodeMigrate added in v1.34.0

func (api *NodeAPI) DataNodeMigrate(srcAddr, targetAddr string, count int, clientIDKey string) (err error)

func (*NodeAPI) EncodingGzip added in v1.34.0

func (api *NodeAPI) EncodingGzip() *NodeAPI

func (*NodeAPI) EncodingWith added in v1.34.0

func (api *NodeAPI) EncodingWith(encoding string) *NodeAPI

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) MetaNodeDecommission added in v1.34.0

func (api *NodeAPI) MetaNodeDecommission(nodeAddr string, count int, clientIDKey string) (err error)

func (*NodeAPI) MetaNodeMigrate added in v1.34.0

func (api *NodeAPI) MetaNodeMigrate(srcAddr, targetAddr string, count int, clientIDKey string) (err error)

func (*NodeAPI) QueryCancelDecommissionedDataNode added in v1.34.0

func (api *NodeAPI) QueryCancelDecommissionedDataNode(addr string) (err error)

func (*NodeAPI) QueryDecommissionedDisks added in v1.34.0

func (api *NodeAPI) QueryDecommissionedDisks(addr string) (disks *proto.DecommissionedDisks, err error)

func (*NodeAPI) ResponseDataNodeTask

func (api *NodeAPI) ResponseDataNodeTask(task *proto.AdminTask) (err error)

func (*NodeAPI) ResponseLcNodeTask added in v1.34.0

func (api *NodeAPI) ResponseLcNodeTask(task *proto.AdminTask) (err error)

func (*NodeAPI) ResponseMetaNodeTask

func (api *NodeAPI) ResponseMetaNodeTask(task *proto.AdminTask) (err error)

func (*NodeAPI) WithHeader added in v1.34.0

func (api *NodeAPI) WithHeader(key, val string) *NodeAPI

type UserAPI added in v1.34.0

type UserAPI struct {
	// contains filtered or unexported fields
}

func (*UserAPI) AclOperation added in v1.34.0

func (api *UserAPI) AclOperation(volName string, localIP string, op uint32) (aclInfo *proto.AclRsp, err error)

func (*UserAPI) CreateUser added in v1.34.0

func (api *UserAPI) CreateUser(param *proto.UserCreateParam, clientIDKey string) (userInfo *proto.UserInfo, err error)

func (*UserAPI) DeleteUser added in v1.34.0

func (api *UserAPI) DeleteUser(userID string, clientIDKey string) (err error)

func (*UserAPI) DeleteVolPolicy added in v1.34.0

func (api *UserAPI) DeleteVolPolicy(vol, clientIDKey string) (err error)

func (*UserAPI) EncodingGzip added in v1.34.0

func (api *UserAPI) EncodingGzip() *UserAPI

func (*UserAPI) EncodingWith added in v1.34.0

func (api *UserAPI) EncodingWith(encoding string) *UserAPI

func (*UserAPI) GetAKInfo added in v1.34.0

func (api *UserAPI) GetAKInfo(accesskey string) (userInfo *proto.UserInfo, err error)

func (*UserAPI) GetUserInfo added in v1.34.0

func (api *UserAPI) GetUserInfo(userID string) (userInfo *proto.UserInfo, err error)

func (*UserAPI) ListUsers added in v1.34.0

func (api *UserAPI) ListUsers(keywords string) (users []*proto.UserInfo, err error)

func (*UserAPI) ListUsersOfVol added in v1.34.0

func (api *UserAPI) ListUsersOfVol(vol string) (users []string, err error)

func (*UserAPI) RemovePolicy added in v1.34.0

func (api *UserAPI) RemovePolicy(param *proto.UserPermRemoveParam, clientIDKey string) (userInfo *proto.UserInfo, err error)

func (*UserAPI) TransferVol added in v1.34.0

func (api *UserAPI) TransferVol(param *proto.UserTransferVolParam, clientIDKey string) (userInfo *proto.UserInfo, err error)

func (*UserAPI) UidOperation added in v1.34.0

func (api *UserAPI) UidOperation(volName string, uid string, op uint32, val string) (uidInfo *proto.UidSpaceRsp, err error)

func (*UserAPI) UpdatePolicy added in v1.34.0

func (api *UserAPI) UpdatePolicy(param *proto.UserPermUpdateParam, clientIDKey string) (userInfo *proto.UserInfo, err error)

func (*UserAPI) UpdateUser added in v1.34.0

func (api *UserAPI) UpdateUser(param *proto.UserUpdateParam, clientIDKey string) (userInfo *proto.UserInfo, err error)

func (*UserAPI) WithHeader added in v1.34.0

func (api *UserAPI) WithHeader(key, val string) *UserAPI

Jump to

Keyboard shortcuts

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