provider

package
v0.0.0-...-7949e55 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	HTTP struct {
		Middlewares map[string]*api.Middleware
		Routers     map[string]*Router
		Services    map[string][]*api.WeightedAddr
	}
	TCP struct {
		Middlewares map[string]*api.Middleware
		Routers     map[string]*Router
		Services    map[string][]*api.WeightedAddr
	}
	UDP struct {
		Middlewares map[string]*api.Middleware
		Routers     map[string]*Router
		Services    map[string][]*api.WeightedAddr
	}
}

type Config

type Config struct {
	ACL                bool
	DefaultTrafficType string
}

Config holds the Provider configuration.

type Middleware

type Middleware struct{}

type MiddlewareBuilder

type MiddlewareBuilder func(annotations map[string]string) (map[string]*api.Middleware, error)

MiddlewareBuilder is capable of building a middleware from service annotations.

type PortFinder

type PortFinder interface {
	Find(namespace, name string, port int32) (int32, bool)
}

PortFinder finds service port mappings.

type Provider

type Provider struct {
	Log logr.Logger
	// contains filtered or unexported fields
}

Provider holds the configuration for generating dynamic configuration from a kubernetes cluster state.

func New

func New(httpStateTable, tcpStateTable, udpStateTable PortFinder, middlewareBuilder MiddlewareBuilder, cfg Config, logger logr.Logger) *Provider

New creates a new Provider.

func (*Provider) BuildConfig

func (p *Provider) BuildConfig(t *topology.Topology) *APIConfig

BuildConfig builds a dynamic configuration.

type Router

type Router struct {
	*api.Route
	EntryPoints []string
	Service     string
}

type Service

type Service struct{}

Jump to

Keyboard shortcuts

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