Dynamic Configuration

Configuration that can be updated at runtime without restart.

Running

go run main.go

Server starts on http://localhost:3040

Features

Endpoints

Use Cases

Pattern

type ConfigStore struct {
    mu     sync.RWMutex
    values map[string]string
}

func (cs *ConfigStore) Get(key string) string {
    cs.mu.RLock()
    defer cs.mu.RUnlock()
    return cs.values[key]
}