distributed

package
v0.0.0-...-724c7a8 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: EUPL-1.2 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

Context is a cluster-wide shared, distributed context.

func NewContext

func NewContext(l logging.Logger) *Context

func (*Context) Apply

func (c *Context) Apply(l *raft.Log) interface{}

func (*Context) Restore

func (c *Context) Restore(r io.ReadCloser) error

func (*Context) Snapshot

func (c *Context) Snapshot() (raft.FSMSnapshot, error)

type Message

type Message struct {
	Type   Type     `json:"type"`
	Key    string   `json:"key,omitempty"`
	Value  []byte   `json:"value,omitempty"`
	Filter string   `json:"filter,omitempty"`
	Keys   []string `json:"keys,omitempty"`
	Index  uint64   `json:"index,omitempty"`
}

type RPCInterface

type RPCInterface struct {
	proto.UnimplementedContextServer
	// contains filtered or unexported fields
}

func NewRPCInterface

func NewRPCInterface(c *Context, r *raft.Raft, l logging.Logger) *RPCInterface

func (RPCInterface) Clear

func (RPCInterface) Get

func (RPCInterface) List

func (RPCInterface) Remove

func (RPCInterface) Set

type Snapshot

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

func (*Snapshot) Persist

func (s *Snapshot) Persist(sink raft.SnapshotSink) error

func (*Snapshot) Release

func (s *Snapshot) Release()

type Type

type Type int8
const (
	Get Type = iota
	Set
	Remove
	List
	Clear
)

func (Type) String

func (t Type) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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