knative

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecoverPanicHTTP

func RecoverPanicHTTP(w http.ResponseWriter, msg string)

Types

type Runtime

type Runtime struct {
	// contains filtered or unexported fields
}

func NewKnativeRuntime

func NewKnativeRuntime(port string, pattern string) *Runtime

func (*Runtime) GetHandler

func (r *Runtime) GetHandler() interface{}

func (*Runtime) Name

func (r *Runtime) Name() ofctx.Runtime

func (*Runtime) RegisterCloudEventFunction

func (r *Runtime) RegisterCloudEventFunction(
	ctx context.Context,
	funcContext ofctx.RuntimeContext,
	prePlugins []plugin.Plugin,
	postPlugins []plugin.Plugin,
	fn func(context.Context, cloudevents.Event) error,
) error

func (*Runtime) RegisterHTTPFunction

func (r *Runtime) RegisterHTTPFunction(
	ctx ofctx.RuntimeContext,
	prePlugins []plugin.Plugin,
	postPlugins []plugin.Plugin,
	fn func(http.ResponseWriter, *http.Request),
) error

func (*Runtime) RegisterOpenFunction

func (r *Runtime) RegisterOpenFunction(
	ctx ofctx.RuntimeContext,
	prePlugins []plugin.Plugin,
	postPlugins []plugin.Plugin,
	fn func(ofctx.Context, []byte) (ofctx.Out, error),
) error

func (*Runtime) Start

func (r *Runtime) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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