lambda

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package lambda resolves a Lambda function to its log group. By default that is the convention /aws/lambda/<name>, but Lambda's advanced logging controls let a function write to a custom group, so the resolver reads GetFunctionConfiguration to pick that up (and to confirm the function exists). It also implements resolog.Lister over ListFunctions.

Index

Constants

View Source
const Scheme = "lambda"

Scheme is the reference scheme this Resolver handles. A reference is a function name or ARN: "lambda:<name>".

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API is the slice of the Lambda client this resolver needs. The real *lambda.Client satisfies it.

type Resolver

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

Resolver resolves Lambda functions into log sources.

func New

func New(api API) *Resolver

New builds a lambda Resolver from a Lambda client.

func (*Resolver) List

func (r *Resolver) List(ctx context.Context, filter string) ([]resolog.ResourceRef, error)

List implements resolog.Lister, enumerating functions whose name starts with filter (empty filter lists all).

func (*Resolver) Resolve

func (r *Resolver) Resolve(ctx context.Context, ref string) (resolog.Resolution, error)

Resolve implements resolog.Resolver. ref is a function name or ARN. A function's log group is never terminal, so Done is nil and following runs until the caller cancels.

func (*Resolver) Scheme

func (r *Resolver) Scheme() string

Scheme implements resolog.Resolver.

Jump to

Keyboard shortcuts

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