Help us shape the future of Go! Take the 2026 Go Developer Survey

cockroachdb

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2017 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCockroachDBBackend

func NewCockroachDBBackend(conf map[string]string, logger log.Logger) (physical.Backend, error)

NewCockroachDBBackend constructs a CockroachDB backend using the given API client, server address, credentials, and database.

Types

type CockroachDBBackend

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

CockroachDBBackend Backend is a physical backend that stores data within a CockroachDB database.

func (*CockroachDBBackend) Delete

func (c *CockroachDBBackend) Delete(key string) error

Delete is used to permanently delete an entry

func (*CockroachDBBackend) Get

func (c *CockroachDBBackend) Get(key string) (*physical.Entry, error)

Get is used to fetch and entry.

func (*CockroachDBBackend) List

func (c *CockroachDBBackend) List(prefix string) ([]string, error)

List is used to list all the keys under a given prefix, up to the next prefix.

func (*CockroachDBBackend) Put

func (c *CockroachDBBackend) Put(entry *physical.Entry) error

Put is used to insert or update an entry.

func (*CockroachDBBackend) Transaction

func (c *CockroachDBBackend) Transaction(txns []*physical.TxnEntry) error

Transaction is used to run multiple entries via a transaction

Jump to

Keyboard shortcuts

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