Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeInt ¶
DecodeInt decodes value encoded by EncodeInt before. It returns the leftover un-decoded slice, decoded value if no error.
func NewTableNamespaceClassifier ¶
func NewTableNamespaceClassifier(kv *core.KV, idAlloc core.IDAllocator) (namespace.Classifier, error)
NewTableNamespaceClassifier creates a new namespace classifier that classifies stores and regions by table range.
Types ¶
type Namespace ¶
type Namespace struct { ID uint64 `json:"ID"` Name string `json:"Name"` TableIDs map[int64]bool `json:"table_ids,omitempty"` StoreIDs map[uint64]bool `json:"store_ids,omitempty"` Meta bool `json:"meta,omitempty"` }
Namespace defines two things: 1. relation between a Name and several tables 2. relation between a Name and several stores It is used to bind tables with stores
func NewNamespace ¶
NewNamespace creates a new namespace
func (*Namespace) AddStoreID ¶
AddStoreID adds a storeID to this namespace
func (*Namespace) AddTableID ¶
AddTableID adds a tableID to this namespace
Click to show internal directories.
Click to hide internal directories.