invoker

package
v0.0.0-...-df9582d Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2019 License: MIT Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	InvokerPropertyPort string = "port"
)

Variables

View Source
var ErrConn = errors.New("Conn Error")

ErrConn defines connection error to lambda

View Source
var ErrExec = errors.New("Exec Error")

ErrExec defines error on execute lambda

View Source
var Functions = make(map[string]Handler)

Functions holds all functions' meta data

Functions

func LoadEnvFile

func LoadEnvFile(file string) error

LoadEnvFile loads extra env json file

func PrepareFunction

func PrepareFunction(name string, function *resources.AWSServerlessFunction) error

PrepareFunction preload function and make it ready to invoke

Types

type Go1xHandler

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

func (*Go1xHandler) Arn

func (h *Go1xHandler) Arn() string

func (*Go1xHandler) Init

func (h *Go1xHandler) Init(name string, function *resources.AWSServerlessFunction)

func (*Go1xHandler) Invoke

func (h *Go1xHandler) Invoke(payload []byte) ([]byte, error)

func (*Go1xHandler) Name

func (h *Go1xHandler) Name() string

func (*Go1xHandler) Property

func (h *Go1xHandler) Property(key string) interface{}

func (*Go1xHandler) Runtime

func (h *Go1xHandler) Runtime() string

func (*Go1xHandler) Start

func (h *Go1xHandler) Start(envs []string) error

func (*Go1xHandler) Stop

func (h *Go1xHandler) Stop() error

type Handler

type Handler interface {
	Runtime() string
	Arn() string
	Name() string
	Init(name string, function *resources.AWSServerlessFunction)
	Start(envs []string) error
	Stop() error
	Invoke(payload []byte) ([]byte, error)
	Property(key string) interface{}
}

Jump to

Keyboard shortcuts

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