store

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKvOptionsWith added in v1.0.0

func NewKvOptionsWith(opts ...store.Option) []kv.Option

NewKvOptionsWith returns a new kv.options with the specified store options.

Types

type DocumentKvStore added in v1.0.0

type DocumentKvStore interface {
	DocumentStore
	KvStore() kv.Store
}

DocumentKvStore represents a document key-value store interface.

type DocumentStore added in v1.0.0

type DocumentStore interface {
	store.Store
}

DocumentStore represents a document store interface.

type Service

type Service interface {
	DocumentStore
	plugins.Service
}

Service represents a document store service interface.

type Store

type Store struct {
	document.Coder
	document.KeyCoder
	// contains filtered or unexported fields
}

Store represents a store interface.

func NewStore added in v0.9.0

func NewStore() *Store

NewStore returns a new store.

func NewStoreWith added in v0.9.0

func NewStoreWith(kvs kv.Store) *Store

NewStoreWith returns a new store with the specified key-value store service.

func (*Store) CreateDatabase

func (s *Store) CreateDatabase(ctx context.Context, name string) error

CreateDatabase creates a new database.

func (*Store) GetDatabase

func (s *Store) GetDatabase(ctx context.Context, name string) (store.Database, error)

GetDatabase retruns the specified database.

func (*Store) KvStore added in v0.9.0

func (s *Store) KvStore() kv.Store

KvStore returns the key-value store.

func (*Store) ListDatabases added in v0.9.0

func (s *Store) ListDatabases(ctx context.Context) ([]store.Database, error)

ListDatabases returns the all databases.

func (*Store) RemoveDatabase

func (s *Store) RemoveDatabase(ctx context.Context, name string) error

RemoveDatabase removes the specified database.

func (*Store) ServiceName

func (s *Store) ServiceName() string

ServiceName returns the plug-in service name.

func (*Store) ServiceType

func (s *Store) ServiceType() plugins.ServiceType

ServiceType returns the plug-in service type.

func (*Store) SetConfig added in v1.0.0

func (s *Store) SetConfig(conf config.Config)

SetConfig sets the specified configuration.

func (*Store) SetDocumentCoder added in v0.9.0

func (s *Store) SetDocumentCoder(coder document.Coder)

SetDocumentCoder sets the document coder.

func (*Store) SetKeyCoder added in v0.9.0

func (s *Store) SetKeyCoder(coder document.KeyCoder)

SetKeyCoder sets the key coder.

func (*Store) SetKvStore added in v0.9.0

func (s *Store) SetKvStore(kvs kv.Store)

SetKvStore sets the key-value store service.

func (*Store) Start

func (s *Store) Start() error

Start starts this store.

func (*Store) Stop

func (s *Store) Stop() error

Stop stops this store.

Directories

Path Synopsis
kv
fdb

Jump to

Keyboard shortcuts

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