Documentation
¶
Overview ¶
Package main implements a CLI for managing the Cosmos DB database and containers used by the protosource event store. Mirrors the Dynamo-side cmd/testdynamo-setup tool but speaks the Cosmos NoSQL API.
Quickstart against the local emulator (Linux/Windows host):
docker run --rm -p 8081:8081 -p 10250-10255:10250-10255 \ --name cosmos-emulator \ mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator export COSMOS_ENDPOINT=https://localhost:8081 export COSMOS_KEY='C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==' export COSMOS_INSECURE=1 # emulator uses a self-signed cert testcosmos-setup create
Against a real Azure account, prefer Managed Identity (set COSMOS_USE_DEFAULT_CREDENTIAL=1) and omit COSMOS_KEY.
Click to show internal directories.
Click to hide internal directories.