kafeman

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoTopic = errors.New("No topic in cluster")
View Source
var ErrNoTopicProvided = errors.New("No topic provided")

Functions

func Newkafeman

func Newkafeman(config *config.Configuration) *kafeman

Types

type AddConfigRecordCommand

type AddConfigRecordCommand struct {
	Topic, Key, Value string
}

type ConsumeCommand

type ConsumeCommand struct {
	Topic          string
	ConsumerGroup  string
	Partitions     []int32
	CommitMessages bool
	Offset         int64
	Follow         bool
	WithMeta       bool
	MessagesCount  int32
	FromTime       time.Time
	ToTime         time.Time
	Decoder        Decoder
}

type CreateTopicCommand

type CreateTopicCommand struct {
	TopicName         string
	PartitionsCount   int32
	ReplicationFactor int16
	CleanupPolicy     string
}

type Decoder

type Decoder interface {
	Decode([]byte) ([]byte, error)
}

Encoder declare how to encode message

type Encoder

type Encoder interface {
	Encode([]byte) ([]byte, error)
}

Encoder declare how to encode message

type GroupInfo

type GroupInfo struct {
	Name      string
	State     string
	Consumers int
}

type ProduceCommand

type ProduceCommand struct {
	Topic       string
	Partition   int32
	Partitioner string
	BufferSize  int
	Input       io.Reader
	Output      io.Writer
	Encoder     Encoder
}

type ReplicateCMD

type ReplicateCMD struct {
	SourceTopic  string
	SourceBroker string
	DestTopic    string
	DestBroker   string

	Partition   int32
	Partitioner string

	ConsumePartitions []int32
	CommitMessages    bool
	Offset            int64
	Follow            bool
	WithMeta          bool
	MessagesCount     int32
	FromTime          time.Time
	ToTime            time.Time
	ConsumerGroup     string
}

type SetConfigValueTopicCommand

type SetConfigValueTopicCommand struct {
	Topic  string
	Values map[string]string
}

type UpdateTopicCommand

type UpdateTopicCommand struct {
	Topic           string
	PartitionsCount int32
	// partiton -> offset
	Assignments [][]int32
}

Jump to

Keyboard shortcuts

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