Documentation ¶
Overview ¶
Package kayak implements a configurable consistency consensus middleware.
Index ¶
- type Caller
- type NewCallerFunc
- type Runtime
- func (r *Runtime) Apply(ctx context.Context, req interface{}) (result interface{}, logIndex uint64, err error)
- func (r *Runtime) Fetch(ctx context.Context, index uint64) (l *kt.Log, err error)
- func (r *Runtime) FollowerApply(l *kt.Log) (err error)
- func (r *Runtime) Shutdown() (err error)
- func (r *Runtime) Start() (err error)
- func (r *Runtime) UpdatePeers(peers *proto.Peers) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NewCallerFunc ¶
NewCallerFunc defines the function type to return a Caller object.
type Runtime ¶
type Runtime struct { /// RPC related // new caller functions: wrap for mocking testable purpose. TrackerNewCallerFunc NewCallerFunc WaiterNewCallerFunc NewCallerFunc // contains filtered or unexported fields }
Runtime defines the main kayak Runtime.
func NewRuntime ¶
func NewRuntime(cfg *kt.RuntimeConfig) (rt *Runtime, err error)
NewRuntime creates new kayak Runtime.
func (*Runtime) Apply ¶
func (r *Runtime) Apply(ctx context.Context, req interface{}) (result interface{}, logIndex uint64, err error)
Apply defines entry for Leader node.
func (*Runtime) FollowerApply ¶
FollowerApply defines entry for follower node.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.