serverless

package
v4.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package serverless contains shared components for serverless distributions of Benthos.

Index

Constants

View Source
const ServerlessResponseType = "sync_response"

ServerlessResponseType is an output type that redirects pipeline outputs back to the handler.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler contains a live Benthos pipeline and wraps it within an invoke handler.

func NewHandler

func NewHandler(conf config.Type) (*Handler, error)

NewHandler returns a Handler by creating a Benthos pipeline.

func (*Handler) Close

func (h *Handler) Close(tout time.Duration) error

Close shuts down the underlying pipeline. If the shut down takes longer than the specified timeout it is aborted and an error is returned.

func (*Handler) Handle

func (h *Handler) Handle(ctx context.Context, obj any) (any, error)

Handle is a request/response func that injects a payload into the underlying Benthos pipeline and returns a result.

Directories

Path Synopsis
Package lambda contains the execution logic for running Benthos as an AWS lambda function.
Package lambda contains the execution logic for running Benthos as an AWS lambda function.

Jump to

Keyboard shortcuts

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