Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEncodeCluster = coderr.NewCodeError(coderr.Internal, "meta storage unmarshal cluster") ErrDecodeCluster = coderr.NewCodeError(coderr.Internal, "meta storage marshal cluster") ErrEncodeClusterTopology = coderr.NewCodeError(coderr.Internal, "meta storage unmarshal cluster topology") ErrDecodeClusterTopology = coderr.NewCodeError(coderr.Internal, "meta storage marshal cluster topology") ErrEncodeShardTopology = coderr.NewCodeError(coderr.Internal, "meta storage unmarshal shard topology") ErrDecodeShardTopology = coderr.NewCodeError(coderr.Internal, "meta storage marshal shard topology") ErrEncodeSchema = coderr.NewCodeError(coderr.Internal, "meta storage unmarshal schema") ErrDecodeSchema = coderr.NewCodeError(coderr.Internal, "meta storage marshal schema") ErrEncodeTable = coderr.NewCodeError(coderr.Internal, "meta storage unmarshal table") ErrDecodeTable = coderr.NewCodeError(coderr.Internal, "meta storage marshal table") ErrEncodeNode = coderr.NewCodeError(coderr.Internal, "meta storage unmarshal node") ErrDecodeNode = coderr.NewCodeError(coderr.Internal, "meta storage marshal node") ErrCreateSchemaAgain = coderr.NewCodeError(coderr.Internal, "meta storage create schemas") ErrCreateClusterAgain = coderr.NewCodeError(coderr.Internal, "meta storage create cluster") ErrCreateClusterTopologyAgain = coderr.NewCodeError(coderr.Internal, "meta storage create cluster topology") ErrPutClusterTopologyConflict = coderr.NewCodeError(coderr.Internal, "meta storage put cluster topology") ErrCreateTableAgain = coderr.NewCodeError(coderr.Internal, "meta storage create tables") ErrDeleteTableAgain = coderr.NewCodeError(coderr.Internal, "meta storage delete table") ErrCreateShardTopologyAgain = coderr.NewCodeError(coderr.Internal, "meta storage create shard topology") ErrPutShardTopologyConflict = coderr.NewCodeError(coderr.Internal, "meta storage put shard topology") )
Functions ¶
This section is empty.
Types ¶
type MetaStorage ¶
type MetaStorage interface {
ListClusters(ctx context.Context) ([]*clusterpb.Cluster, error)
CreateCluster(ctx context.Context, cluster *clusterpb.Cluster) (*clusterpb.Cluster, error)
CreateClusterTopology(ctx context.Context, clusterTopology *clusterpb.ClusterTopology) (*clusterpb.ClusterTopology, error)
GetClusterTopology(ctx context.Context, clusterID uint32) (*clusterpb.ClusterTopology, error)
PutClusterTopology(ctx context.Context, clusterID uint32, latestVersion uint64, clusterTopology *clusterpb.ClusterTopology) error
ListSchemas(ctx context.Context, clusterID uint32) ([]*clusterpb.Schema, error)
CreateSchema(ctx context.Context, clusterID uint32, schema *clusterpb.Schema) (*clusterpb.Schema, error)
CreateTable(ctx context.Context, clusterID uint32, schemaID uint32, table *clusterpb.Table) (*clusterpb.Table, error)
GetTable(ctx context.Context, clusterID uint32, schemaID uint32, tableName string) (*clusterpb.Table, bool, error)
ListTables(ctx context.Context, clusterID uint32, schemaID uint32) ([]*clusterpb.Table, error)
DeleteTable(ctx context.Context, clusterID uint32, schemaID uint32, tableName string) error
CreateShardTopologies(ctx context.Context, clusterID uint32, shardTopologies []*clusterpb.ShardTopology) ([]*clusterpb.ShardTopology, error)
ListShardTopologies(ctx context.Context, clusterID uint32, shardID []uint32) ([]*clusterpb.ShardTopology, error)
PutShardTopology(ctx context.Context, clusterID uint32, latestVersion uint64, shardTopology *clusterpb.ShardTopology) error
ListNodes(ctx context.Context, clusterID uint32) ([]*clusterpb.Node, error)
CreateOrUpdateNode(ctx context.Context, clusterID uint32, node *clusterpb.Node) (*clusterpb.Node, error)
}
MetaStorage defines the storage operations on the ceresdb cluster meta info.
type Storage ¶
type Storage interface {
MetaStorage
}
Storage is the interface for the backend storage of the ceresmeta.
Click to show internal directories.
Click to hide internal directories.