CovenantSQL: Index | Files | Directories

package kayak

import ""

Package kayak implements a configurable consistency consensus middleware.


Package Files

callbacks.go caller.go commit.go doc.go log.go processes.go rpc.go runtime.go tracker.go utils.go waiter.go

type Caller Uses

type Caller interface {
    Call(method string, req interface{}, resp interface{}) error

Caller defines the rpc caller, supports mocks for the default rpc.PersistCaller.

type Runtime Uses

type Runtime struct {
    // contains filtered or unexported fields

Runtime defines the main kayak Runtime.

func NewRuntime Uses

func NewRuntime(cfg *kt.RuntimeConfig) (rt *Runtime, err error)

NewRuntime creates new kayak Runtime.

func (*Runtime) Apply Uses

func (r *Runtime) Apply(ctx context.Context, req interface{}) (result interface{}, logIndex uint64, err error)

Apply defines entry for Leader node.

func (*Runtime) Fetch Uses

func (r *Runtime) Fetch(ctx context.Context, index uint64) (l *kt.Log, err error)

Fetch defines entry for missing log startFetch.

func (*Runtime) FollowerApply Uses

func (r *Runtime) FollowerApply(l *kt.Log) (err error)

FollowerApply defines entry for follower node.

func (*Runtime) Shutdown Uses

func (r *Runtime) Shutdown() (err error)

Shutdown waits for the Runtime to stop.

func (*Runtime) Start Uses

func (r *Runtime) Start() (err error)

Start starts the Runtime.

func (*Runtime) UpdatePeers Uses

func (r *Runtime) UpdatePeers(peers *proto.Peers) (err error)

UpdatePeers defines entry for peers update logic.


typesPackage types defines required types of kayak.
walPackage wal defines toy implementations of kayak wal.

Package kayak imports 15 packages (graph) and is imported by 2 packages. Updated 2019-05-14. Refresh now. Tools for package owners.