backends

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceLabelPort = "creg.port"
View Source
const ServicePrefix = "creg"

Variables

This section is empty.

Functions

func ExtractPorts

func ExtractPorts(labels map[string]string, prefix string) map[string]string

func MapServices

func MapServices(ports map[string]string, containerLabels map[string]string, staticLabelsToAdd []string, filters []FilterFunc) map[string]ServiceWithLabels

func TraefikLabelFilter

func TraefikLabelFilter(serviceLabels *[]string, containerLabels map[string]string, service string)

Types

type Backend

type Backend interface {
	Run(ctx context.Context, events chan docker.ContainerEvent, purgeOnStart bool, containersToRefresh []types.ContainerJSON) error
	Purge() error
	Refresh(containers []types.ContainerJSON) error
	GetName() string
}

type BackendOption

type BackendOption func(*Backend)

type FilterFunc

type FilterFunc func(serviceLabels *[]string, containerLabels map[string]string, service string)

type ServiceWithLabels

type ServiceWithLabels struct {
	Name   string
	Labels []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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