Documentation
¶
Overview ¶
Package serverless provides a portable serverless functions API with cross-cutting concerns.
Index ¶
- type Option
- type Serverless
- func (s *Serverless) CreateFunction(ctx context.Context, config driver.FunctionConfig) (*driver.FunctionInfo, error)
- func (s *Serverless) DeleteFunction(ctx context.Context, name string) error
- func (s *Serverless) GetFunction(ctx context.Context, name string) (*driver.FunctionInfo, error)
- func (s *Serverless) Invoke(ctx context.Context, input driver.InvokeInput) (*driver.InvokeOutput, error)
- func (s *Serverless) ListFunctions(ctx context.Context) ([]driver.FunctionInfo, error)
- func (s *Serverless) RegisterHandler(name string, handler driver.HandlerFunc)
- func (s *Serverless) UpdateFunction(ctx context.Context, name string, config driver.FunctionConfig) (*driver.FunctionInfo, error)
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 WithLatency ¶
func WithMetrics ¶
func WithRateLimiter ¶
func WithRecorder ¶
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 (s *Serverless) Invoke(ctx context.Context, input driver.InvokeInput) (*driver.InvokeOutput, error)
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)
Click to show internal directories.
Click to hide internal directories.