serverless

package
v4.0.0-...-2c57b5f Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package serverless contains shared components for serverless distributions of Bento.

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 Bento pipeline and wraps it within an invoke handler.

func NewHandler

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

NewHandler returns a Handler by creating a Bento 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 Bento pipeline and returns a result.

Directories

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

Jump to

Keyboard shortcuts

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