Documentation ¶
Index ¶
- Variables
- func ConvertShardRoleToPB(role ShardRole) clusterpb.ShardRole
- type Cluster
- type ClusterID
- type ClusterState
- type ClusterView
- type CreateClusterRequest
- type CreateClusterViewRequest
- type CreateOrUpdateNodeRequest
- type CreateSchemaRequest
- type CreateShardViewsRequest
- type CreateTableRequest
- type DeleteTableRequest
- type GetClusterViewRequest
- type GetClusterViewResult
- type GetTableRequest
- type GetTableResult
- type ListClustersResult
- type ListNodesRequest
- type ListNodesResult
- type ListSchemasRequest
- type ListSchemasResult
- type ListShardViewsRequest
- type ListShardViewsResult
- type ListTableRequest
- type ListTablesResult
- type Node
- type NodeState
- type NodeStats
- type Options
- type PartitionInfo
- type Schema
- type SchemaID
- type ShardID
- type ShardNode
- type ShardRole
- type ShardView
- type Storage
- type Table
- type TableID
- type UpdateClusterViewRequest
- type UpdateShardViewRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEncode = coderr.NewCodeError(coderr.Internal, "storage encode") ErrDecode = coderr.NewCodeError(coderr.Internal, "storage decode") ErrCreateSchemaAgain = coderr.NewCodeError(coderr.Internal, "storage create schemas") ErrCreateClusterAgain = coderr.NewCodeError(coderr.Internal, "storage create cluster") ErrCreateClusterViewAgain = coderr.NewCodeError(coderr.Internal, "storage create cluster view") ErrUpdateClusterViewConflict = coderr.NewCodeError(coderr.Internal, "storage update cluster view") ErrCreateTableAgain = coderr.NewCodeError(coderr.Internal, "storage create tables") ErrDeleteTableAgain = coderr.NewCodeError(coderr.Internal, "storage delete table") ErrCreateShardViewAgain = coderr.NewCodeError(coderr.Internal, "storage create shard view") ErrUpdateShardViewConflict = coderr.NewCodeError(coderr.Internal, "storage update shard view") )
Functions ¶
func ConvertShardRoleToPB ¶ added in v1.0.0
Types ¶
type ClusterState ¶ added in v1.0.0
type ClusterState int
const ( ClusterStateEmpty ClusterState = iota + 1 ClusterStateStable )
type ClusterView ¶ added in v1.0.0
type ClusterView struct { ClusterID ClusterID Version uint64 State ClusterState ShardNodes []ShardNode CreatedAt uint64 }
type CreateClusterRequest ¶ added in v1.0.0
type CreateClusterRequest struct {
Cluster Cluster
}
type CreateClusterViewRequest ¶ added in v1.0.0
type CreateClusterViewRequest struct {
ClusterView ClusterView
}
type CreateOrUpdateNodeRequest ¶ added in v1.0.0
type CreateSchemaRequest ¶ added in v1.0.0
type CreateShardViewsRequest ¶ added in v1.0.0
type CreateTableRequest ¶ added in v1.0.0
type DeleteTableRequest ¶ added in v1.0.0
type GetClusterViewRequest ¶ added in v1.0.0
type GetClusterViewRequest struct {
ClusterID ClusterID
}
type GetClusterViewResult ¶ added in v1.0.0
type GetClusterViewResult struct {
ClusterView ClusterView
}
type GetTableRequest ¶ added in v1.0.0
type GetTableResult ¶ added in v1.0.0
type ListClustersResult ¶ added in v1.0.0
type ListClustersResult struct {
Clusters []Cluster
}
type ListNodesRequest ¶ added in v1.0.0
type ListNodesRequest struct {
ClusterID ClusterID
}
type ListNodesResult ¶ added in v1.0.0
type ListNodesResult struct {
Nodes []Node
}
type ListSchemasRequest ¶ added in v1.0.0
type ListSchemasRequest struct {
ClusterID ClusterID
}
type ListSchemasResult ¶ added in v1.0.0
type ListSchemasResult struct {
Schemas []Schema
}
type ListShardViewsRequest ¶ added in v1.0.0
type ListShardViewsResult ¶ added in v1.0.0
type ListShardViewsResult struct {
ShardViews []ShardView
}
type ListTableRequest ¶ added in v1.0.0
type ListTablesResult ¶ added in v1.0.0
type ListTablesResult struct {
Tables []Table
}
type PartitionInfo ¶ added in v1.0.0
type PartitionInfo struct {
Info *clusterpb.PartitionInfo
}
type Storage ¶
type Storage interface { // ListClusters list all clusters. ListClusters(ctx context.Context) (ListClustersResult, error) // CreateCluster create new cluster, return error if cluster already exists. CreateCluster(ctx context.Context, req CreateClusterRequest) error // CreateClusterView create cluster view. CreateClusterView(ctx context.Context, req CreateClusterViewRequest) error // GetClusterView get cluster view by cluster id. GetClusterView(ctx context.Context, req GetClusterViewRequest) (GetClusterViewResult, error) // UpdateClusterView update cluster view. UpdateClusterView(ctx context.Context, req UpdateClusterViewRequest) error // ListSchemas list all schemas in specified cluster. ListSchemas(ctx context.Context, req ListSchemasRequest) (ListSchemasResult, error) // CreateSchema create schema in specified cluster. CreateSchema(ctx context.Context, req CreateSchemaRequest) error // CreateTable create new table in specified cluster and schema, return error if table already exists. CreateTable(ctx context.Context, req CreateTableRequest) error // GetTable get table by table name in specified cluster and schema. GetTable(ctx context.Context, req GetTableRequest) (GetTableResult, error) // ListTables list all tables in specified cluster and schema. ListTables(ctx context.Context, req ListTableRequest) (ListTablesResult, error) // DeleteTable delete table by table name in specified cluster and schema. DeleteTable(ctx context.Context, req DeleteTableRequest) error // CreateShardViews create shard views in specified cluster. CreateShardViews(ctx context.Context, req CreateShardViewsRequest) error // ListShardViews list all shard views in specified cluster. ListShardViews(ctx context.Context, req ListShardViewsRequest) (ListShardViewsResult, error) // UpdateShardView update shard views in specified cluster. UpdateShardView(ctx context.Context, req UpdateShardViewRequest) error // ListNodes list all nodes in specified cluster. ListNodes(ctx context.Context, req ListNodesRequest) (ListNodesResult, error) // CreateOrUpdateNode create or update node in specified cluster. CreateOrUpdateNode(ctx context.Context, req CreateOrUpdateNodeRequest) error }
Storage defines the storage operations on the ceresdb cluster meta info.
type Table ¶ added in v1.0.0
type Table struct { ID TableID Name string SchemaID SchemaID CreatedAt uint64 PartitionInfo PartitionInfo }
func (Table) IsPartitioned ¶ added in v1.0.0
type UpdateClusterViewRequest ¶ added in v1.0.0
type UpdateClusterViewRequest struct { ClusterID ClusterID ClusterView ClusterView LatestVersion uint64 }
type UpdateShardViewRequest ¶ added in v1.0.0
Click to show internal directories.
Click to hide internal directories.