Documentation
¶
Index ¶
- Constants
- type Cluster
- func (c *Cluster) GetMetadata() *metadata.ClusterMetadata
- func (c *Cluster) GetProcedureFactory() *coordinator.Factory
- func (c *Cluster) GetProcedureManager() procedure.Manager
- func (c *Cluster) GetSchedulerManager() manager.SchedulerManager
- func (c *Cluster) GetShardNodes() metadata.GetShardNodesResult
- func (c *Cluster) GetShards() []storage.ShardID
- func (c *Cluster) Start(ctx context.Context) error
- func (c *Cluster) Stop(ctx context.Context) error
- type Manager
Constants ¶
View Source
const (
AllocClusterIDPrefix = "ClusterID"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func NewCluster ¶
func (*Cluster) GetMetadata ¶ added in v1.2.0
func (c *Cluster) GetMetadata() *metadata.ClusterMetadata
func (*Cluster) GetProcedureFactory ¶ added in v1.2.0
func (c *Cluster) GetProcedureFactory() *coordinator.Factory
func (*Cluster) GetProcedureManager ¶ added in v1.2.0
func (*Cluster) GetSchedulerManager ¶ added in v1.2.0
func (c *Cluster) GetSchedulerManager() manager.SchedulerManager
func (*Cluster) GetShardNodes ¶ added in v1.2.7
func (c *Cluster) GetShardNodes() metadata.GetShardNodesResult
type Manager ¶
type Manager interface {
// Start must be called before manager is used.
Start(ctx context.Context) error
// Stop must be called before manager is dropped.
Stop(ctx context.Context) error
ListClusters(ctx context.Context) ([]*Cluster, error)
CreateCluster(ctx context.Context, clusterName string, opts metadata.CreateClusterOpts) (*Cluster, error)
UpdateCluster(ctx context.Context, clusterName string, opt metadata.UpdateClusterOpts) error
GetCluster(ctx context.Context, clusterName string) (*Cluster, error)
// AllocSchemaID means get or create schema.
// The second output parameter bool: Returns true if the table was newly created.
AllocSchemaID(ctx context.Context, clusterName, schemaName string) (storage.SchemaID, bool, error)
GetTables(clusterName, schemaName string, tableNames []string) ([]metadata.TableInfo, error)
GetTablesByIDs(clusterName string, tableID []storage.TableID) ([]metadata.TableInfo, error)
GetTablesByShardIDs(clusterName, nodeName string, shardIDs []storage.ShardID) (map[storage.ShardID]metadata.ShardTables, error)
DropTable(ctx context.Context, clusterName, schemaName, tableName string) error
RouteTables(ctx context.Context, clusterName, schemaName string, tableNames []string) (metadata.RouteTablesResult, error)
GetNodeShards(ctx context.Context, clusterName string) (metadata.GetNodeShardsResult, error)
RegisterNode(ctx context.Context, clusterName string, registeredNode metadata.RegisteredNode) error
GetRegisteredNode(ctx context.Context, clusterName string, node string) (metadata.RegisteredNode, error)
ListRegisteredNodes(ctx context.Context, clusterName string) ([]metadata.RegisteredNode, error)
}
Click to show internal directories.
Click to hide internal directories.