service

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerService

type BrokerService interface {
	RegisterBroker(context.Context, uint64, *model.Broker) (*model.Broker, error)
	GetBroker(context.Context, uint64) (*model.Broker, error)
	ShardInfoForPartitions(context.Context, []*model.Partition) (map[string]*model.ShardInfo, []*model.Broker, error)
}

type ConsumerService

type ConsumerService interface {
	Connect(
		_ context.Context,
		_ uint64,
		groupID string,
		brokerID string,
		topics []string,
	) (
		*model.Consumer,
		*model.ConsumerGroup,
		error,
	)
	HealthCheck(context.Context, uint64, string, int64) (*model.Consumer, error)
	GetConsumer(context.Context, string) (*model.Consumer, error)
	UpdateConsumer(context.Context, uint64, *model.Consumer) (*model.Consumer, error)
	AllConsumers(context.Context) ([]*model.Consumer, error)
	Disconnect(context.Context, uint64, string) error
}

type MessageService

type MessageService interface {
	AppendMessage(context.Context, uint64, *model.Message) error
	Poll(context.Context, string, string) (*model.Message, error)
	AckMessage(context.Context, uint64, string, *model.Message) error
	Close(context.Context) error
	Open(context.Context) error
	RecoverFromSnapshot(context.Context, io.Reader) error
	Snapshot(context.Context, io.Writer) error
	LastAppliedCommandID(ctx context.Context, shardID uint64) (uint64, error)
}

type TopicService

type TopicService interface {
	CreateTopic(context.Context, uint64, string, uint64, uint64) (*model.Topic, error)
	LastAppliedCommandID(context.Context, uint64) (uint64, error)
	GetTopic(context.Context, string) (*model.Topic, error)
	AllTopics(context.Context) ([]*model.Topic, error)
	AllPartitions(context.Context) ([]*model.Partition, error)
	GetPartitions(context.Context, string) ([]*model.Partition, error)
	GetPartition(context.Context, string) (*model.Partition, error)
	PartitionID(context.Context, *model.Message) (string, error)
	UpdatePartition(context.Context, uint64, string, *model.Partition) error
	Snapshot(context.Context, io.Writer) error
	RecoverFromSnapshot(context.Context, io.Reader) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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