command
Version:
v1.1.5
Opens a new window with list of versions in this module.
Published: Mar 30, 2026
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
smplkit SDK Examples
Runnable examples demonstrating the smplkit Go SDK.
Note: These examples require valid smplkit credentials and a live environment — they are not self-contained demos.
Prerequisites
- Go 1.24+
- A valid smplkit API key (create one in the smplkit console).
- At least one config created in your smplkit account (every account comes with a
common config by default).
Config Showcase
File: config_showcase.go
An end-to-end walkthrough of the Smpl Config SDK covering:
- Client initialization —
smplkit.NewClient(apiKey)
- Management-plane CRUD — create, update, list, get by key, and delete configs
- Environment overrides —
SetValues() and SetValue() for per-environment configuration
- Multi-level inheritance — child → parent → common hierarchy setup
- Runtime value resolution —
Connect(), Get(), typed accessors (GetString, GetInt, GetBool)
- Real-time updates — WebSocket-driven cache invalidation with change listeners
- Manual refresh and cache diagnostics —
Refresh(), Stats()
Running
export SMPLKIT_API_KEY="sk_api_..."
go run examples/config_showcase.go
The script creates temporary configs, exercises all SDK features, then cleans up after itself.
Documentation
¶
Config Showcase — end-to-end walkthrough of the Smpl Config Go SDK.
Demonstrates the full SDK surface:
- Client initialization
- Management-plane CRUD: create, update, list, delete
- Environment-specific overrides (SetValues, SetValue)
- Multi-level inheritance
- Runtime value resolution: Connect, Get, typed accessors, Exists
- Real-time updates via WebSocket and change listeners
- Manual refresh and cache diagnostics
- Environment comparison
- Cleanup
Prerequisites:
- A valid smplkit API key exported as SMPLKIT_API_KEY
- At least one config in your account (every account has "common" by default)
Usage:
export SMPLKIT_API_KEY="sk_api_..."
go run examples/config_showcase.go
Source Files
¶
Click to show internal directories.
Click to hide internal directories.