utils

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: 7 Imported by: 4

Documentation

Index

Constants

View Source
const (
	VDebug glog.Level = iota
	VDump
)

Variables

This section is empty.

Functions

func GenLogID

func GenLogID() string

GenLogID generate a unique log id for tracing

func MinInt32

func MinInt32(x, y int32) int32

Types

type ClientEnd

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

ClientEnd implements pb.RaftClient TODO: delete this, use pb.RaftClient directly

func MakeClientEnd

func MakeClientEnd(server string) *ClientEnd

func (*ClientEnd) AppendEntries

func (c *ClientEnd) AppendEntries(ctx context.Context, req *pb.AppendEntriesReq) (*pb.AppendEntriesRes, error)

func (*ClientEnd) RequestVote

func (c *ClientEnd) RequestVote(ctx context.Context, req *pb.RequestVoteReq) (*pb.RequestVoteRes, error)

Jump to

Keyboard shortcuts

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