fsm

package
v0.0.0-...-3d1347b Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeState

type NodeState struct {
	MetaStore    *badger.DB
	MessageStore *badger.DB
	HandlerMap   []func(f *NodeState, op *pb.WriteOperation, l *raft.Log) interface{}
	ShardState   *cluster.ShardState
	Logger       *zerolog.Logger
}

func (*NodeState) Ack

func (f *NodeState) Ack(request *pb.Ack) (interface{}, error)

func (*NodeState) AddMember

func (f *NodeState) AddMember(req *pb.AddMember) (interface{}, error)

func (*NodeState) Apply

func (f *NodeState) Apply(l *raft.Log) interface{}

func (*NodeState) Consume

func (f *NodeState) Consume(req *pb.ConsumeRequest) (*pb.ConsumeResponse, error)

Consume operation, should be done in replicas and not in fsm

func (*NodeState) CreateConsumerGroup

func (f *NodeState) CreateConsumerGroup(req *pb.CreateConsumerGroup) (interface{}, error)

CreateConsumerGroup write operation, done in fsm

func (*NodeState) CreatePartition

func (f *NodeState) CreatePartition(partitionNum uint64, topic string) *pb.Partition

func (*NodeState) CreateTopic

func (f *NodeState) CreateTopic(req *pb.CreateTopic) (interface{}, error)

func (*NodeState) GetConsumerGroups

func (f *NodeState) GetConsumerGroups(topic string) (*pb.GetConsumerGroupsResponse, error)

func (*NodeState) GetMeta

func (f *NodeState) GetMeta() (*proto.GetMetaResponse, error)

func (*NodeState) Persist

func (f *NodeState) Persist(sink raft.SnapshotSink) error

func (*NodeState) Publish

func (f *NodeState) Publish(req *pb.Publish, raftIndex uint64) (interface{}, error)

func (*NodeState) Release

func (f *NodeState) Release()

func (*NodeState) RemoveMember

func (f *NodeState) RemoveMember(req *pb.RemoveMember) (interface{}, error)

func (*NodeState) Restore

func (f *NodeState) Restore(r io.ReadCloser) error

func (*NodeState) Snapshot

func (f *NodeState) Snapshot() (raft.FSMSnapshot, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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