dynamodbprobe

package
v5.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package dynamodbprobe verifies that a local endpoint actually speaks the DynamoDB protocol instead of merely accepting HTTP connections.

The example Makefile targets use it to decide whether DynamoDB Local is already running, so a non-DynamoDB service listening on the example port is not mistaken for DynamoDB Local.

Index

Constants

View Source
const DefaultEndpoint = "http://localhost:8000"

DefaultEndpoint is the endpoint the TableTheory examples expect DynamoDB Local to listen on.

Variables

View Source
var ErrNotDynamoDB = errors.New("endpoint does not speak the DynamoDB protocol")

ErrNotDynamoDB reports that an endpoint did not complete a DynamoDB operation, which means it is not speaking the DynamoDB protocol. Callers can treat any error wrapping it as "not DynamoDB Local".

Functions

func CheckEndpoint

func CheckEndpoint(ctx context.Context, endpoint string) error

CheckEndpoint issues an explicit DynamoDB ListTables call against endpoint using static dummy credentials (the same dummy credentials the examples use).

It returns nil only when the endpoint behaves as a DynamoDB service. An endpoint that accepts HTTP but is not DynamoDB, an endpoint that cannot be reached, and an endpoint that answers with an unexpected body all yield a non-nil error wrapping ErrNotDynamoDB, so callers such as the example Makefiles fall back to starting DynamoDB Local themselves.

Types

This section is empty.

Directories

Path Synopsis
cmd
dynamodb-local-check command
Command dynamodb-local-check exits 0 when the endpoint speaks the DynamoDB protocol and non-zero with a clear message otherwise.
Command dynamodb-local-check exits 0 when the endpoint speaks the DynamoDB protocol and non-zero with a clear message otherwise.

Jump to

Keyboard shortcuts

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