topic

package
v0.0.0-...-28b0f05 Latest Latest
Warning

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

Go to latest
Published: May 30, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Topic

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

Topic provides kafka-topic management functions.

func New

func New(v string, brk []string) (*Topic, error)

New to create a new Topic

func NewWithClusterAdmin

func NewWithClusterAdmin(admin sarama.ClusterAdmin) *Topic

NewWithClusterAdmin to create new Topic with already created ClusterAdmin

func (*Topic) CreateTopic

func (t *Topic) CreateTopic(topic string, pc int32, rc int16) (err error)

CreateTopic creates a new Topic in Kafka

func (*Topic) DeleteTopic

func (t *Topic) DeleteTopic(topic string) (err error)

DeleteTopic deletes a Topic in Kafka

func (*Topic) GetAllTopics

func (t *Topic) GetAllTopics() ([]string, error)

GetAllTopics fetches all topic names that are created in Kafka

func (*Topic) IsTopicAlreadyCreated

func (t *Topic) IsTopicAlreadyCreated(topic string) (exists bool, err error)

IsTopicAlreadyCreated checks if topic is already created in Kafka

Jump to

Keyboard shortcuts

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