serverless

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package serverless provides a portable serverless functions API with cross-cutting concerns.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Serverless)

func WithErrorInjection

func WithErrorInjection(i *inject.Injector) Option

func WithLatency

func WithLatency(d time.Duration) Option

func WithMetrics

func WithMetrics(m *metrics.Collector) Option

func WithRateLimiter

func WithRateLimiter(l *ratelimit.Limiter) Option

func WithRecorder

func WithRecorder(r *recorder.Recorder) Option

type Serverless

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

Serverless is the portable serverless type wrapping a driver.

func NewServerless

func NewServerless(d driver.Serverless, opts ...Option) *Serverless

NewServerless creates a new portable Serverless.

func (*Serverless) CreateFunction

func (s *Serverless) CreateFunction(ctx context.Context, config driver.FunctionConfig) (*driver.FunctionInfo, error)

func (*Serverless) DeleteFunction

func (s *Serverless) DeleteFunction(ctx context.Context, name string) error

func (*Serverless) GetFunction

func (s *Serverless) GetFunction(ctx context.Context, name string) (*driver.FunctionInfo, error)

func (*Serverless) Invoke

func (*Serverless) ListFunctions

func (s *Serverless) ListFunctions(ctx context.Context) ([]driver.FunctionInfo, error)

func (*Serverless) RegisterHandler

func (s *Serverless) RegisterHandler(name string, handler driver.HandlerFunc)

func (*Serverless) UpdateFunction

func (s *Serverless) UpdateFunction(ctx context.Context, name string, config driver.FunctionConfig) (*driver.FunctionInfo, error)

Directories

Path Synopsis
Package driver defines the interface for serverless function service implementations.
Package driver defines the interface for serverless function service implementations.

Jump to

Keyboard shortcuts

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