Documentation ¶
Index ¶
- func CreateCassandraKeyspace(s *gocql.Session, keyspace string, replicas int, overwrite bool) (err error)
- func DropCassandraKeyspace(s *gocql.Session, keyspace string) (err error)
- func LoadCassandraSchema(dir string, fileNames []string, hosts []string, port int, keyspace string, ...) (err error)
- func NewCassandraCluster(clusterHosts string, port int, user, password, dc string) *gocql.ClusterConfig
- func NewHistoryPersistenceFromSession(session *gocql.Session, logger log.Logger) p.HistoryStore
- func NewHistoryV2PersistenceFromSession(session *gocql.Session, logger log.Logger) p.HistoryV2Store
- func NewVisibilityPersistenceV2(persistence p.VisibilityStore, cfg *config.Cassandra, logger log.Logger) (p.VisibilityStore, error)
- func NewWorkflowExecutionPersistence(shardID int, session *gocql.Session, logger log.Logger) (p.ExecutionStore, error)
- func NewWorkflowExecutionPersistenceFromSession(session *gocql.Session, shardID int, logger log.Logger) *cassandraPersistence
- type Factory
- func (f *Factory) Close()
- func (f *Factory) NewExecutionStore(shardID int) (p.ExecutionStore, error)
- func (f *Factory) NewHistoryStore() (p.HistoryStore, error)
- func (f *Factory) NewHistoryV2Store() (p.HistoryV2Store, error)
- func (f *Factory) NewMetadataStore() (p.MetadataStore, error)
- func (f *Factory) NewMetadataStoreV1() (p.MetadataStore, error)
- func (f *Factory) NewMetadataStoreV2() (p.MetadataStore, error)
- func (f *Factory) NewShardStore() (p.ShardStore, error)
- func (f *Factory) NewTaskStore() (p.TaskStore, error)
- func (f *Factory) NewVisibilityStore() (p.VisibilityStore, error)
- type TestCluster
- func (s *TestCluster) Config() config.Persistence
- func (s *TestCluster) CreateDatabase()
- func (s *TestCluster) CreateSession()
- 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 CreateCassandraKeyspace ¶
func CreateCassandraKeyspace(s *gocql.Session, keyspace string, replicas int, overwrite bool) (err error)
CreateCassandraKeyspace creates the keyspace using this session for given replica count
func DropCassandraKeyspace ¶
DropCassandraKeyspace drops the given keyspace, if it exists
func LoadCassandraSchema ¶
func LoadCassandraSchema( dir string, fileNames []string, hosts []string, port int, keyspace string, override bool, ) (err error)
LoadCassandraSchema loads the schema from the given .cql files on this keyspace
func NewCassandraCluster ¶
func NewCassandraCluster(clusterHosts string, port int, user, password, dc string) *gocql.ClusterConfig
NewCassandraCluster creates a cassandra cluster given comma separated list of clusterHosts
func NewHistoryPersistenceFromSession ¶ added in v0.5.0
NewHistoryPersistenceFromSession return HistoryStore
func NewHistoryV2PersistenceFromSession ¶ added in v0.5.0
NewHistoryV2PersistenceFromSession returns new HistoryV2Store
func NewVisibilityPersistenceV2 ¶ added in v0.5.3
func NewVisibilityPersistenceV2(persistence p.VisibilityStore, cfg *config.Cassandra, logger log.Logger) (p.VisibilityStore, error)
NewVisibilityPersistenceV2 create a wrapper of cassandra visibilityPersistence, with all list closed executions using v2 table
func NewWorkflowExecutionPersistence ¶
func NewWorkflowExecutionPersistence(shardID int, session *gocql.Session, logger log.Logger) (p.ExecutionStore, error)
NewWorkflowExecutionPersistence is used to create an instance of workflowExecutionManager implementation
Types ¶
type Factory ¶
Factory vends datastore implementations backed by cassandra
func NewFactory ¶
NewFactory returns an instance of a factory object which can be used to create datastores that are backed by cassandra
func (*Factory) NewExecutionStore ¶
func (f *Factory) NewExecutionStore(shardID int) (p.ExecutionStore, error)
NewExecutionStore returns an ExecutionStore for a given shardID
func (*Factory) NewHistoryStore ¶
func (f *Factory) NewHistoryStore() (p.HistoryStore, error)
NewHistoryStore returns a new history store
func (*Factory) NewHistoryV2Store ¶ added in v0.5.0
func (f *Factory) NewHistoryV2Store() (p.HistoryV2Store, 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) NewMetadataStoreV1 ¶
func (f *Factory) NewMetadataStoreV1() (p.MetadataStore, error)
NewMetadataStoreV1 returns a metadatastore that understands only v1
func (*Factory) NewMetadataStoreV2 ¶
func (f *Factory) NewMetadataStoreV2() (p.MetadataStore, error)
NewMetadataStoreV2 returns a metadatastore that understands only v2
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() (p.VisibilityStore, error)
NewVisibilityStore returns a visibility store
type TestCluster ¶
type TestCluster struct {
// contains filtered or unexported fields
}
TestCluster allows executing cassandra operations in testing.
func NewTestCluster ¶
func NewTestCluster(keyspace string, port int, schemaDir string) *TestCluster
NewTestCluster returns a new cassandra 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) CreateSession ¶
func (s *TestCluster) CreateSession()
CreateSession 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
Source Files ¶
- cassandraHelpers.go
- cassandraHistoryPersistence.go
- cassandraHistoryV2Persistence.go
- cassandraMetadataPersistence.go
- cassandraMetadataPersistenceProxy.go
- cassandraMetadataPersistenceV2.go
- cassandraPersistence.go
- cassandraPersistenceTest.go
- cassandraVisibilityPersistence.go
- cassandraVisibilityPersistenceV2.go
- factory.go