Documentation ¶
Index ¶
- type NodeState
- func (f *NodeState) Ack(request *pb.Ack) (interface{}, error)
- func (f *NodeState) AddMember(req *pb.AddMember) (interface{}, error)
- func (f *NodeState) Apply(l *raft.Log) interface{}
- func (f *NodeState) Consume(req *pb.ConsumeRequest) (*pb.ConsumeResponse, error)
- func (f *NodeState) CreateConsumerGroup(req *pb.CreateConsumerGroup) (interface{}, error)
- func (f *NodeState) CreatePartition(partitionNum uint64, topic string) *pb.Partition
- func (f *NodeState) CreateTopic(req *pb.CreateTopic) (interface{}, error)
- func (f *NodeState) GetConsumerGroups(topic string) (*pb.GetConsumerGroupsResponse, error)
- func (f *NodeState) GetMeta() (*proto.GetMetaResponse, error)
- func (f *NodeState) Persist(sink raft.SnapshotSink) error
- func (f *NodeState) Publish(req *pb.Publish, raftIndex uint64) (interface{}, error)
- func (f *NodeState) Release()
- func (f *NodeState) RemoveMember(req *pb.RemoveMember) (interface{}, error)
- func (f *NodeState) Restore(r io.ReadCloser) error
- func (f *NodeState) Snapshot() (raft.FSMSnapshot, error)
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) 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 (*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) RemoveMember ¶
func (f *NodeState) RemoveMember(req *pb.RemoveMember) (interface{}, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.