kafka: github.com/optiopay/kafka/integration Index | Files

package integration

import "github.com/optiopay/kafka/integration"

Index

Package Files

cluster.go

type Container Uses

type Container struct {
    *docker.Container
    // contains filtered or unexported fields
}

func (*Container) Kill Uses

func (c *Container) Kill() error

func (*Container) RunningKafka Uses

func (c *Container) RunningKafka() bool

RunningKafka returns true if container is running kafka node

func (*Container) Start Uses

func (c *Container) Start() error

Start starts current container

func (*Container) Stop Uses

func (c *Container) Stop() error

Stop stops current container

type KafkaCluster Uses

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

func NewKafkaCluster Uses

func NewKafkaCluster(kafkaDockerDir string, size int) *KafkaCluster

func (*KafkaCluster) ContainerKill Uses

func (cluster *KafkaCluster) ContainerKill(containerID string) error

func (*KafkaCluster) ContainerNetworkIP Uses

func (cluster *KafkaCluster) ContainerNetworkIP(container Container, network string) (string, error)

func (*KafkaCluster) ContainerStart Uses

func (cluster *KafkaCluster) ContainerStart(containerID string) error

func (*KafkaCluster) ContainerStop Uses

func (cluster *KafkaCluster) ContainerStop(containerID string) error

func (*KafkaCluster) Containers Uses

func (cluster *KafkaCluster) Containers() ([]*Container, error)

Containers inspect all containers running within cluster and return information about them.

func (*KafkaCluster) KafkaAddrs Uses

func (cluster *KafkaCluster) KafkaAddrs() ([]string, error)

KafkaAddrs return list of kafka node addresses as strings, in form <host>:<port>

func (*KafkaCluster) Start Uses

func (cluster *KafkaCluster) Start() error

Start start zookeeper and kafka nodes using docker-compose command. Upon successful process spawn, cluster is scaled to required amount of nodes.

func (*KafkaCluster) Stop Uses

func (cluster *KafkaCluster) Stop() error

Stop stop all services running for the cluster by sending SIGINT to docker-compose process.

func (*KafkaCluster) WaitUntilReady Uses

func (cluster *KafkaCluster) WaitUntilReady() error

Package integration imports 9 packages (graph). Updated 2018-08-01. Refresh now. Tools for package owners.