raftkv

package
v0.0.0-...-a5b6b36 Latest Latest
Warning

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

Go to latest
Published: May 11, 2017 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OpTimeout   time.Duration
	StoragePath string
)

flags

Functions

This section is empty.

Types

type RaftKV

type RaftKV struct {
	// contains filtered or unexported fields
}

RaftKV consist of: KVStorage, Raft, SessionManager

func StartRaftKV

func StartRaftKV(rpcServer *grpc.Server, servers []*utils.ClientEnd, me int) *RaftKV

func (*RaftKV) Get

func (kv *RaftKV) Get(ctx context.Context, req *pb.GetReq) (*pb.GetRes, error)

Get rpc interface get a value associated with specified key

func (*RaftKV) Kill

func (kv *RaftKV) Kill()

func (*RaftKV) OpenSession

func (kv *RaftKV) OpenSession(ctx context.Context, req *pb.OpenSessionReq) (*pb.OpenSessionRes, error)

OpenSession rpc interface

func (*RaftKV) Put

func (kv *RaftKV) Put(ctx context.Context, req *pb.PutReq) (*pb.PutRes, error)

Put rpc interface

func (*RaftKV) String

func (kv *RaftKV) String() string

Jump to

Keyboard shortcuts

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