egress

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultEgressType = "cse"
	// EgressTLS defines tls prefix
	EgressTLS = "egress"
)

Variables

View Source
var ErrNoExist = errors.New("Egress not exists")

ErrNoExist means if there is no egress implementation

Functions

func BuildEgress

func BuildEgress(name string) error

BuildEgress create a Egress

func GetEgressType

func GetEgressType(egress config.Egress) string

GetEgressType returns the type of egress

func Init

func Init() error

Init initialize Egress config

func InstallEgressService

func InstallEgressService(name string, f func() (Egress, error))

InstallEgressService install egress service for developer

func IsDNS1123Label

func IsDNS1123Label(value string) bool

IsDNS1123Label validate label

func IsWildcardDNS1123Label

func IsWildcardDNS1123Label(value string) bool

IsWildcardDNS1123Label validate wild card label

func Match

func Match(hostname string) (bool, *control.EgressConfig)

Match Check Egress rule matches

func ValidateEgressRule

func ValidateEgressRule(rules map[string][]*config.EgressRule) (bool, error)

ValidateEgressRule validate the Egress rules of each service

func ValidateHostName

func ValidateHostName(host string) error

ValidateHostName validates the host

Types

type Egress

type Egress interface {
	Init(Options) error
	SetEgressRule(map[string][]*config.EgressRule)
	FetchEgressRule() map[string][]*config.EgressRule
}

Egress return egress rule, you can also set custom egress rule

var DefaultEgress Egress

DefaultEgress is current egress implementation

type Options

type Options struct {
	Endpoints  []string
	EnableSSL  bool
	TLSConfig  *tls.Config
	Version    string
	ConfigPath string
}

Options defines how to init Egress and its fetcher

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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