Documentation ¶
Index ¶
- type Container
- type KafkaCluster
- func (cluster *KafkaCluster) ContainerKill(containerID 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
- type PortMapping
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { ID string `json:"Id"` Image string Args []string Config struct { Cmd []string Env []string ExposedPorts map[string]interface{} } NetworkSettings struct { Gateway string IPAddress string Ports map[string][]PortMapping } // 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) 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.
type PortMapping ¶
Click to show internal directories.
Click to hide internal directories.