registry

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCloudEvent

func RegisterCloudEvent(name string, fn func(context.Context, cloudevents.Event) error) error

Registers a CloudEvent function with a given name

func RegisterHTTP

func RegisterHTTP(name string, fn func(http.ResponseWriter, *http.Request)) error

Registers a HTTP function with a given name

Types

type RegisteredFunction

type RegisteredFunction struct {
	Name         string                                         // The name of the function
	CloudEventFn func(context.Context, cloudevents.Event) error // Optional: The user's CloudEvent function
	HTTPFn       func(http.ResponseWriter, *http.Request)       // Optional: The user's HTTP function
}

A declaratively registered function

func GetRegisteredFunction

func GetRegisteredFunction(name string) (RegisteredFunction, bool)

Gets a registered function by name

Jump to

Keyboard shortcuts

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