functions

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 362

Documentation

Overview

Package functions provides a way to declaratively register functions that can be used to handle incoming requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloudEvent

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

CloudEvent registers a CloudEvent function that becomes the function handler served at "/" when environment variable `FUNCTION_TARGET=name`

func HTTP

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

HTTP registers an HTTP function that becomes the function handler served at "/" when environment variable `FUNCTION_TARGET=name`

func Typed added in v1.7.0

func Typed(name string, fn interface{})

Typed registers a Typed function that becomes the function handler served at "/" when environment variable `FUNCTION_TARGET=name` This function takes a strong type T as an input and can return a strong type T, built in types, nil and/or error as an output

Types

This section is empty.

Jump to

Keyboard shortcuts

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