mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
19 lines
593 B
Go
19 lines
593 B
Go
package driver
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type Driver interface {
|
|
List(ctx context.Context, revision, limit int64, rangeKey, startKey string) (kvs []*KeyValue, listRevision int64, err error)
|
|
|
|
Delete(ctx context.Context, key string, revision int64) ([]*KeyValue, error)
|
|
|
|
// Update should return ErrNotExist when the key does not exist and ErrRevisionMatch when revision doesn't match
|
|
Update(ctx context.Context, key string, value []byte, revision, ttl int64) (oldKv *KeyValue, newKv *KeyValue, err error)
|
|
|
|
Watch(ctx context.Context, key string, revision int64) <-chan Event
|
|
|
|
Close() error
|
|
}
|