driver

package
v0.0.0-...-c36b4a8 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: BSD-2-Clause Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

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