Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependencies ¶
type Dependencies struct {
Secrets v1.SecretList
}
type FunctionDiscovery ¶
type FunctionDiscovery struct {
// contains filtered or unexported fields
}
func NewFunctionDiscovery ¶
func NewFunctionDiscovery(updater *Updater) *FunctionDiscovery
func (*FunctionDiscovery) Update ¶
func (d *FunctionDiscovery) Update(upstreams v1.UpstreamList, secrets v1.SecretList) error
type FunctionDiscoveryFactory ¶
type FunctionDiscoveryFactory interface {
NewFunctionDiscovery(u *v1.Upstream) UpstreamFunctionDiscovery
}
upstreams can be obviously functional like AWS λ, fission,... or an upstream that was already detected and marked as such. or potentially like static upstreams.
detectors detect a specific type of functional service if they detect the service, they return service info and annotations (optional) for the service we want to bake sure that detect upstream for aws doesn't do anything perhaps we can do just that
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
func NewUpdater ¶
func NewUpdater(ctx context.Context, resolver Resolver, upstreamclient UpstreamWriterClient, maxconncurrency uint, functionalPlugins []FunctionDiscoveryFactory) *Updater
func (*Updater) GetSecrets ¶
func (u *Updater) GetSecrets() v1.SecretList
func (*Updater) SetSecrets ¶
func (u *Updater) SetSecrets(secretlist v1.SecretList)
func (*Updater) UpstreamAdded ¶
func (*Updater) UpstreamRemoved ¶
func (*Updater) UpstreamUpdated ¶
type UpstreamFunctionDiscovery ¶
type UpstreamFunctionDiscovery interface { // if this returns true we can skip DetectUpstreamType and go straight to DetectFunctions // if this returns false we should call detect upstream type. // if detect upstream type retrurns true, we have the type! // if it returns false and nil error, it means it was detected to not be of this type - // ideally this means that this detector will no longer be used with this upstream. in practice this can be logged\ignored. // if it returns false and some error, try again later with back-off \ timeout. IsFunctional() bool // Returns // err != nil temporary error. try again // err == nil spec == nil. no type detected, don't try again // url is never nil DetectType(ctx context.Context, url *url.URL) (*plugins.ServiceSpec, error) // url maybe nil if it couldnt be resolved DetectFunctions(ctx context.Context, url *url.URL, dependencies func() Dependencies, out func(UpstreamMutator) error) error }
type UpstreamMutator ¶
Click to show internal directories.
Click to hide internal directories.