dockercompose

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerIP

func DockerIP() (string, error)

DockerIP finds the first private IP found in the network interfaces

Types

type DockerCompose

type DockerCompose struct {
	Version  string
	Services map[string]Service
}

DockerCompose represents a docker-compose file

func Parse

func Parse(yamlFile []byte) (DockerCompose, error)

Parse converts a yaml byte slice into a DockerCompose struct

func (*DockerCompose) FindKafkaContainer

func (dc *DockerCompose) FindKafkaContainer() (Service, error)

FindKafkaContainer looks for a service that has the KAFKA_CREATE_TOPICS environment variable set, and returns it as a Service struct.

type Service

type Service struct {
	Name        string
	Image       string
	Environment interface{}
}

Service represents a service defined in a docker-compose file

func (*Service) GetTopics

func (service *Service) GetTopics() []string

GetTopics returns a list of the kafka topics that a service creates

Jump to

Keyboard shortcuts

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