Documentation
¶
Index ¶
- Variables
- type CfgConfig
- type CfgRing
- type Cluster
- func (c *Cluster) AddBackend(k1, k2 string, s articlestore.Storage)
- func (c *Cluster) Create(n *cluster.Node)
- func (c *Cluster) Delete(n *cluster.Node)
- func (c *Cluster) Init()
- func (c *Cluster) Lookup(K1, K2 []byte) articlestore.Storage
- func (c *Cluster) Metadata(limit int) []byte
- func (c *Cluster) SetConfig(cfg *CfgConfig)
- func (c *Cluster) StoreReadMessage(id []byte, over, head, body bool) (bufferex.Binary, error)
- func (c *Cluster) StoreWriteMessage(id, msg []byte, expire uint64) error
- func (c *Cluster) Update(n *cluster.Node)
- func (c *Cluster) ValidateAll(nn []cluster.Node) bool
- type ClusterMetadata
- type ClusterNodeRecord
- type Ring
- type RingSet
- type Storage
- type StorageMM
Constants ¶
This section is empty.
Variables ¶
View Source
var Unimpl articlestore.Storage = unimpl{}
A None-Object.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { Records map[string]*ClusterNodeRecord Master StorageMM RingMM StorageMM RingSt *RingSet Config *CfgConfig LocalMeta ClusterMetadata // contains filtered or unexported fields }
func (*Cluster) AddBackend ¶
func (c *Cluster) AddBackend(k1, k2 string, s articlestore.Storage)
func (*Cluster) StoreReadMessage ¶
func (*Cluster) StoreWriteMessage ¶
type ClusterMetadata ¶
type ClusterMetadata struct { Port int `msgpack:"port"` UserPort int `msgpack:"userport"` Stores [][2]string `msgpack:"shard"` }
func (*ClusterMetadata) Encode ¶
func (c *ClusterMetadata) Encode() []byte
type ClusterNodeRecord ¶
type ClusterNodeRecord struct { Node cluster.Node Info ClusterMetadata Cli *fastrpc.Client }
type Ring ¶
func (*Ring) StoreReadMessage ¶
type Storage ¶
type Storage struct { articlestore.Storage Class uint }
func MakeStorage ¶
func MakeStorage() *Storage
Click to show internal directories.
Click to hide internal directories.