handler

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package handler provides the default custom Go handler logic for Go Function Apps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Debug     bool
	Functions map[string]*function.Function
}

Handler runs the custom handler HTTP server and runs the registered methods upon invocation requests.

func (*Handler) Start

func (w *Handler) Start() error

Start the custom handler HTTP server. Default serve port is 8080, overridable with environment variable FUNCTIONS_CUSTOMHANDLER_PORT.

type InvokeRequest

type InvokeRequest struct {
	Data     map[string]json.RawMessage
	Metadata map[string]json.RawMessage
}

InvokeRequest models the data sent by the Funtions Runtime for the custom Go handler.

type InvokeResponse

type InvokeResponse struct {
	Outputs     map[string]interface{}
	Logs        []string
	ReturnValue interface{}
}

InvokeRequest models the data expected by the Functions Runtime as a response to an invocation.

Jump to

Keyboard shortcuts

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