Documentation ¶
Index ¶
- Constants
- func BuildCLIOptions() *cli.App
- func CheckCompatibleVersion(cfg config.Cassandra, expectedVersion string) error
- func RunTool(args []string) error
- func SetupSchema(config *SetupSchemaConfig) error
- func VerifyCompatibleVersion(cfg config.Persistence) error
- type CQLClientConfig
- type CqlClient
- func (client *CqlClient) Close()
- func (client *CqlClient) CreateDatabase(name string) error
- func (client *CqlClient) CreateKeyspace(name string) error
- func (client *CqlClient) CreateSchemaVersionTables() error
- func (client *CqlClient) DropAllTables() error
- func (client *CqlClient) DropDatabase(name string) error
- func (client *CqlClient) DropKeyspace(name string) error
- func (client *CqlClient) Exec(stmt string, args ...interface{}) error
- func (client *CqlClient) ListTables() ([]string, error)
- func (client *CqlClient) ReadSchemaVersion() (string, error)
- func (client *CqlClient) UpdateSchemaVersion(newVersion string, minCompatibleVersion string) error
- func (client *CqlClient) WriteSchemaUpdateLog(oldVersion string, newVersion string, manifestMD5 string, desc string) error
- type SetupSchemaConfig
Constants ¶
const ( DefaultTimeout = 30 // Timeout in seconds DefaultCassandraPort = 9042 SystemKeyspace = "system" )
Variables ¶
This section is empty.
Functions ¶
func BuildCLIOptions ¶ added in v0.21.0
func CheckCompatibleVersion ¶ added in v0.3.3
CheckCompatibleVersion check the version compatibility
func SetupSchema ¶
func SetupSchema(config *SetupSchemaConfig) error
SetupSchema setups the cassandra schema
func VerifyCompatibleVersion ¶ added in v0.3.6
func VerifyCompatibleVersion( cfg config.Persistence, ) error
VerifyCompatibleVersion ensures that the installed version of cadence and visibility keyspaces is greater than or equal to the expected version. In most cases, the versions should match. However if after a schema upgrade there is a code rollback, the code version (expected version) would fall lower than the actual version in cassandra.
Types ¶
type CQLClientConfig ¶ added in v0.5.7
type CQLClientConfig struct { Hosts string Port int User string Password string Keyspace string Timeout int NumReplicas int TLS *config.TLS }
CQLClientConfig contains the configuration for cql client
type CqlClient ¶ added in v0.21.0
type CqlClient struct {
// contains filtered or unexported fields
}
func NewCQLClient ¶ added in v0.21.0
func NewCQLClient(cfg *CQLClientConfig) (*CqlClient, error)
NewCQLClient returns a new instance of CQLClient
func (*CqlClient) Close ¶ added in v0.21.0
func (client *CqlClient) Close()
Close closes the cql client
func (*CqlClient) CreateDatabase ¶ added in v0.21.0
func (*CqlClient) CreateKeyspace ¶ added in v0.21.0
createKeyspace creates a cassandra Keyspace if it doesn't exist
func (*CqlClient) CreateSchemaVersionTables ¶ added in v0.21.0
CreateSchemaVersionTables sets up the schema version tables
func (*CqlClient) DropAllTables ¶ added in v0.21.0
func (*CqlClient) DropDatabase ¶ added in v0.21.0
func (*CqlClient) DropKeyspace ¶ added in v0.21.0
DropKeyspace drops a Keyspace
func (*CqlClient) ListTables ¶ added in v0.21.0
ListTables lists the table names in a Keyspace
func (*CqlClient) ReadSchemaVersion ¶ added in v0.21.0
ReadSchemaVersion returns the current schema version for the Keyspace
func (*CqlClient) UpdateSchemaVersion ¶ added in v0.21.0
UpdateShemaVersion updates the schema version for the Keyspace
type SetupSchemaConfig ¶
type SetupSchemaConfig struct { CQLClientConfig schema.SetupConfig }
SetupSchemaConfig contains the configuration params needed to setup schema tables