Documentation ¶
Index ¶
- type Container
- type KafkaCluster
- func (cluster *KafkaCluster) ContainerKill(containerID string) error
- func (cluster *KafkaCluster) ContainerNetworkIP(container Container, network string) (string, error)
- func (cluster *KafkaCluster) ContainerStart(containerID string) error
- func (cluster *KafkaCluster) ContainerStop(containerID string) error
- func (cluster *KafkaCluster) Containers() ([]*Container, error)
- func (cluster *KafkaCluster) KafkaAddrs() ([]string, error)
- func (cluster *KafkaCluster) Start() error
- func (cluster *KafkaCluster) Stop() error
- func (cluster *KafkaCluster) WaitUntilReady() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { *docker.Container // contains filtered or unexported fields }
func (*Container) RunningKafka ¶
RunningKafka returns true if container is running kafka node
type KafkaCluster ¶
type KafkaCluster struct {
// contains filtered or unexported fields
}
func NewKafkaCluster ¶
func NewKafkaCluster(kafkaDockerDir string, size int) *KafkaCluster
func (*KafkaCluster) ContainerKill ¶
func (cluster *KafkaCluster) ContainerKill(containerID string) error
func (*KafkaCluster) ContainerNetworkIP ¶
func (cluster *KafkaCluster) ContainerNetworkIP(container Container, network string) (string, error)
func (*KafkaCluster) ContainerStart ¶
func (cluster *KafkaCluster) ContainerStart(containerID string) error
func (*KafkaCluster) ContainerStop ¶
func (cluster *KafkaCluster) ContainerStop(containerID string) error
func (*KafkaCluster) Containers ¶
func (cluster *KafkaCluster) Containers() ([]*Container, error)
Containers inspect all containers running within cluster and return information about them.
func (*KafkaCluster) KafkaAddrs ¶
func (cluster *KafkaCluster) KafkaAddrs() ([]string, error)
KafkaAddrs return list of kafka node addresses as strings, in form <host>:<port>
func (*KafkaCluster) Start ¶
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 ¶
func (cluster *KafkaCluster) Stop() error
Stop stop all services running for the cluster by sending SIGINT to docker-compose process.
func (*KafkaCluster) WaitUntilReady ¶
func (cluster *KafkaCluster) WaitUntilReady() error
Click to show internal directories.
Click to hide internal directories.