Documentation
¶
Overview ¶
Package driver defines the interface for storage driver implementations. It provides a common interface for different storage backends like etcd and TCS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver interface {
// Execute executes a transactional operation with conditional logic.
// The transaction will execute thenOps if all predicates evaluate to true,
// otherwise it will execute elseOps.
Execute(
ctx context.Context,
predicates []predicate.Predicate,
thenOps []operation.Operation,
elseOps []operation.Operation,
) (tx.Response, error)
// Watch establishes a watch stream for changes to a specific key or prefix.
// The returned channel will receive events as changes occur.
// The returned cleanup function should be called to stop the watch and release resources.
// An error is returned if the watch could not be established.
Watch(ctx context.Context, key []byte, opts ...watch.Option) (<-chan watch.Event, func(), error)
}
Driver is the interface that storage drivers must implement. It provides low-level operations for transaction execution and watch functionality.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package etcd provides an etcd implementation of the storage driver interface.
|
Package etcd provides an etcd implementation of the storage driver interface. |
|
Package tcs provides a Tarantool config storage driver implementation.
|
Package tcs provides a Tarantool config storage driver implementation. |
Click to show internal directories.
Click to hide internal directories.