Documentation
¶
Index ¶
- Constants
- Variables
- func AnnotationIsForcibleBool(name, v string) (result value.ForcibleBool, err error)
- func AnnotationIsTrue(name, v string) (value.Bool, error)
- func ParsePath(in string, faultTolerant bool) ([]string, error)
- type Address
- type Annotations
- type ByHost
- type ByPath
- func (instance *ByPath) All(consumer func(Rule) error) error
- func (instance *ByPath) Clone() *ByPath
- func (instance *ByPath) Find(path []string) (Rules, error)
- func (instance *ByPath) HasContent() bool
- func (instance *ByPath) Put(r Rule) error
- func (instance *ByPath) Remove(predicate Predicate) error
- type CertificateQuery
- type CertificateRepository
- type Certificates
- type CertificatesByHost
- type CombinedRepository
- type ForcibleHeaderNames
- type ForcibleHostPatterns
- type ForcibleMethods
- type Header
- type HeaderName
- type HeaderNames
- type Headers
- type HostPattern
- type HostPatterns
- type KubernetesBasedRepository
- func (instance *KubernetesBasedRepository) All(consumer func(Rule) error) error
- func (instance *KubernetesBasedRepository) FindBy(q Query) (Rules, error)
- func (instance *KubernetesBasedRepository) FindCertificatesBy(q CertificateQuery) (Certificates, error)
- func (instance *KubernetesBasedRepository) Init(stop support.Channel) error
- func (instance *KubernetesBasedRepository) RegisterFlag(fe support.FlagEnabled, appPrefix string) error
- type Method
- type Methods
- type OnAdded
- type OnRemoved
- type Options
- type OptionsCors
- type OptionsCustomHeaders
- type OptionsEncoding
- type OptionsFactory
- type OptionsMatching
- type OptionsPart
- type OptionsPrefix
- type OptionsSecure
- type Predicate
- type Query
- type Repository
- type Rule
- type Rules
- type SourceReference
- type Statistics
Constants ¶
View Source
const ( MethodGet = Method(http.MethodGet) MethodHead = Method(http.MethodHead) MethodPost = Method(http.MethodPost) MethodPut = Method(http.MethodPut) MethodPatch = Method(http.MethodPatch) MethodDelete = Method(http.MethodDelete) MethodConnect = Method(http.MethodConnect) MethodOptions = Method(http.MethodOptions) MethodTrace = Method(http.MethodTrace) )
Variables ¶
View Source
var ( ErrIllegalMethod = errors.New("illegal method") AllMethods = Methods{ MethodGet, MethodHead, MethodPost, MethodPut, MethodPatch, MethodDelete, MethodConnect, MethodOptions, MethodTrace, } )
View Source
var (
ErrIllegalPath = errors.New("illegal path")
)
Functions ¶
func AnnotationIsForcibleBool ¶ added in v0.4.0
func AnnotationIsForcibleBool(name, v string) (result value.ForcibleBool, err error)
Types ¶
type Address ¶
func AnnotationAddresses ¶ added in v0.1.6
type Annotations ¶ added in v0.1.6
type ByPath ¶
type ByPath struct {
// contains filtered or unexported fields
}
func (*ByPath) HasContent ¶
type CertificateQuery ¶
type CertificateQuery struct {
Host string
}
type CertificateRepository ¶
type CertificateRepository interface {
FindCertificatesBy(CertificateQuery) (Certificates, error)
}
type Certificates ¶
type Certificates []*tls.Certificate
type CertificatesByHost ¶
type CertificatesByHost struct {
// contains filtered or unexported fields
}
func (*CertificatesByHost) Add ¶
func (instance *CertificatesByHost) Add(certificate tls.Certificate) error
func (*CertificatesByHost) AddBytes ¶
func (instance *CertificatesByHost) AddBytes(certificate, privateKey []byte) error
func (CertificatesByHost) Find ¶
func (instance CertificatesByHost) Find(host string) Certificates
type CombinedRepository ¶
type CombinedRepository interface { Repository CertificateRepository }
func NewRepository ¶
func NewRepository() (CombinedRepository, error)
type ForcibleHeaderNames ¶ added in v0.4.0
func NewForcibleHeaders ¶ added in v0.4.0
func NewForcibleHeaders(init HeaderNames, forced bool) ForcibleHeaderNames
func (ForcibleHeaderNames) Evaluate ¶ added in v0.4.0
func (instance ForcibleHeaderNames) Evaluate(other HeaderNames, def HeaderNames) HeaderNames
type ForcibleHostPatterns ¶ added in v0.4.0
func NewForcibleHostPatterns ¶ added in v0.4.0
func NewForcibleHostPatterns(init HostPatterns, forced bool) ForcibleHostPatterns
func (ForcibleHostPatterns) Evaluate ¶ added in v0.4.0
func (instance ForcibleHostPatterns) Evaluate(other HostPatterns, def HostPatterns) HostPatterns
type ForcibleMethods ¶ added in v0.4.0
func NewForcibleMethods ¶ added in v0.4.0
func NewForcibleMethods(init Methods, forced bool) ForcibleMethods
type HeaderName ¶ added in v0.1.22
type HeaderName string
func ParseHeaderName ¶ added in v0.1.22
func ParseHeaderName(plain string) (result HeaderName, err error)
func (*HeaderName) Set ¶ added in v0.1.22
func (instance *HeaderName) Set(plain string) error
func (HeaderName) String ¶ added in v0.1.22
func (instance HeaderName) String() string
type HeaderNames ¶ added in v0.1.22
type HeaderNames []HeaderName
func ParseHeaderNames ¶ added in v0.1.22
func ParseHeaderNames(plain string) (result HeaderNames, err error)
func (HeaderNames) Get ¶ added in v0.1.22
func (instance HeaderNames) Get() interface{}
func (HeaderNames) IsPresent ¶ added in v0.1.22
func (instance HeaderNames) IsPresent() bool
func (HeaderNames) Matches ¶ added in v0.1.22
func (instance HeaderNames) Matches(test HeaderName) bool
func (*HeaderNames) Set ¶ added in v0.1.22
func (instance *HeaderNames) Set(plain string) error
func (HeaderNames) String ¶ added in v0.1.22
func (instance HeaderNames) String() string
type HostPattern ¶ added in v0.1.22
type HostPattern []string
func ParseHostPattern ¶ added in v0.1.22
func ParseHostPattern(plain string) (result HostPattern, err error)
func (HostPattern) Matches ¶ added in v0.1.22
func (instance HostPattern) Matches(test string) bool
func (*HostPattern) Set ¶ added in v0.1.22
func (instance *HostPattern) Set(plain string) error
func (HostPattern) String ¶ added in v0.1.22
func (instance HostPattern) String() string
type HostPatterns ¶ added in v0.1.22
type HostPatterns []HostPattern
func ParseHostPatterns ¶ added in v0.1.22
func ParseHostPatterns(plain string) (result HostPatterns, err error)
func (HostPatterns) Get ¶ added in v0.1.22
func (instance HostPatterns) Get() interface{}
func (HostPatterns) IsPresent ¶ added in v0.1.22
func (instance HostPatterns) IsPresent() bool
func (HostPatterns) Matches ¶ added in v0.1.22
func (instance HostPatterns) Matches(test string) bool
func (*HostPatterns) Set ¶ added in v0.1.22
func (instance *HostPatterns) Set(plain string) error
func (HostPatterns) String ¶ added in v0.1.22
func (instance HostPatterns) String() string
type KubernetesBasedRepository ¶ added in v0.1.6
type KubernetesBasedRepository struct { Environment *kubernetes.Environment ByHostRules *ByHost ResyncAfter time.Duration IngressClass []string HostWildcard value.ForcibleString CertificatesSecret string CertificatesByHost CertificatesByHost OptionsFactory OptionsFactory }
func (*KubernetesBasedRepository) All ¶ added in v0.1.6
func (instance *KubernetesBasedRepository) All(consumer func(Rule) error) error
func (*KubernetesBasedRepository) FindBy ¶ added in v0.1.6
func (instance *KubernetesBasedRepository) FindBy(q Query) (Rules, error)
func (*KubernetesBasedRepository) FindCertificatesBy ¶ added in v0.1.6
func (instance *KubernetesBasedRepository) FindCertificatesBy(q CertificateQuery) (Certificates, error)
func (*KubernetesBasedRepository) Init ¶ added in v0.1.6
func (instance *KubernetesBasedRepository) Init(stop support.Channel) error
func (*KubernetesBasedRepository) RegisterFlag ¶ added in v0.1.6
func (instance *KubernetesBasedRepository) RegisterFlag(fe support.FlagEnabled, appPrefix string) error
type Options ¶
type Options map[string]OptionsPart
func (Options) IsRelevant ¶
func (*Options) Set ¶ added in v0.1.6
func (instance *Options) Set(annotations Annotations) error
type OptionsCors ¶ added in v0.1.6
type OptionsCors struct { Enabled value.ForcibleBool `json:"enabled,omitempty"` AllowedOriginsHost HostPatterns `json:"allowedOriginsHost,omitempty"` AllowedMethods Methods `json:"allowedMethods,omitempty"` AllowedHeaders HeaderNames `json:"allowedHeaders,omitempty"` AllowedCredentials value.Bool `json:"allowedCredentials,omitempty"` MaxAge value.Duration `json:"maxAge,omitempty"` }
func OptionsCorsOf ¶ added in v0.1.6
func OptionsCorsOf(rule Rule) *OptionsCors
func (OptionsCors) IsRelevant ¶ added in v0.1.6
func (instance OptionsCors) IsRelevant() bool
func (OptionsCors) Name ¶ added in v0.1.6
func (instance OptionsCors) Name() string
func (*OptionsCors) Set ¶ added in v0.1.6
func (instance *OptionsCors) Set(annotations Annotations) (err error)
type OptionsCustomHeaders ¶ added in v0.1.6
type OptionsCustomHeaders struct { RequestHeaders Headers `json:"requestHeaders,omitempty"` ResponseHeaders Headers `json:"responseHeaders,omitempty"` }
func OptionsCustomHeadersOf ¶ added in v0.1.6
func OptionsCustomHeadersOf(rule Rule) *OptionsCustomHeaders
func (OptionsCustomHeaders) IsRelevant ¶ added in v0.1.6
func (instance OptionsCustomHeaders) IsRelevant() bool
func (OptionsCustomHeaders) Name ¶ added in v0.1.6
func (instance OptionsCustomHeaders) Name() string
func (*OptionsCustomHeaders) Set ¶ added in v0.1.6
func (instance *OptionsCustomHeaders) Set(annotations Annotations) (err error)
type OptionsEncoding ¶ added in v0.1.14
type OptionsEncoding struct {
TransportEncoding []string `json:"transportEncoding,omitempty"`
}
func OptionsEncodingOf ¶ added in v0.1.14
func OptionsEncodingOf(rule Rule) *OptionsEncoding
func (OptionsEncoding) IsRelevant ¶ added in v0.1.14
func (instance OptionsEncoding) IsRelevant() bool
func (OptionsEncoding) Name ¶ added in v0.1.14
func (instance OptionsEncoding) Name() string
func (*OptionsEncoding) Set ¶ added in v0.1.14
func (instance *OptionsEncoding) Set(annotations Annotations) (err error)
type OptionsFactory ¶ added in v0.1.6
type OptionsFactory func() Options
var (
DefaultOptionsFactory OptionsFactory = newOptions
)
type OptionsMatching ¶ added in v0.4.0
func OptionsMatchingOf ¶ added in v0.4.0
func OptionsMatchingOf(rule Rule) *OptionsMatching
func (OptionsMatching) IsRelevant ¶ added in v0.4.0
func (instance OptionsMatching) IsRelevant() bool
func (OptionsMatching) Name ¶ added in v0.4.0
func (instance OptionsMatching) Name() string
func (*OptionsMatching) Set ¶ added in v0.4.0
func (instance *OptionsMatching) Set(annotations Annotations) (err error)
type OptionsPart ¶ added in v0.1.6
type OptionsPart interface { Name() string IsRelevant() bool Set(annotations Annotations) error }
func RegisterDefaultOptionsPart ¶ added in v0.1.6
func RegisterDefaultOptionsPart(prototype OptionsPart) OptionsPart
type OptionsPrefix ¶ added in v0.1.6
type OptionsPrefix struct { StripRulePathPrefix value.Bool `json:"stripRulePathPrefix,omitempty"` PathPrefix []string `json:"pathPrefix,omitempty"` XForwardedPrefix value.Bool `json:"xForwardedPrefix,omitempty"` }
func OptionsPrefixOf ¶ added in v0.1.6
func OptionsPrefixOf(rule Rule) *OptionsPrefix
func (OptionsPrefix) IsRelevant ¶ added in v0.1.6
func (instance OptionsPrefix) IsRelevant() bool
func (OptionsPrefix) Name ¶ added in v0.1.6
func (instance OptionsPrefix) Name() string
func (*OptionsPrefix) Set ¶ added in v0.1.6
func (instance *OptionsPrefix) Set(annotations Annotations) (err error)
type OptionsSecure ¶ added in v0.1.6
type OptionsSecure struct { ForceSecure value.Bool `json:"forceSecure,omitempty"` WhitelistedRemotes []Address `json:"whitelistedRemotes,omitempty"` }
func OptionsSecureOf ¶ added in v0.1.6
func OptionsSecureOf(rule Rule) *OptionsSecure
func (OptionsSecure) IsRelevant ¶ added in v0.1.6
func (instance OptionsSecure) IsRelevant() bool
func (OptionsSecure) Name ¶ added in v0.1.6
func (instance OptionsSecure) Name() string
func (*OptionsSecure) Set ¶ added in v0.1.6
func (instance *OptionsSecure) Set(annotations Annotations) (err error)
type Predicate ¶
func PredicateBySource ¶
func PredicateBySource(reference SourceReference) Predicate
type Repository ¶
type Rule ¶
type Rule interface { Host() value.WildcardSupportingFqdn Path() []string Source() SourceReference Backend() net.Addr Options() Options Statistics() *Statistics }
func NewRule ¶
func NewRule(host value.WildcardSupportingFqdn, path []string, source SourceReference, backend net.Addr, options Options) Rule
type SourceReference ¶
type Statistics ¶
type Statistics struct {
// contains filtered or unexported fields
}
func (*Statistics) MarkUsed ¶
func (instance *Statistics) MarkUsed(duration time.Duration)
func (*Statistics) MarshalJSON ¶
func (instance *Statistics) MarshalJSON() ([]byte, error)
func (*Statistics) NumberOfUsages ¶
func (instance *Statistics) NumberOfUsages() uint64
func (*Statistics) TotalDuration ¶
func (instance *Statistics) TotalDuration() time.Duration
Source Files
¶
Click to show internal directories.
Click to hide internal directories.