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 ¶
const DefaultEndpoint = "http://localhost:8000"
DefaultEndpoint is the endpoint the TableTheory examples expect DynamoDB Local to listen on.
Variables ¶
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 ¶
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. |