kv

package
v0.13.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBackend

func NewBackend(logger logger.Logger, v3ioContext v3io.Context, config *frames.BackendConfig, framesConfig *frames.Config) (frames.DataBackend, error)

NewBackend returns a new NoSQL (key/value) backend

Types

type Appender

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

Appender is key/value appender

func (*Appender) Add

func (a *Appender) Add(frame frames.Frame) error

Add adds a frame

func (*Appender) Close

func (a *Appender) Close()

func (*Appender) WaitForComplete

func (a *Appender) WaitForComplete(timeout time.Duration) error

WaitForComplete waits for write to complete

type Backend

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

Backend is NoSQL (key/value) backend

func (*Backend) Create

func (b *Backend) Create(request *frames.CreateRequest) error

Create creates a table - not required for the NoSQL backend

func (*Backend) Delete

func (b *Backend) Delete(request *frames.DeleteRequest) error

Delete deletes a table (or part of it)

func (*Backend) Exec

func (b *Backend) Exec(request *frames.ExecRequest) (frames.Frame, error)

Exec executes a command

func (*Backend) Read

func (kv *Backend) Read(request *frames.ReadRequest) (frames.FrameIterator, error)

Read sends a read request

func (*Backend) Write

func (kv *Backend) Write(request *frames.WriteRequest) (frames.FrameAppender, error)

Write supports writing to the backend

type Iterator

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

Iterator is key/value iterator

func (*Iterator) At

func (ki *Iterator) At() frames.Frame

At returns the current frames

func (*Iterator) Err

func (ki *Iterator) Err() error

Err returns the last error

func (*Iterator) Next

func (ki *Iterator) Next() bool

Next advances the iterator to next frame

Jump to

Keyboard shortcuts

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