Documentation ¶
Index ¶
Constants ¶
View Source
const ( // KafkaService const KafkaService = "kafka" // KafkaPort const KafkaPort = "9092" // KafkaDockerImage const KafkaDockerImage = "confluentinc/cp-kafka" // KafkaDockerVersion const KafkaDockerVersion = "latest" // KafkaRestartPolicy const KafkaRestartPolicy = "unless-stopped" // ZookeeperDockerImage const ZookeeperDockerImage = "confluentinc/cp-zookeeper" // ZookeeperDockerVersion const ZookeeperDockerVersion = "latest" // ZookeeperRestartPolicy const ZookeeperRestartPolicy = "unless-stopped" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DockerComposeConfig ¶
type DockerComposeConfig struct { Version string `yaml:"version"` Services map[string]Service `yaml:"services"` Networks map[string]string `yaml:"networks,omitempty"` Volumes map[string]string `yaml:"volumes,omitempty"` }
DockerComposeConfig type
func GetKafkaConfig ¶
func GetKafkaConfig(zookeeperVersion, kafkaVersion, port string) DockerComposeConfig
GetKafkaConfig gets yaml definition object
func (*DockerComposeConfig) ToString ¶
func (d *DockerComposeConfig) ToString() (string, error)
ToString converts object to a string
type Service ¶
type Service struct { Image string `yaml:"image"` Volumes []string `yaml:"volumes,omitempty"` Networks []string `yaml:"networks,omitempty"` Environment []string `yaml:"environment,omitempty"` DependsOn []string `yaml:"depends_on,omitempty"` Ports []string `yaml:"ports,omitempty"` Restart string `yaml:"restart,omitempty"` Command string `yaml:"command,omitempty"` }
Service type
Click to show internal directories.
Click to hide internal directories.