lambdautil

package
v0.0.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

lambdautil package contains methods for interacting with AWS lambda funtion.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LambdaUtil

type LambdaUtil struct {
	AWSRegion             string `json:"awsRegion"`
	LambdaRole            string `json:"lambdaRole"`
	LambdaFuncName        string `json:"lambdaFuncName"`
	LambdaFunctionHandler string `json:"lambdaFunctionHandler"`
	LambdaFunctionRuntime string `json:"lambdaFunctionRuntime"`
	LambdaMemorySize      int64  `json:"lambdaMemorySize" yaml:"lambdaMemorySize"`
	LambdaTimeOut         int64  `json:"lambdaTimeOut" yaml:"lambdaTimeOut"`
	ZipFilePath           string `json:"zipFilePath"`
	AWSAccessKeyID        string `json:"awsAccessKeyID"`
	AWSSecretAccessKey    string `json:"awsSecretAccessKey`
	DeathLogger           zerolog.Logger
	AWSSession            *session.Session
}

LambdaUtil contains attributes and functions for interacting with AWS lambda functions It carries out operations like creating lambda functions, executing them and cleaning them.

func (*LambdaUtil) CreateFunction

func (lambdaUtil *LambdaUtil) CreateFunction() error

CreateFunction is used for creating the lambda function with the desired configs.

func (*LambdaUtil) DeleteFunction

func (lambdaUtil *LambdaUtil) DeleteFunction() error

DeleteFunction deletes the created lambda function.

func (*LambdaUtil) GetAWSSession

func (lambdaUtil *LambdaUtil) GetAWSSession() error

GetAWSSession creates an AWS session for interacting with lambda functions.

func (*LambdaUtil) RunFunction

func (lambdaUtil *LambdaUtil) RunFunction(lambdaRequest vegetaModels.LambdaRequest) (error, *vegeta.Metrics)

RunFunction invokes the created lambda function.

Jump to

Keyboard shortcuts

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