Documentation
¶
Index ¶
- Constants
- Variables
- func GetPluginVisibilityQueryConverter(pluginName string) (sqlplugin.VisibilityQueryConverter, error)
- func NewQueueV2(db sqlplugin.DB, logger log.Logger, serializer serialization.Serializer) persistence.QueueV2
- func NewSQLAdminDB(dbKind sqlplugin.DbKind, cfg *config.SQL, r resolver.ServiceResolver, ...) (sqlplugin.AdminDB, error)
- func NewSQLDB(dbKind sqlplugin.DbKind, cfg *config.SQL, r resolver.ServiceResolver, ...) (sqlplugin.DB, error)
- func NewSQLExecutionStore(db sqlplugin.DB, logger log.Logger, serializer serialization.Serializer) (p.ExecutionStore, error)
- func NewSqlNexusEndpointStore(db sqlplugin.DB, logger log.Logger, serializer serialization.Serializer) (p.NexusEndpointStore, error)
- func RegisterPlugin(pluginName string, plugin sqlplugin.Plugin)
- func VerifyCompatibleVersion(cfg config.Persistence, r resolver.ServiceResolver, logger log.Logger) error
- type DbConn
- type Factory
- func (f *Factory) Close()
- func (f *Factory) GetDB() (sqlplugin.DB, error)
- func (f *Factory) NewClusterMetadataStore() (p.ClusterMetadataStore, error)
- func (f *Factory) NewExecutionStore() (p.ExecutionStore, error)
- func (f *Factory) NewFairTaskStore() (p.TaskStore, error)
- func (f *Factory) NewMetadataStore() (p.MetadataStore, error)
- func (f *Factory) NewNexusEndpointStore() (p.NexusEndpointStore, error)
- func (f *Factory) NewQueue(queueType p.QueueType) (p.Queue, error)
- func (f *Factory) NewQueueV2() (p.QueueV2, error)
- func (f *Factory) NewShardStore() (p.ShardStore, error)
- func (f *Factory) NewTaskStore() (p.TaskStore, error)
- type QueueV2Metadata
- type SqlStore
- 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(schemaFile string)
- func (s *TestCluster) SetupTestDatabase()
- func (s *TestCluster) TearDownTestDatabase()
Constants ¶
Variables ¶
var ErrPluginNotSupported = errors.New("plugin not supported")
Functions ¶
func GetPluginVisibilityQueryConverter ¶
func GetPluginVisibilityQueryConverter(pluginName string) (sqlplugin.VisibilityQueryConverter, error)
func NewQueueV2 ¶
func NewQueueV2(db sqlplugin.DB, logger log.Logger, serializer serialization.Serializer, ) persistence.QueueV2
NewQueueV2 returns an implementation of persistence.QueueV2.
func NewSQLAdminDB ¶
func NewSQLAdminDB( dbKind sqlplugin.DbKind, cfg *config.SQL, r resolver.ServiceResolver, logger log.Logger, mh metrics.Handler, ) (sqlplugin.AdminDB, error)
NewSQLAdminDB returns a AdminDB.
func NewSQLDB ¶
func NewSQLDB( dbKind sqlplugin.DbKind, cfg *config.SQL, r resolver.ServiceResolver, logger log.Logger, mh metrics.Handler, ) (sqlplugin.DB, error)
NewSQLDB creates a returns a reference to a logical connection to the underlying SQL database. The returned object is tied to a single SQL database and the object can be used to perform CRUD operations on the tables in the database.
func NewSQLExecutionStore ¶
func NewSQLExecutionStore( db sqlplugin.DB, logger log.Logger, serializer serialization.Serializer, ) (p.ExecutionStore, error)
NewSQLExecutionStore creates an instance of ExecutionStore
func NewSqlNexusEndpointStore ¶
func NewSqlNexusEndpointStore( db sqlplugin.DB, logger log.Logger, serializer serialization.Serializer, ) (p.NexusEndpointStore, error)
func RegisterPlugin ¶
RegisterPlugin will register a SQL plugin
func VerifyCompatibleVersion ¶
func VerifyCompatibleVersion( cfg config.Persistence, r resolver.ServiceResolver, logger log.Logger, ) error
VerifyCompatibleVersion ensures that the installed version of temporal and visibility is greater than or equal to the expected version.
Types ¶
type DbConn ¶
DbConn represents a logical mysql connection - its a wrapper around the standard sql connection pool with additional reference counting
func NewRefCountedDBConn ¶
func NewRefCountedDBConn( dbKind sqlplugin.DbKind, cfg *config.SQL, r resolver.ServiceResolver, logger log.Logger, metricsHandler metrics.Handler, ) DbConn
NewRefCountedDBConn returns a logical mysql connection that uses reference counting to decide when to close the underlying connection object. The reference count gets incremented everytime get() is called and decremented everytime Close() is called
func (*DbConn) ForceClose ¶
func (c *DbConn) ForceClose()
ForceClose ignores reference counts and shutsdown the underlying connection pool
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory vends store objects backed by MySQL
func NewFactory ¶
func NewFactory( cfg config.SQL, r resolver.ServiceResolver, clusterName string, logger log.Logger, metricsHandler metrics.Handler, serializer serialization.Serializer, ) *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) NewClusterMetadataStore ¶
func (f *Factory) NewClusterMetadataStore() (p.ClusterMetadataStore, error)
NewClusterMetadataStore returns a new ClusterMetadata store
func (*Factory) NewExecutionStore ¶
func (f *Factory) NewExecutionStore() (p.ExecutionStore, error)
NewExecutionStore returns a new ExecutionStore
func (*Factory) NewFairTaskStore ¶
NewFairTaskStore returns a new task store
func (*Factory) NewMetadataStore ¶
func (f *Factory) NewMetadataStore() (p.MetadataStore, error)
NewMetadataStore returns a new metadata store
func (*Factory) NewNexusEndpointStore ¶
func (f *Factory) NewNexusEndpointStore() (p.NexusEndpointStore, error)
NewNexusEndpointStore returns a new NexusEndpointStore
func (*Factory) NewQueueV2 ¶
NewQueueV2 returns a new data-access object for queues and messages.
func (*Factory) NewShardStore ¶
func (f *Factory) NewShardStore() (p.ShardStore, error)
NewShardStore returns a new shard store
type QueueV2Metadata ¶
type QueueV2Metadata struct {
Metadata *persistencespb.Queue
Version int64
}
type SqlStore ¶
TODO: Rename all SQL Managers to Stores
func NewSQLStore ¶
func NewSQLStore(db sqlplugin.DB, logger log.Logger, serializer serialization.Serializer) SqlStore
type TestCluster ¶
type TestCluster struct {
// contains filtered or unexported fields
}
TestCluster allows executing cassandra operations in testing.
func NewTestCluster ¶
func NewTestCluster( pluginName string, dbName string, username string, password string, host string, port int, connectAttributes map[string]string, schemaDir string, faultInjection *config.FaultInjection, logger log.Logger, ) *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(schemaFile string)
LoadSchema 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
Source Files
¶
- cluster_metadata.go
- common.go
- errors.go
- execution.go
- execution_state_map.go
- execution_state_non_map.go
- execution_tasks.go
- execution_util.go
- factory.go
- history_store.go
- metadata.go
- nexus_endpoint_store.go
- queue.go
- queue_v2.go
- shard.go
- store.go
- task_queues.go
- task_store.go
- task_user_data.go
- task_util.go
- task_v1.go
- task_v2.go
- test_sql_persistence.go
- version_checker.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package sqlplugin is a generated GoMock package.
|
Package sqlplugin is a generated GoMock package. |