Documentation
¶
Index ¶
- type Entry
- type Store
- func (s *Store) Delete(ctx context.Context, namespace, key string) error
- func (s *Store) Get(ctx context.Context, namespace, key string) (*Entry, error)
- func (s *Store) GetAPIKey(ctx context.Context) (string, error)
- func (s *Store) Set(ctx context.Context, namespace, key, value string) (*Entry, error)
- func (s *Store) SetAPIKey(ctx context.Context, value string) error
- func (s *Store) Subscribe(ctx context.Context, serviceID, namespace string) error
- func (s *Store) Unsubscribe(ctx context.Context, serviceID, namespace string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
Namespace string `json:"namespace"`
Key string `json:"key"`
Value string `json:"value"`
UpdatedAt string `json:"updated_at"`
}
Entry represents a config entry with its metadata.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages the shared configuration key-value store.
func (*Store) GetAPIKey ¶ added in v0.4.0
GetAPIKey returns the persisted Pulse API key, or empty string if one has never been stored. Typed wrapper around Get so the config package's EnsureAPIKey helper can consume this store through a small interface.
func (*Store) Set ¶
Set creates or updates a config entry. Publishes a config_updated event so subscribers are notified.
func (*Store) SetAPIKey ¶ added in v0.4.0
SetAPIKey persists a new Pulse API key. Typed wrapper around Set.