raftproxy

package
v0.1.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2020 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RaftCache

type RaftCache interface {
	raft.FSM
	cache.UnImplementedCache
	OpenRaft(storage string) error
}

type RaftProxy

type RaftProxy struct {
	Imp cache.UnImplementedCache

	RaftCache
	// contains filtered or unexported fields
}

func NewRaftProxy

func NewRaftProxy(imp cache.UnImplementedCache, raftAddr, joinAddr, localId string) *RaftProxy

func (*RaftProxy) Delete

func (c *RaftProxy) Delete(key string) (ok bool)

func (*RaftProxy) Get

func (c *RaftProxy) Get(key string) (value string, ok bool)

func (*RaftProxy) Join

func (c *RaftProxy) Join(nodeID, addr string) error

Join joins a node, identified by nodeID and located at addr, to this store. The node must be ready to respond to Raft communications at that address.

func (*RaftProxy) OpenRaft

func (c *RaftProxy) OpenRaft(storage string) error

func (*RaftProxy) Put

func (c *RaftProxy) Put(key string, value string) (created bool)

Put updates or insert a new entry, evicts the old entry if cache size is larger than capacity

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL