funcinsts

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Type name for rpc trigger
	Type = "eventgateway"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Operator

type Operator struct {
	*operators.BaseOperator

	// configured
	TappingInterval time.Duration

	// shared by concrete funcinst
	FuncinstLister rflistersv1.FuncinstLister
	// contains filtered or unexported fields
}

Operator creates http based rpc trigger automatically for every funcs

func NewOperator

func NewOperator(
	cfg *rest.Config,
	rclient refunc.Interface,
	rfInformers informers.SharedInformerFactory,
	handler transport.OperatorHandler,
	creds credsyncer.Provider,
) (*Operator, error)

NewOperator creates a new rpc trigger operator

func (*Operator) GetFuncInstance

func (r *Operator) GetFuncInstance(trigger *rfv1beta3.Trigger) (*rfv1beta3.Funcinst, error)

GetFuncInstance returns or creates a refunc instance from trigger

func (*Operator) Run

func (r *Operator) Run(stopC <-chan struct{})

Run will not return until stopC is closed.

func (*Operator) Tap

func (r *Operator) Tap(key string)

Tap funcinst keeps it live

func (*Operator) TriggerForEndpoint

func (r *Operator) TriggerForEndpoint(endpoint string) (*rfv1beta3.Trigger, error)

TriggerForEndpoint returns trigger specified by endpoint

Jump to

Keyboard shortcuts

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