limited

package
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCompacted     = rpctypes.ErrGRPCCompacted
	ErrGRPCUnhealthy = rpctypes.ErrGRPCUnhealthy
)

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Start(ctx context.Context) error
	Stop() error
	Create(ctx context.Context, key, value []byte, lease int64) (int64, bool, error)
	Delete(ctx context.Context, key []byte, revision int64) (int64, bool, error)
	List(ctx context.Context, key, rangeEnd []byte, limit, revision int64) (int64, []*KeyValue, error)
	Count(ctx context.Context, key, rangeEnd []byte, revision int64) (int64, int64, error)
	Update(ctx context.Context, key, value []byte, revision, lease int64) (int64, bool, error)
	WatcherGroup(ctx context.Context) (WatcherGroup, error)
	DbSize(ctx context.Context) (int64, error)
	GetCompactRevision(ctx context.Context) (int64, int64, error)
	DoCompact(ctx context.Context) error
	Close() error
}

type CompactedError

type CompactedError struct {
	CompactRevision, CurrentRevision int64
}

func (*CompactedError) Error

func (e *CompactedError) Error() string

func (*CompactedError) Is

func (e *CompactedError) Is(target error) bool

type Config added in v1.7.0

type Config struct {
	// CompactInterval is interval between database compactions performed by k8s-dqlite.
	CompactInterval time.Duration

	// PollInterval is the event poll interval used by k8s-dqlite.
	PollInterval time.Duration

	// WatchQueryTimeout is the timeout on the after query in the poll loop.
	WatchQueryTimeout time.Duration
}

type Event

type Event = mvccpb.Event

type KVServerBridge

type KVServerBridge struct {
	// contains filtered or unexported fields
}

func New

func New(backend Backend, notifyInterval time.Duration) *KVServerBridge

func (*KVServerBridge) LeaseGrant

func (*KVServerBridge) LeaseKeepAlive

func (*KVServerBridge) Put

func (*KVServerBridge) Range

func (*KVServerBridge) Status

func (*KVServerBridge) Txn

func (*KVServerBridge) Watch

type KeyValue

type KeyValue = mvccpb.KeyValue

type LimitedServer

type LimitedServer struct {
	// contains filtered or unexported fields
}

func (*LimitedServer) Range

func (*LimitedServer) Txn

type RangeResponse

type RangeResponse struct {
	Header *etcdserverpb.ResponseHeader
	Kvs    []*KeyValue
	More   bool
	Count  int64
}

type ResponseHeader

type ResponseHeader struct {
	Revision int64
}

type WatcherGroup

type WatcherGroup interface {
	// Watch will add a watcher to the group. If startRevision is not 0, the first notification
	// containing an update for this watcher will also contain all events from startRevision
	// up to that notification.
	Watch(watcherId int64, key, rangeEnd []byte, startRevision int64) error
	Unwatch(watcherId int64)
	Updates() <-chan WatcherGroupUpdate
}

type WatcherGroupUpdate

type WatcherGroupUpdate interface {
	Revision() int64
	Watchers() []WatcherUpdate
}

type WatcherUpdate

type WatcherUpdate struct {
	WatcherId int64
	Events    []*Event
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL