config

package
v0.0.0-...-9600303 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	C <-chan []ConfigEvent
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(filename string) (*Config, error)

func (*Config) Close

func (cfg *Config) Close() error

type ConfigEntry

type ConfigEntry struct {
	Hostname string
	Target   url.URL
}

func ReadConfig

func ReadConfig(reader io.Reader) ([]ConfigEntry, error)

func ReadConfigFile

func ReadConfigFile(filename string) ([]ConfigEntry, error)

type ConfigEvent

type ConfigEvent struct {
	ConfigEntry
	Up bool
}

func (ConfigEvent) String

func (e ConfigEvent) String() string

type DockerWatch

type DockerWatch struct {
	// contains filtered or unexported fields
}

func NewDockerWatch

func NewDockerWatch() (*DockerWatch, error)

NewDockerWatch returns a new DockerWatch

func (*DockerWatch) GetActiveContainers

func (d *DockerWatch) GetActiveContainers() ([]ConfigEvent, error)

GetActiveContainers returns up config events for active containers

func (*DockerWatch) GetConfigEvents

func (d *DockerWatch) GetConfigEvents() (<-chan []ConfigEvent, error)

GetConfigEvents returns a channel of config events

Jump to

Keyboard shortcuts

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