Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { CreateKeyspaces(ksc ...*KeyspaceConfig) error NewSession(cfg *SessionConfig) (*Session, error) NewBatchWriter(session *Session, c *WriterConfig, builderCreator func() StatementBuilder) writer.Writer }
Interface .
type KeyspaceConfig ¶
type KeyspaceConfig struct { Name string `file:"name" env:"CASSANDRA_KEYSPACE"` Auto bool `file:"auto"` Replication KeyspaceReplicationConfig `file:"replication"` }
KeyspaceConfig .
type KeyspaceReplicationConfig ¶
type KeyspaceReplicationConfig struct { Class string `file:"class" default:"SimpleStrategy"` Factor int32 `file:"factor" default:"2"` }
KeyspaceReplicationConfig .
type ReconnectionConfig ¶
type ReconnectionConfig struct { Enable bool `file:"enable" default:"true"` CheckInterval time.Duration `file:"check_interval" default:"10m"` CheckTimeout time.Duration `file:"check_timeout" default:"60s"` }
ReconnectionConfig .
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session manager of gocql.Session.
type SessionConfig ¶
type SessionConfig struct { Keyspace KeyspaceConfig `file:"keyspace"` Consistency string `file:"consistency" default:"LOCAL_ONE"` Reconnection ReconnectionConfig `file:"reconnection"` }
SessionConfig .
type StatementBuilder ¶
StatementBuilder .
type WriterConfig ¶
type WriterConfig struct { Parallelism uint64 `file:"parallelism" default:"4" desc:"parallelism"` Batch struct { SizeBytes int `file:"size_bytes" desc:"cassandra batch failed size bytes"` Size uint64 `file:"size" default:"100" desc:"batch size"` Timeout time.Duration `file:"timeout" default:"30s" desc:"timeout to flush buffer for batch write"` } `file:"batch"` Retry int `file:"retry" desc:"retry if fail to write"` }
WriterConfig .
Click to show internal directories.
Click to hide internal directories.