Documentation ¶
Index ¶
- Constants
- type Config
- type CoreDB
- type DistributedLog
- func (l *DistributedLog) Close() error
- func (l *DistributedLog) Get(key string) (*api.Record, error)
- func (l *DistributedLog) GetServers(ctx context.Context) ([]*api.Server, error)
- func (l *DistributedLog) Join(id, addr string, voter bool) error
- func (l *DistributedLog) Leave(id string) error
- func (l *DistributedLog) Set(record *api.Record) (string, error)
- func (l *DistributedLog) WaitForLeader(timeout time.Duration) error
- type Entry
- type FMetadata
- type Log
- func (l *Log) Close() error
- func (l *Log) Delete(key string) error
- func (l *Log) ExistKeyWith(prefix []byte, neq []byte) (bool, error)
- func (l *Log) FindBy(field, expression string) ([]badger.Item, error)
- func (l *Log) Get(key string) (*api.Record, error)
- func (l *Log) Insert(item badger.Item) error
- func (l *Log) Set(record *api.Record) (string, error)
- type OTx
- type RequestType
- type StoreDB
- type StreamLayer
- type TxMetadata
Constants ¶
View Source
const RaftRPC = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoreDB ¶
type CoreDB interface { Insert(item badger.Item) error FindBy(field, expression string) ([]badger.Item, error) }
This interface hold the functions that help to manage the cluster database
type DistributedLog ¶
type DistributedLog struct {
// contains filtered or unexported fields
}
func NewDistributedLog ¶
func NewDistributedLog(dataDir string, config Config) ( *DistributedLog, error, )
func (*DistributedLog) Close ¶
func (l *DistributedLog) Close() error
func (*DistributedLog) Get ¶
func (l *DistributedLog) Get(key string) (*api.Record, error)
Commitlog implementation
func (*DistributedLog) GetServers ¶
IMplement here the object
func (*DistributedLog) Leave ¶
func (l *DistributedLog) Leave(id string) error
Membership handler implemetation
func (*DistributedLog) Set ¶
func (l *DistributedLog) Set(record *api.Record) (string, error)
Commitlog implementation
func (*DistributedLog) WaitForLeader ¶
func (l *DistributedLog) WaitForLeader(timeout time.Duration) error
type StreamLayer ¶
type StreamLayer struct {
// contains filtered or unexported fields
}
func NewStreamLayer ¶
func NewStreamLayer( ln net.Listener, ) *StreamLayer
func (*StreamLayer) Addr ¶
func (s *StreamLayer) Addr() net.Addr
func (*StreamLayer) Close ¶
func (s *StreamLayer) Close() error
func (*StreamLayer) Dial ¶
func (s *StreamLayer) Dial( addr raft.ServerAddress, timeout time.Duration, ) (net.Conn, error)
type TxMetadata ¶
type TxMetadata struct { }
Click to show internal directories.
Click to hide internal directories.