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

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