lambda

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

View Source
const IndexPrefixLambdaReport = "lambda-reports"
View Source
const MonitorFunctionStsSessionName = "monitor-function"
View Source
const TemplateLineItem = `` /* 1355-byte string literal not displayed */
View Source
const TemplateNameLambdaReport = "lambda-reports"
View Source
const TypeLambdaReport = "lambda-report"

Variables

This section is empty.

Functions

func FetchDailyFunctionsStats

func FetchDailyFunctionsStats(ctx context.Context, awsAccount taws.AwsAccount) error

FetchDailyFunctionsStats fetches the stats of the Lambda functions of an AwsAccount to import them in ElasticSearch. The stats are fetched from the last hour. In this way, FetchFunctionsStats should be called every hour.

Types

type Duration

type Duration struct {
	Average float64 `json:"average"`
	Maximum float64 `json:"maximum"`
}

type Function

type Function struct {
	FunctionBase
	Tags  []utils.Tag `json:"tags"`
	Stats Stats       `json:"stats"`
}

Function contains all the information of an Lambda function

type FunctionBase

type FunctionBase struct {
	Name         string `json:"name"`
	Description  string `json:"description"`
	Version      string `json:"version"`
	LastModified string `json:"lastModified"`
	Runtime      string `json:"runtime"`
	Size         int64  `json:"size"`
	Memory       int64  `json:"memory"`
}

FunctionBase contains basics information of an Lambda function

type FunctionReport

type FunctionReport struct {
	utils.ReportBase
	Function Function `json:"function"`
}

FunctionReport is saved in ES to have all the information of an Lambda function

type Invocations

type Invocations struct {
	Total  float64 `json:"total"`
	Failed float64 `json:"failed"`
}

type Stats

type Stats struct {
	Invocations Invocations `json:"invocations"`
	Duration    Duration    `json:"duration"`
}

Stats contains statistics of an Lambda function

Jump to

Keyboard shortcuts

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