cloudfunction

package
v0.0.0-...-13c9a7e Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 13 Imported by: 31

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(handler interface{})

func StartHandler

func StartHandler(handler Handler)

StartHandler takes in a Handler wrapper interface which can be implemented either by a custom function or a struct.

Handler implementation requires a single "Invoke()" function:

func Invoke(context.Context, []byte) ([]byte, error)

Types

type Function

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

func (*Function) Invoke

func (fn *Function) Invoke(req *messages.InvokeRequest, response *messages.InvokeResponse) error

func (*Function) Ping

func (fn *Function) Ping(req *messages.PingRequest, response *messages.PingResponse) error

type Handler

type Handler interface {
	Invoke(ctx context.Context, payload []byte) ([]byte, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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