Documentation ¶
Index ¶
- Variables
- func AnnotationIsBool(name, v string) (value.Bool, error)
- func AnnotationIsForcibleBool(name, v string) (result value.ForcibleBool, err error)
- func ParsePath(in string, faultTolerant bool) ([]string, error)
- type Address
- type Annotations
- type ByHost
- type ByPath
- type CertificateQuery
- type CertificateRepository
- type Certificates
- type CertificatesByHost
- func (this *CertificatesByHost) Add(source support.ObjectReference, certificate tls.Certificate) (value.WildcardSupportingFqdns, error)
- func (this *CertificatesByHost) AddBytes(source support.ObjectReference, certificate, privateKey []byte) (value.WildcardSupportingFqdns, error)
- func (this *CertificatesByHost) Find(host value.WildcardSupportingFqdn) Certificates
- func (this *CertificatesByHost) RemoveBySource(source support.ObjectReference) (value.WildcardSupportingFqdns, error)
- type CombinedRepository
- type KubernetesBasedRepository
- func (this *KubernetesBasedRepository) All(consumer func(Rule) error) error
- func (this *KubernetesBasedRepository) FindBy(q Query) (Rules, error)
- func (this *KubernetesBasedRepository) FindCertificatesBy(q CertificateQuery) (Certificates, error)
- func (this *KubernetesBasedRepository) Init(stop support.Channel) error
- type OnAdded
- type OnRemoved
- type Options
- type OptionsCompress
- type OptionsCors
- type OptionsCustomHeaders
- type OptionsFactory
- type OptionsPart
- type OptionsPrefix
- type OptionsSecure
- type PathType
- type Predicate
- type Query
- type Repository
- type Rule
- type Rules
- type Statistics
Constants ¶
This section is empty.
Variables ¶
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 value.WildcardSupportingFqdn
}
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 (this *CertificatesByHost) Add(source support.ObjectReference, certificate tls.Certificate) (value.WildcardSupportingFqdns, error)
func (*CertificatesByHost) AddBytes ¶
func (this *CertificatesByHost) AddBytes(source support.ObjectReference, certificate, privateKey []byte) (value.WildcardSupportingFqdns, error)
func (*CertificatesByHost) Find ¶
func (this *CertificatesByHost) Find(host value.WildcardSupportingFqdn) Certificates
func (*CertificatesByHost) RemoveBySource ¶ added in v0.7.0
func (this *CertificatesByHost) RemoveBySource(source support.ObjectReference) (value.WildcardSupportingFqdns, error)
type CombinedRepository ¶
type CombinedRepository interface { Repository CertificateRepository }
func NewRepository ¶
func NewRepository(s *settings.Settings, logger log.Logger) (CombinedRepository, error)
type KubernetesBasedRepository ¶ added in v0.1.6
type KubernetesBasedRepository struct { Environment *kubernetes.Environment ByHostRules *ByHost Logger log.Logger CertificatesByHost CertificatesByHost OptionsFactory OptionsFactory // contains filtered or unexported fields }
func (*KubernetesBasedRepository) All ¶ added in v0.1.6
func (this *KubernetesBasedRepository) All(consumer func(Rule) error) error
func (*KubernetesBasedRepository) FindBy ¶ added in v0.1.6
func (this *KubernetesBasedRepository) FindBy(q Query) (Rules, error)
func (*KubernetesBasedRepository) FindCertificatesBy ¶ added in v0.1.6
func (this *KubernetesBasedRepository) FindCertificatesBy(q CertificateQuery) (Certificates, error)
type Options ¶
type Options map[string]OptionsPart
func (Options) IsRelevant ¶
func (*Options) Set ¶ added in v0.1.6
func (this *Options) Set(annotations Annotations) error
type OptionsCompress ¶ added in v0.7.0
func OptionsCompressOf ¶ added in v0.7.0
func OptionsCompressOf(rule Rule) *OptionsCompress
func (OptionsCompress) IsRelevant ¶ added in v0.7.0
func (this OptionsCompress) IsRelevant() bool
func (OptionsCompress) Name ¶ added in v0.7.0
func (this OptionsCompress) Name() string
func (*OptionsCompress) Set ¶ added in v0.7.0
func (this *OptionsCompress) Set(annotations Annotations) (err error)
type OptionsCors ¶ added in v0.1.6
type OptionsCors struct { Enabled value.ForcibleBool `json:"enabled,omitempty"` AllowedOriginsHost value2.HostPatterns `json:"allowedOriginsHost,omitempty"` AllowedMethods value2.Methods `json:"allowedMethods,omitempty"` AllowedHeaders value2.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 (this OptionsCors) IsRelevant() bool
func (OptionsCors) Name ¶ added in v0.1.6
func (this OptionsCors) Name() string
func (*OptionsCors) Set ¶ added in v0.1.6
func (this *OptionsCors) Set(annotations Annotations) (err error)
type OptionsCustomHeaders ¶ added in v0.1.6
type OptionsCustomHeaders struct { RequestHeaders value.Headers `json:"requestHeaders,omitempty"` ResponseHeaders value.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 (this OptionsCustomHeaders) IsRelevant() bool
func (OptionsCustomHeaders) Name ¶ added in v0.1.6
func (this OptionsCustomHeaders) Name() string
func (*OptionsCustomHeaders) Set ¶ added in v0.1.6
func (this *OptionsCustomHeaders) 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 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 (this OptionsPrefix) IsRelevant() bool
func (OptionsPrefix) Name ¶ added in v0.1.6
func (this OptionsPrefix) Name() string
func (*OptionsPrefix) Set ¶ added in v0.1.6
func (this *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 (this OptionsSecure) IsRelevant() bool
func (OptionsSecure) Name ¶ added in v0.1.6
func (this OptionsSecure) Name() string
func (*OptionsSecure) Set ¶ added in v0.1.6
func (this *OptionsSecure) Set(annotations Annotations) (err error)
type PathType ¶ added in v0.7.0
type PathType uint8
func ParsePathType ¶ added in v0.7.0
func ParsePathType(in *networkingv1.PathType) (PathType, error)
type Predicate ¶
func PredicateByObjectReference ¶ added in v0.7.0
func PredicateByObjectReference(or support.ObjectReference) Predicate
type Repository ¶
type Rule ¶
type Rule interface { Host() value.WildcardSupportingFqdn Path() []string PathType() PathType Source() support.ObjectReference Backend() net.Addr Options() Options Statistics() *Statistics tree.Cloneable[Rule] }
type Statistics ¶
type Statistics struct {
// contains filtered or unexported fields
}
func (*Statistics) MarkUsed ¶
func (this *Statistics) MarkUsed(duration time.Duration)
func (*Statistics) MarshalJSON ¶
func (this *Statistics) MarshalJSON() ([]byte, error)
func (*Statistics) NumberOfUsages ¶
func (this *Statistics) NumberOfUsages() uint64
func (*Statistics) TotalDuration ¶
func (this *Statistics) TotalDuration() time.Duration
Source Files ¶
Click to show internal directories.
Click to hide internal directories.