Documentation ¶
Index ¶
- Constants
- Variables
- type Agent
- type AgentManager
- type Fn
- type MetaInterface
- type Option
- func ClientOptions(nc *v1alpha1.NebulaCluster, opts ...Option) ([]Option, error)
- func SetClusterTLS(e bool) Option
- func SetIsMeta(e bool) Option
- func SetIsStorage(e bool) Option
- func SetMetaTLS(e bool) Option
- func SetOptions(options Options) Option
- func SetStorageTLS(e bool) Option
- func SetTLSConfig(config *tls.Config) Option
- func SetTimeout(duration time.Duration) Option
- type Options
- type StorageInterface
Constants ¶
View Source
const DefaultTimeout = 10 * time.Second
Variables ¶
View Source
var ( ErrNoAvailableMetadEndpoints = errors.New("metadclient: no available hosts") ErrJobStatusFailed = errors.New("job status failed") )
View Source
var ErrNoAvailableStoragedEndpoints = errors.New("storagedclient: no available endpoints")
Functions ¶
This section is empty.
Types ¶
type Agent ¶ added in v1.4.0
type Agent struct {
agentclient.Client
}
type AgentManager ¶ added in v1.4.0
type AgentManager struct {
// contains filtered or unexported fields
}
func NewAgentManager ¶ added in v1.4.0
func NewAgentManager() *AgentManager
func (*AgentManager) Close ¶ added in v1.8.0
func (a *AgentManager) Close()
type MetaInterface ¶
type MetaInterface interface { GetSpace(spaceName []byte) (*meta.SpaceItem, error) DropSpace(spaceName []byte) error ListSpaces() ([]*meta.IdName, error) ListCluster() (*meta.ListClusterInfoResp, error) AddHosts(hosts []*nebula.HostAddr) error AddHostsIntoZone(hosts []*nebula.HostAddr, zone string) error DropHosts(hosts []*nebula.HostAddr) error ListHosts(hostType meta.ListHostType) ([]*meta.HostItem, error) ListParts(spaceID nebula.GraphSpaceID, partIDs []nebula.PartitionID) ([]*meta.PartItem, error) GetSpaceParts() (map[nebula.GraphSpaceID][]*meta.PartItem, error) GetSpaceLeaderHosts(space []byte) ([]string, error) GetLeaderCount(leaderHost string) (int, error) BalanceStatus(jobID int32, spaceID nebula.GraphSpaceID) error IsLeaderBalanced(spaceName []byte) (bool, error) BalanceLeader(spaceID nebula.GraphSpaceID) error BalanceData(spaceID nebula.GraphSpaceID) (int32, error) BalanceDataInZone(spaceID nebula.GraphSpaceID) (int32, error) RemoveHost(spaceID nebula.GraphSpaceID, hosts []*nebula.HostAddr) (int32, error) RemoveHostInZone(spaceID nebula.GraphSpaceID, hosts []*nebula.HostAddr) (int32, error) RecoverDataBalanceJob(jobID int32, spaceID nebula.GraphSpaceID) error RecoverInZoneBalanceJob(jobID int32, spaceID nebula.GraphSpaceID) error RestoreMeta(hosts []*meta.HostPair, files []string) (*meta.RestoreMetaResp, error) Disconnect() error }
func NewMetaClient ¶
func NewMetaClient(hosts []string, options ...Option) (MetaInterface, error)
type Option ¶
type Option func(ops *Options)
func ClientOptions ¶ added in v1.5.0
func ClientOptions(nc *v1alpha1.NebulaCluster, opts ...Option) ([]Option, error)
func SetClusterTLS ¶ added in v1.5.0
func SetIsStorage ¶ added in v1.5.0
func SetMetaTLS ¶ added in v1.5.0
func SetOptions ¶ added in v1.5.0
func SetStorageTLS ¶ added in v1.6.2
func SetTLSConfig ¶ added in v1.5.0
func SetTimeout ¶ added in v1.5.0
type StorageInterface ¶
type StorageInterface interface { TransLeader(spaceID nebula.GraphSpaceID, partID nebula.PartitionID, newLeader *nebula.HostAddr) (error, string) RemovePart(spaceID nebula.GraphSpaceID, partID nebula.PartitionID) error GetLeaderParts() (map[nebula.GraphSpaceID][]nebula.PartitionID, error) Disconnect() error }
func NewStorageClient ¶
func NewStorageClient(endpoints []string, options ...Option) (StorageInterface, error)
Click to show internal directories.
Click to hide internal directories.