Documentation
¶
Index ¶
- Variables
- type Bucket
- type Client
- type JSONBucket
- func (b *JSONBucket) Delete(ctx context.Context, key string) error
- func (b *JSONBucket) Get(ctx context.Context, key string) ([]byte, error)
- func (b *JSONBucket) ListKeys(ctx context.Context) ([]string, error)
- func (b *JSONBucket) Name() string
- func (b *JSONBucket) Set(ctx context.Context, key string, value []byte) error
- func (b *JSONBucket) Unwatch(w Watcher)
- func (b *JSONBucket) WatchAll(ctx context.Context) (Watcher, error)
- type JSONClient
- type JSONWatcher
- type Logged
- type LoggedBucket
- func (b *LoggedBucket) Delete(ctx context.Context, key string) error
- func (b *LoggedBucket) Get(ctx context.Context, key string) ([]byte, error)
- func (b *LoggedBucket) ListKeys(ctx context.Context) ([]string, error)
- func (b *LoggedBucket) Name() string
- func (b *LoggedBucket) Set(ctx context.Context, key string, value []byte) error
- func (b *LoggedBucket) Unwatch(w Watcher)
- func (b *LoggedBucket) WatchAll(ctx context.Context) (Watcher, error)
- type LoggedWatcher
- type NATSBucket
- func (b *NATSBucket) Delete(ctx context.Context, key string) error
- func (b *NATSBucket) Get(ctx context.Context, key string) ([]byte, error)
- func (b *NATSBucket) ListKeys(ctx context.Context) ([]string, error)
- func (b *NATSBucket) Name() string
- func (b *NATSBucket) Set(ctx context.Context, key string, value []byte) error
- func (b *NATSBucket) Unwatch(w Watcher)
- func (b *NATSBucket) WatchAll(ctx context.Context) (Watcher, error)
- type NATSClient
- type NATSOptions
- type NATSWatcher
- type Operation
- type Value
- type Watcher
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrKeyNotFound = errors.New("key not found")
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket interface {
Name() string
Get(ctx context.Context, key string) ([]byte, error)
Set(ctx context.Context, key string, value []byte) error
Delete(ctx context.Context, key string) error
WatchAll(ctx context.Context) (Watcher, error)
Unwatch(w Watcher)
ListKeys(ctx context.Context) ([]string, error)
}
type JSONBucket ¶
type JSONBucket struct {
BucketName string `json:"name"`
Data map[string][]byte `json:"data"`
// contains filtered or unexported fields
}
func (*JSONBucket) Name ¶
func (b *JSONBucket) Name() string
func (*JSONBucket) Unwatch ¶
func (b *JSONBucket) Unwatch(w Watcher)
type JSONClient ¶
type JSONClient struct {
// contains filtered or unexported fields
}
func NewJSONClient ¶
func NewJSONClient(store storage.Storage, fileName string) (*JSONClient, error)
type JSONWatcher ¶
type JSONWatcher struct {
// contains filtered or unexported fields
}
func (*JSONWatcher) Changes ¶
func (j *JSONWatcher) Changes() <-chan *Value
func (*JSONWatcher) Unwatch ¶
func (j *JSONWatcher) Unwatch()
type LoggedBucket ¶
type LoggedBucket struct {
// contains filtered or unexported fields
}
func (*LoggedBucket) ListKeys ¶
func (b *LoggedBucket) ListKeys(ctx context.Context) ([]string, error)
func (*LoggedBucket) Name ¶
func (b *LoggedBucket) Name() string
func (*LoggedBucket) Unwatch ¶
func (b *LoggedBucket) Unwatch(w Watcher)
type LoggedWatcher ¶
type LoggedWatcher struct {
// contains filtered or unexported fields
}
func (*LoggedWatcher) Changes ¶
func (w *LoggedWatcher) Changes() <-chan *Value
func (*LoggedWatcher) Unwatch ¶
func (w *LoggedWatcher) Unwatch()
type NATSBucket ¶
type NATSBucket struct {
// contains filtered or unexported fields
}
func (*NATSBucket) Name ¶
func (b *NATSBucket) Name() string
func (*NATSBucket) Unwatch ¶
func (b *NATSBucket) Unwatch(w Watcher)
type NATSClient ¶
type NATSClient struct {
// contains filtered or unexported fields
}
func NewNATSClient ¶
func NewNATSClient(js jetstream.JetStream) *NATSClient
type NATSOptions ¶
type NATSOptions struct {
URL string `json:"url"`
}
type NATSWatcher ¶
type NATSWatcher struct {
// contains filtered or unexported fields
}
func (*NATSWatcher) Changes ¶
func (w *NATSWatcher) Changes() <-chan *Value
func (*NATSWatcher) Unwatch ¶
func (w *NATSWatcher) Unwatch()
Click to show internal directories.
Click to hide internal directories.