Prerequisites
- Go 1.21 or later
- A Flagmint account and SDK API key (starts with
ff_)
Management API coming soon. Programmatic flag creation via API is not yet available. Create and manage flags in the Flagmint dashboard.
Installation
Your First Flag
What’s happening
| Step | Description |
|---|---|
NewClient | Creates the client and starts connecting asynchronously |
WithContext | Sets the evaluation context (who is requesting the flag) |
Ready | Blocks until flags are fetched from the server or the timeout expires |
BoolFlag | Returns the flag value, or false (the fallback) if not set |
Subscribing to Flag Changes
Register a callback to react whenever flags are updated:Next Steps
Configuration
All
With* options, endpoint overrides, and logger setupLocal Evaluation
Evaluate flags in-process — no network round-trip
Transport
WebSocket vs HTTP, reconnection, and fallback behaviour
Caching
Built-in cache, TTL, and custom adapters