definition

package
v0.0.0-...-5528672 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 4 Imported by: 0

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

func GetServiceID

func GetServiceID() string

GetServiceID returns a random service uuid

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

Jump to

Keyboard shortcuts

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