Documentation
¶
Index ¶
- func New(ctx context.Context, connection string, tlsInfo tls.Config) (server.Backend, error)
- func NewLegacy(ctx context.Context, connection string, tlsInfo tls.Config) (server.Backend, error)
- type Backend
- func (b *Backend) Close() error
- func (b *Backend) Compact(ctx context.Context, revision int64) (int64, error)
- func (b *Backend) Count(ctx context.Context, prefix, startKey string, revision int64) (int64, int64, error)
- func (b *Backend) Create(ctx context.Context, key string, value []byte, lease int64) (int64, error)
- func (b *Backend) CurrentRevision(ctx context.Context) (int64, error)
- func (b *Backend) DbSize(ctx context.Context) (int64, error)
- func (b *Backend) Delete(ctx context.Context, key string, revision int64) (int64, *server.KeyValue, bool, error)
- func (b *Backend) Get(ctx context.Context, key, rangeEnd string, limit, revision int64) (int64, *server.KeyValue, error)
- func (b *Backend) List(ctx context.Context, prefix, startKey string, limit, maxRevision int64) (int64, []*server.KeyValue, error)
- func (b *Backend) Start(ctx context.Context) error
- func (b *Backend) Update(ctx context.Context, key string, value []byte, revision, lease int64) (int64, *server.KeyValue, bool, error)
- func (b *Backend) Watch(ctx context.Context, prefix string, startRevision int64) server.WatchResult
- type BackendLogger
- func (b *BackendLogger) Compact(ctx context.Context, revision int64) (int64, error)
- func (b *BackendLogger) Count(ctx context.Context, prefix, startKey string, revision int64) (revRet int64, count int64, err error)
- func (b *BackendLogger) Create(ctx context.Context, key string, value []byte, lease int64) (revRet int64, errRet error)
- func (b *BackendLogger) CurrentRevision(ctx context.Context) (int64, error)
- func (b *BackendLogger) DbSize(ctx context.Context) (int64, error)
- func (b *BackendLogger) Delete(ctx context.Context, key string, revision int64) (revRet int64, kvRet *server.KeyValue, deletedRet bool, errRet error)
- func (b *BackendLogger) Get(ctx context.Context, key, rangeEnd string, limit, revision int64) (revRet int64, kvRet *server.KeyValue, errRet error)
- func (b *BackendLogger) List(ctx context.Context, prefix, startKey string, limit, revision int64) (revRet int64, kvRet []*server.KeyValue, errRet error)
- func (b *BackendLogger) Start(ctx context.Context) error
- func (b *BackendLogger) Update(ctx context.Context, key string, value []byte, revision, lease int64) (revRet int64, kvRet *server.KeyValue, updateRet bool, errRet error)
- func (b *BackendLogger) Watch(ctx context.Context, prefix string, revision int64) server.WatchResult
- type Config
- type KeyValue
- func (e *KeyValue) BucketRevision() int64
- func (e *KeyValue) BucketSize(ctx context.Context) (int64, error)
- func (e *KeyValue) Count(ctx context.Context, prefix, startKey string, revision int64) (int64, error)
- func (e *KeyValue) Create(ctx context.Context, key string, value []byte) (uint64, error)
- func (e *KeyValue) Delete(ctx context.Context, key string, opts ...jetstream.KVDeleteOpt) error
- func (e *KeyValue) Get(ctx context.Context, key string) (jetstream.KeyValueEntry, error)
- func (e *KeyValue) GetRevision(ctx context.Context, key string, revision uint64) (jetstream.KeyValueEntry, error)
- func (e *KeyValue) List(ctx context.Context, prefix, startKey string, limit, revision int64) ([]jetstream.KeyValueEntry, error)
- func (e *KeyValue) Update(ctx context.Context, key string, value []byte, last uint64) (uint64, error)
- func (e *KeyValue) Watch(ctx context.Context, keys string, startRev int64) (jetstream.KeyWatcher, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backend ¶ added in v0.11.0
type Backend struct {
// contains filtered or unexported fields
}
func (*Backend) Compact ¶ added in v0.11.9
Compact is a no-op / not implemented. Revision history is managed by the jetstream bucket.
func (*Backend) Count ¶ added in v0.11.0
func (b *Backend) Count(ctx context.Context, prefix, startKey string, revision int64) (int64, int64, error)
Count returns an exact count of the number of matching keys and the current revision of the database.
func (*Backend) Create ¶ added in v0.11.0
Create attempts to create the key-value entry and returns the revision number.
func (*Backend) CurrentRevision ¶ added in v0.11.2
CurrentRevision returns the current revision of the database.
func (*Backend) Get ¶ added in v0.11.0
func (b *Backend) Get(ctx context.Context, key, rangeEnd string, limit, revision int64) (int64, *server.KeyValue, error)
Get returns the store's current revision, the associated server.KeyValue or an error.
func (*Backend) List ¶ added in v0.11.0
func (b *Backend) List(ctx context.Context, prefix, startKey string, limit, maxRevision int64) (int64, []*server.KeyValue, error)
List returns a range of keys starting with the prefix. This would translated to one or more tokens, e.g. `a.b.c`. The startKey would be the next set of tokens that follow the prefix that are alphanumerically equal to or greater than the startKey. If limit is provided, the maximum set of matches is limited. If revision is provided, this indicates the maximum revision to return.
func (*Backend) Start ¶ added in v0.11.0
Start starts the backend. See https://github.com/kubernetes/kubernetes/blob/442a69c3bdf6fe8e525b05887e57d89db1e2f3a5/staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go#L97
type BackendLogger ¶ added in v0.11.0
type BackendLogger struct {
// contains filtered or unexported fields
}
func (*BackendLogger) Compact ¶ added in v0.11.9
Compact is a no-op / not implemented. Revision history is managed by the jetstream bucket.
func (*BackendLogger) Count ¶ added in v0.11.0
func (b *BackendLogger) Count(ctx context.Context, prefix, startKey string, revision int64) (revRet int64, count int64, err error)
Count returns an exact count of the number of matching keys and the current revision of the database
func (*BackendLogger) Create ¶ added in v0.11.0
func (b *BackendLogger) Create(ctx context.Context, key string, value []byte, lease int64) (revRet int64, errRet error)
Create attempts to create the key-value entry and returns the revision number.
func (*BackendLogger) CurrentRevision ¶ added in v0.11.2
func (b *BackendLogger) CurrentRevision(ctx context.Context) (int64, error)
CurrentRevision returns the current revision of the database.
func (*BackendLogger) DbSize ¶ added in v0.11.0
func (b *BackendLogger) DbSize(ctx context.Context) (int64, error)
DbSize get the kineBucket size from JetStream.
func (*BackendLogger) Get ¶ added in v0.11.0
func (b *BackendLogger) Get(ctx context.Context, key, rangeEnd string, limit, revision int64) (revRet int64, kvRet *server.KeyValue, errRet error)
Get returns the store's current revision, the associated server.KeyValue or an error.
func (*BackendLogger) Start ¶ added in v0.11.0
func (b *BackendLogger) Start(ctx context.Context) error
func (*BackendLogger) Watch ¶ added in v0.11.0
func (b *BackendLogger) Watch(ctx context.Context, prefix string, revision int64) server.WatchResult
type KeyValue ¶ added in v0.11.0
type KeyValue struct {
// contains filtered or unexported fields
}
func NewKeyValue ¶ added in v0.11.0
func (*KeyValue) BucketRevision ¶ added in v0.11.0
BucketRevision returns the latest revision of the bucket.
func (*KeyValue) BucketSize ¶ added in v0.11.0
BucketSize returns the size of the bucket in bytes.