configuration

package
v0.0.0-...-8e2a9c2 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const EndpointUrlVariableName = "LOCAL_LAMBDA_ENDPOINT_URL"
View Source
const LambdaRpcPortVariableName = "_LAMBDA_SERVER_PORT"

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	EndpointAddress string        `yaml:"endpointAddress"`
	Functions       []LambdaEntry `yaml:"functions"`
	// contains filtered or unexported fields
}

func FromFile

func FromFile(path string) (*Configuration, error)

func (*Configuration) FindPort

func (c *Configuration) FindPort(functionName string) uint16

type LambdaEntry

type LambdaEntry struct {
	// The Lambda function name
	Name string `yaml:"name"`
	// Additional environment variables
	Env map[string]string `yaml:"env"`
	// The path to the executable file which starts the handler.
	// Leaving the path empty will not start a sub-process,
	// but still route requests to the given port.
	MainPath string `yaml:"mainPath"`
	// The port for incoming Lambda RPC requests
	Port uint16 `yaml:"port"`
}

func (*LambdaEntry) Environment

func (e *LambdaEntry) Environment(awsRemoteEnv map[string]string, endpointAddress string) (env []string)

Jump to

Keyboard shortcuts

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