docker

package
v0.0.0-...-e8f7e12 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractTraefikDomainsFromLabels

func ExtractTraefikDomainsFromLabels(labels map[string]string) ([]string, error)

ExtractTraefikDomainsFromLabels parses all labels and extracts domains to be served It currently supports traefik labels and can only extract static in the Host rule Extrapolating the values of HostRegexp is currently not supported as it can lead to infinite numbers of supported domains

func ParseRules

func ParseRules(encoded string) (map[string]*Rule, error)

ParseRules parses a string to extract structures rules

Types

type Lister

type Lister struct {
	Client *client.Client
	Logger logger.Logger
}

Lister holds a docker client

func (*Lister) EventTicker

func (d *Lister) EventTicker(c <-chan time.Time) <-chan time.Time

EventTicker proxies a ticker and adds ticks for each container and service events

func (*Lister) List

func (d *Lister) List() ([]string, error)

List implements the Lister interface to list required domains for all containers and services

type Rule

type Rule struct {
	Matcher string
	Values  []string
}

Rule holds the description of a traefik rule: https://docs.traefik.io/basics/#matchers

func ParseRule

func ParseRule(encoded string) (*Rule, error)

ParseRule parses a string to extract structured rule description

Jump to

Keyboard shortcuts

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