kafkadocker

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBrokerAlreadyStarted is returned when a broker is started more than once.
	ErrBrokerAlreadyStarted = errors.New("broker already started")
	// ErrBrokerWasNotStarted is returned when a broker is stopped before it is started.
	ErrBrokerWasNotStarted = errors.New("broker was not started")
	// ErrBrokerNotConnected is returned when a broker is not connected.
	ErrBrokerNotConnected = errors.New("broker not connected")
)

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Brokers     int      // For specifying the number of brokers to start.
	Topics      []string // For specifying the topics to create.
	HealthProbe bool
	// contains filtered or unexported fields
}

Cluster represents a Kafka cluster.

func (*Cluster) BrokerAddresses

func (c *Cluster) BrokerAddresses() []string

BrokerAddresses returns the addresses of the brokers in the cluster.

func (*Cluster) Start

func (c *Cluster) Start(ctx context.Context) error

Start creates the containers and the network for the cluster. nolint: gocognit, gocyclo

func (*Cluster) Stop

func (c *Cluster) Stop(ctx context.Context) error

Stop removes all the containers and the network concerning the cluster. nolint: gocognit, gocyclo

Jump to

Keyboard shortcuts

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