Documentation
¶
Index ¶
- Constants
- Variables
- func ParsePath(in string, faultTolerant bool) ([]string, error)
- type Address
- type Annotations
- type ByHost
- func (instance *ByHost) All(consumer func(Rule) error) error
- func (instance *ByHost) Clone() *ByHost
- func (instance *ByHost) Find(host string, path []string) (Rules, error)
- func (instance *ByHost) HasContent() bool
- func (instance *ByHost) Put(r Rule) error
- func (instance *ByHost) Remove(predicate Predicate) error
- 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 ForceableBool
- type Header
- type Headers
- 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 OnAdded
- type OnRemoved
- type OptionalBool
- type Options
- type OptionsCors
- type OptionsCustomHeaders
- type OptionsEncoding
- type OptionsFactory
- type OptionsPart
- type OptionsPrefix
- type OptionsSecure
- type Predicate
- type Query
- type Repository
- type Rule
- type Rules
- type SourceReference
- type Statistics
Constants ¶
View Source
const ( NotDefined = OptionalBool(0) False = OptionalBool(1) True = OptionalBool(2) )
Variables ¶
View Source
var (
ErrIllegalPath = errors.New("illegal path")
)
Functions ¶
Types ¶
type Address ¶
func AnnotationAddresses ¶ added in v0.1.6
type Annotations ¶ added in v0.1.6
type ByHost ¶
type ByHost struct {
// contains filtered or unexported fields
}
func (*ByHost) HasContent ¶
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 ForceableBool ¶
func (*ForceableBool) Set ¶
func (instance *ForceableBool) Set(plain string) error
func (ForceableBool) String ¶
func (instance ForceableBool) String() string
type KubernetesBasedRepository ¶ added in v0.1.6
type KubernetesBasedRepository struct { Environment *kubernetes.Environment ByHostRules *ByHost ResyncAfter time.Duration IngressClass []string 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 OptionalBool ¶
type OptionalBool uint8
func AnnotationIsTrue ¶ added in v0.1.6
func AnnotationIsTrue(name, value string) (OptionalBool, error)
func (OptionalBool) IsEnabled ¶
func (instance OptionalBool) IsEnabled(def bool) bool
func (OptionalBool) IsEnabledOrForced ¶
func (instance OptionalBool) IsEnabledOrForced(def ForceableBool) bool
func (*OptionalBool) Set ¶
func (instance *OptionalBool) Set(plain string) error
func (OptionalBool) String ¶
func (instance OptionalBool) String() string
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 {
Cors OptionalBool `json:"cors,omitempty"`
}
func OptionsCorsOf ¶ added in v0.1.6
func OptionsCorsOf(options Options) *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(options Options) *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(options Options) *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 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 OptionalBool `json:"stripRulePathPrefix,omitempty"` PathPrefix []string `json:"pathPrefix,omitempty"` XForwardedPrefix OptionalBool `json:"xForwardedPrefix,omitempty"` }
func OptionsPrefixOf ¶ added in v0.1.6
func OptionsPrefixOf(options Options) *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 OptionalBool `json:"forceSecure,omitempty"` WhitelistedRemotes []Address `json:"whitelistedRemotes,omitempty"` }
func OptionsSecureOf ¶ added in v0.1.6
func OptionsSecureOf(options Options) *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() string Path() []string Source() SourceReference Backend() net.Addr Options() Options Statistics() *Statistics }
type SourceReference ¶
type SourceReference interface { Name() string Type() string String() string Equals(SourceReference) bool }
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.