discovery

package
v0.0.0-...-7361872 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraefikEnable = "traefik.enable"
)

Variables

View Source
var DefaultLabels = map[string]string{
	"traefik.http.services.{{ .Name }}.loadBalancer.server.port": "80",
}
View Source
var DefaultSettings = Settings{
	DefaultRule:   "Host(`{{ .Name }}`)",
	DefaultLabels: DefaultLabels,
}

Functions

This section is empty.

Types

type FilterOptions

type FilterOptions struct {
	Includes []string
	Excludes []string
}

func (FilterOptions) Matches

func (f FilterOptions) Matches(name string) bool

func (FilterOptions) MatchesServer

func (f FilterOptions) MatchesServer(server *osServers.Server) bool

type Server

type Server struct {
	osServers.Server
}

func (Server) BuildStandardLabels

func (s Server) BuildStandardLabels(settings Settings) map[string]string

func (Server) EvalTemplate

func (s Server) EvalTemplate(t string) (string, error)

func (Server) GetAddress

func (s Server) GetAddress(kind string) (address string, err error)

func (Server) RegisterConfiguration

func (s Server) RegisterConfiguration(configurations map[string]*dynamic.Configuration, settings Settings) (err error)

type ServerAddress

type ServerAddress struct {
	Version   int    `mapstructure:"version"`
	Address   string `mapstructure:"addr"`
	Type      string `mapstructure:"OS-EXT-IPS:type"`
	HWAddress string `mapstructure:"OS-EXT-IPS-MAC:mac_addr"`
}

type ServerAddresses

type ServerAddresses map[string][]ServerAddress

func GetServerAddresses

func GetServerAddresses(input map[string]interface{}) (addresses ServerAddresses, err error)

type ServerList

type ServerList map[string]*Server

type Servers

type Servers struct {
	Servers ServerList
}

func LoadServers

func LoadServers(client *gophercloud.ServiceClient, filter FilterOptions) (servers *Servers, err error)

func (Servers) RegisterConfiguration

func (s Servers) RegisterConfiguration(configurations map[string]*dynamic.Configuration, settings Settings) (err error)

type Settings

type Settings struct {
	DefaultRule        string
	DefaultEnable      bool
	DefaultEntrypoints []string
	DefaultLabels      map[string]string
	AddressType        string
}

Jump to

Keyboard shortcuts

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