lambda

package
v0.69.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package lambda implements the aws.lambda source plugin: lists AWS Lambda functions and emits serverless_function evidence records with cross-vendor VPC-placement, tracing, and environment-variable-encryption attributes.

Index

Constants

View Source
const EvidenceTypeID = "serverless_function"

EvidenceTypeID is the evidence type this plugin emits.

View Source
const SourceID = "aws.lambda"

SourceID is the registered ID for the aws.lambda plugin instance.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	ListFunctions(ctx context.Context, params *awslambda.ListFunctionsInput, optFns ...func(*awslambda.Options)) (*awslambda.ListFunctionsOutput, error)
}

API is the subset of the Lambda client this plugin uses.

type Options

type Options struct {
	API    API
	Region string
	Now    func() time.Time
}

Options is the constructor input.

type Plugin

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

Plugin is the in-process aws.lambda source.

func New

func New(opts Options) *Plugin

New constructs a Plugin around an explicit API implementation.

func NewFromAWS

func NewFromAWS(ctx context.Context, region string, opts ...awscfg.Options) (*Plugin, error)

NewFromAWS constructs a Plugin backed by the real AWS SDK. The variadic opts carry per-instance credential settings (see internal/sources/aws/awscfg). Omitting them keeps the previous behavior: the ambient credential chain, scoped to region.

func (*Plugin) Collect

func (p *Plugin) Collect(ctx context.Context, req core.SlotRequest) ([]core.EvidenceRecord, error)

Collect lists functions and returns one serverless_function record per function.

func (*Plugin) Emits

func (*Plugin) Emits() []string

Emits returns the evidence types this plugin can produce.

func (*Plugin) ID

func (*Plugin) ID() string

ID returns the registered plugin ID.

func (*Plugin) Init

func (*Plugin) Init(context.Context, map[string]any) error

Init is a no-op; configuration is supplied to the constructor.

Jump to

Keyboard shortcuts

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