testutils

package
v0.0.0-...-bef5c4b Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultTestFunctionARN     = "arn:aws:lambda:us-east-1:123456789012:function:test_function"
	DefaultTestFunctionVersion = "$LATEST"
)

Functions

func CreateTempSocketPath

func CreateTempSocketPath(t *testing.T) (string, error)

func JsonEncode

func JsonEncode(payload model.InitRequestMessage) string

func MakeInitPayload

func MakeInitPayload(opts ...InitPayloadOption) model.InitRequestMessage

func MakeInvalidInitPayload

func MakeInvalidInitPayload() string

func MakeValidInitPayload

func MakeValidInitPayload(opts ...InitPayloadOption) string

func NewH2CClient

func NewH2CClient() *http.Client

func NewUnixSocketClient

func NewUnixSocketClient(socketPath string) *http.Client

Types

type BlockingReadCloser

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

func NewBlockingReadCloser

func NewBlockingReadCloser() *BlockingReadCloser

func (*BlockingReadCloser) Close

func (r *BlockingReadCloser) Close() error

func (*BlockingReadCloser) Read

func (r *BlockingReadCloser) Read(p []byte) (int, error)

type InitPayloadOption

type InitPayloadOption func(*model.InitRequestMessage)

func WithArtefactType

func WithArtefactType(typ model.ArtefactType) InitPayloadOption

func WithEnvVars

func WithEnvVars(envVars model.KVMap) InitPayloadOption

func WithExecValues

func WithExecValues(artefact model.ArtefactType, cmd []string, cwd string) InitPayloadOption

func WithInvalidPayload

func WithInvalidPayload() InitPayloadOption

func WithLogFormat

func WithLogFormat(format string) InitPayloadOption

func WithLogLevel

func WithLogLevel(level string) InitPayloadOption

func WithTelemetry

func WithTelemetry(apiAddress netip.AddrPort, passphrase string) InitPayloadOption

func WithTimeouts

func WithTimeouts(invokeTimeout, initTimeout time.Duration) InitPayloadOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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