nosql

package
v1.2.9-prerelease1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRegisteredPluginNames

func GetRegisteredPluginNames() []string

GetRegisteredPluginNames returns the list of registered plugin names

func NewExecutionStore

func NewExecutionStore(
	shardID int,
	db nosqlplugin.DB,
	logger log.Logger,
) (persistence.ExecutionStore, error)

NewExecutionStore is used to create an instance of ExecutionStore implementation

func NewNoSQLAdminDB

func NewNoSQLAdminDB(cfg *config.NoSQL, logger log.Logger, dc *persistence.DynamicConfiguration) (nosqlplugin.AdminDB, error)

NewNoSQLAdminDB returns a AdminDB

func NewNoSQLDB

func NewNoSQLDB(cfg *config.NoSQL, logger log.Logger, dc *persistence.DynamicConfiguration) (nosqlplugin.DB, error)

NewNoSQLDB creates a returns a reference to a logical connection to the underlying NoSQL database. The returned object is to tied to a single NoSQL database and the object can be used to perform CRUD operations on the tables in the database

func NewTestCluster

NewTestCluster returns a new cassandra test cluster if schemaBaseDir is empty, it will be auto-resolved based on os.Getwd() otherwise the specified value will be used (used by internal tests)

func PluginRegistered

func PluginRegistered(pluginName string) bool

PluginRegistered returns true if plugin with given name has been registered, false otherwise

func RegisterPlugin

func RegisterPlugin(pluginName string, plugin nosqlplugin.Plugin)

RegisterPlugin will register a NoSQL plugin

func RegisterPluginIfNotExists

func RegisterPluginIfNotExists(pluginName string, plugin nosqlplugin.Plugin)

RegisterPluginIfNotExists will register a NoSQL plugin only if a plugin with same name has not already been registered

Types

type Factory

type Factory struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Factory vends datastore implementations backed by cassandra

func NewFactory

func NewFactory(cfg config.ShardedNoSQL, clusterName string, logger log.Logger, dc *persistence.DynamicConfiguration) *Factory

NewFactory returns an instance of a factory object which can be used to create datastores that are backed by cassandra

func (*Factory) Close

func (f *Factory) Close()

Close closes the factory

func (*Factory) NewConfigStore

func (f *Factory) NewConfigStore() (persistence.ConfigStore, error)

NewConfigStore returns a new config store

func (*Factory) NewDomainStore

func (f *Factory) NewDomainStore() (persistence.DomainStore, error)

NewDomainStore returns a metadata store that understands only v2

func (*Factory) NewExecutionStore

func (f *Factory) NewExecutionStore(shardID int) (persistence.ExecutionStore, error)

NewExecutionStore returns an ExecutionStore for a given shardID

func (*Factory) NewHistoryStore

func (f *Factory) NewHistoryStore() (persistence.HistoryStore, error)

NewHistoryStore returns a new history store

func (*Factory) NewQueue

func (f *Factory) NewQueue(queueType persistence.QueueType) (persistence.Queue, error)

NewQueue returns a new queue backed by cassandra

func (*Factory) NewShardStore

func (f *Factory) NewShardStore() (persistence.ShardStore, error)

NewShardStore returns a new shard store

func (*Factory) NewTaskStore

func (f *Factory) NewTaskStore() (persistence.TaskStore, error)

NewTaskStore returns a new task store

func (*Factory) NewVisibilityStore

func (f *Factory) NewVisibilityStore(sortByCloseTime bool) (persistence.VisibilityStore, error)

NewVisibilityStore returns a visibility store

type ShardingError added in v1.2.1

type ShardingError struct {
	Message string
}

ShardingError represents invalid shard

func (*ShardingError) Error added in v1.2.1

func (e *ShardingError) Error() string

type TestClusterParams added in v1.2.7

type TestClusterParams struct {
	PluginName    string
	KeySpace      string
	Username      string
	Password      string
	Host          string
	Port          int
	ProtoVersion  int
	SchemaBaseDir string
}

TestClusterParams are params for test cluster initialization.

Directories

Path Synopsis
Package nosqlplugin is a generated GoMock package.
Package nosqlplugin is a generated GoMock package.
cassandra/gocql
Package gocql is a generated GoMock package.
Package gocql is a generated GoMock package.

Jump to

Keyboard shortcuts

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