Documentation ¶
Index ¶
- func NewSQLAdminDB(cfg *config.SQL) (sqlplugin.AdminDB, error)
- func NewSQLDB(cfg *config.SQL) (sqlplugin.DB, error)
- func NewSQLExecutionStore(db sqlplugin.DB, logger log.Logger, shardID int, parser serialization.Parser) (p.ExecutionStore, error)
- func NewSQLVisibilityStore(cfg config.SQL, logger log.Logger) (p.VisibilityStore, error)
- func PluginRegistered(pluginName string) bool
- func RegisterPlugin(pluginName string, plugin sqlplugin.Plugin)
- func RegisterPluginIfNotExists(pluginName string, plugin sqlplugin.Plugin)
- type Factory
- func (f *Factory) Close()
- func (f *Factory) NewExecutionStore(shardID int) (p.ExecutionStore, error)
- func (f *Factory) NewHistoryV2Store() (p.HistoryStore, error)
- func (f *Factory) NewMetadataStore() (p.MetadataStore, error)
- func (f *Factory) NewQueue(queueType p.QueueType) (p.Queue, error)
- func (f *Factory) NewShardStore() (p.ShardStore, error)
- func (f *Factory) NewTaskStore() (p.TaskStore, error)
- func (f *Factory) NewVisibilityStore(sortByCloseTime bool) (p.VisibilityStore, error)
- type TestCluster
- func (s *TestCluster) Config() config.Persistence
- func (s *TestCluster) CreateDatabase()
- func (s *TestCluster) DatabaseName() string
- func (s *TestCluster) DropDatabase()
- func (s *TestCluster) LoadSchema(fileNames []string, schemaDir string)
- func (s *TestCluster) LoadVisibilitySchema(fileNames []string, schemaDir string)
- func (s *TestCluster) SetupTestDatabase()
- func (s *TestCluster) TearDownTestDatabase()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSQLAdminDB ¶ added in v0.11.0
NewSQLAdminDB returns a AdminDB
func NewSQLDB ¶ added in v0.11.0
NewSQLDB creates a returns a reference to a logical connection to the underlying SQL database. The returned object is to tied to a single SQL database and the object can be used to perform CRUD operations on the tables in the database
func NewSQLExecutionStore ¶ added in v0.5.0
func NewSQLExecutionStore( db sqlplugin.DB, logger log.Logger, shardID int, parser serialization.Parser, ) (p.ExecutionStore, error)
NewSQLExecutionStore creates an instance of ExecutionStore
func NewSQLVisibilityStore ¶ added in v0.5.0
NewSQLVisibilityStore creates an instance of ExecutionStore
func PluginRegistered ¶ added in v0.19.1
PluginRegistered returns true if plugin with given name has been registered, false otherwise
func RegisterPlugin ¶ added in v0.11.0
RegisterPlugin will register a SQL plugin
func RegisterPluginIfNotExists ¶ added in v0.19.1
RegisterPluginIfNotExists will register a SQL plugin only if a plugin with same name has not already been registered
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory vends store objects backed by MySQL
func NewFactory ¶
func NewFactory( cfg config.SQL, clusterName string, logger log.Logger, parser serialization.Parser, ) *Factory
NewFactory returns an instance of a factory object which can be used to create datastores backed by any kind of SQL store
func (*Factory) NewExecutionStore ¶
func (f *Factory) NewExecutionStore(shardID int) (p.ExecutionStore, error)
NewExecutionStore returns an ExecutionStore for a given shardID
func (*Factory) NewHistoryV2Store ¶ added in v0.5.0
func (f *Factory) NewHistoryV2Store() (p.HistoryStore, error)
NewHistoryV2Store returns a new history store
func (*Factory) NewMetadataStore ¶
func (f *Factory) NewMetadataStore() (p.MetadataStore, error)
NewMetadataStore returns a new metadata store
func (*Factory) NewShardStore ¶
func (f *Factory) NewShardStore() (p.ShardStore, error)
NewShardStore returns a new shard store
func (*Factory) NewTaskStore ¶
NewTaskStore returns a new task store
func (*Factory) NewVisibilityStore ¶
func (f *Factory) NewVisibilityStore(sortByCloseTime bool) (p.VisibilityStore, error)
NewVisibilityStore returns a visibility store TODO sortByCloseTime will be removed and implemented for https://github.com/uber/cadence/issues/3621
type TestCluster ¶
type TestCluster struct {
// contains filtered or unexported fields
}
TestCluster allows executing cassandra operations in testing.
func NewTestCluster ¶
func NewTestCluster(pluginName, dbName, username, password, host string, port int, schemaDir string) *TestCluster
NewTestCluster returns a new SQL test cluster
func (*TestCluster) Config ¶
func (s *TestCluster) Config() config.Persistence
Config returns the persistence config for connecting to this test cluster
func (*TestCluster) CreateDatabase ¶
func (s *TestCluster) CreateDatabase()
CreateDatabase from PersistenceTestCluster interface
func (*TestCluster) DatabaseName ¶
func (s *TestCluster) DatabaseName() string
DatabaseName from PersistenceTestCluster interface
func (*TestCluster) DropDatabase ¶
func (s *TestCluster) DropDatabase()
DropDatabase from PersistenceTestCluster interface
func (*TestCluster) LoadSchema ¶
func (s *TestCluster) LoadSchema(fileNames []string, schemaDir string)
LoadSchema from PersistenceTestCluster interface
func (*TestCluster) LoadVisibilitySchema ¶
func (s *TestCluster) LoadVisibilitySchema(fileNames []string, schemaDir string)
LoadVisibilitySchema from PersistenceTestCluster interface
func (*TestCluster) SetupTestDatabase ¶
func (s *TestCluster) SetupTestDatabase()
SetupTestDatabase from PersistenceTestCluster interface
func (*TestCluster) TearDownTestDatabase ¶
func (s *TestCluster) TearDownTestDatabase()
TearDownTestDatabase from PersistenceTestCluster interface