raft_service

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

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

func (*Event) All

func (e *Event) All() map[string]map[string][]byte

func (*Event) Data

func (e *Event) Data() []byte

func (*Event) Event

func (e *Event) Event() string

func (*Event) Key

func (e *Event) Key() string

func (*Event) Namespace

func (e *Event) Namespace() string

type InitOp

type InitOp func(map[string]map[string][]byte) map[string]map[string][]byte

type Service

type Service struct {
	dispatcher.IDispatchCenter
	// contains filtered or unexported fields
}

func NewService

func NewService(ops ...InitOp) *Service

func (*Service) Commit

func (s *Service) Commit(command string, namespace string, key string, data []byte) (err error)

func (*Service) GetInit

func (s *Service) GetInit() ([]byte, error)

func (*Service) GetSnapshot

func (s *Service) GetSnapshot() ([]byte, error)

func (*Service) ResetSnap

func (s *Service) ResetSnap(data []byte, isInit bool) error

Jump to

Keyboard shortcuts

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