Documentation
¶
Index ¶
- type Entry
- type Store
- func (s *Store) Delete(ctx context.Context, namespace, key string) error
- func (s *Store) DeleteNamespace(ctx context.Context, namespace string) error
- func (s *Store) Get(ctx context.Context, namespace, key string) (*Entry, error)
- func (s *Store) ListAll(ctx context.Context) ([]Entry, error)
- func (s *Store) ListNamespace(ctx context.Context, namespace string) ([]Entry, error)
- func (s *Store) ListNamespaces(ctx context.Context) ([]string, error)
- func (s *Store) ListSubscribers(ctx context.Context, namespace string) ([]db.Service, error)
- func (s *Store) ListSubscriptions(ctx context.Context, serviceID string) ([]string, error)
- func (s *Store) Set(ctx context.Context, namespace, key, value string) (*Entry, 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) DeleteNamespace ¶
DeleteNamespace removes all entries in a namespace.
func (*Store) ListNamespace ¶
ListNamespace returns all config entries in a namespace.
func (*Store) ListNamespaces ¶
ListNamespaces returns all distinct namespace names.
func (*Store) ListSubscribers ¶
ListSubscribers returns the services subscribed to a namespace.
func (*Store) ListSubscriptions ¶
ListSubscriptions returns the namespaces a service is subscribed to.
func (*Store) Set ¶
Set creates or updates a config entry. Publishes a config_updated event so subscribers are notified.
Click to show internal directories.
Click to hide internal directories.