Documentation ¶
Index ¶
- Variables
- func AddCqlQuery(q string)
- func Exec(q *gocqlx.Queryx) error
- func Get(q *gocqlx.Queryx, dest interface{}) error
- func Init(config Config) (err error)
- func MustInit(config Config)
- func New(config Config) (gocqlx.Session, error)
- func NewQueryFactory(genFunc queryBuilderFunc) *queryFactory
- func RunCqlQueries() error
- func Scan(q *gocqlx.Queryx, dest ...interface{}) error
- func Select(q *gocqlx.Queryx, dest interface{}) error
- func Session() gocqlx.Session
- func SetSpeculativeAttempts(attempts int)
- func SetSpeculativeDelay(delay time.Duration)
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultConfig = Config{ Concurrency: 5, Timeout: 600 * time.Millisecond, ConnectTimeout: 600 * time.Millisecond, Retries: 100, RetryMinBackOff: 100 * time.Millisecond, RetryMaxBackOff: time.Second, ReconnectInterval: 10 * time.Second, Consistency: gocql.LocalQuorum, SerialConsistency: gocql.LocalSerial, ReplicationClass: "SimpleStrategy", ReplicationFactor: 1, CqlVersion: "3.4.4", DefaultIdempotence: true, QueryObserver: nil, PageSize: 1000, WriteCoalesceWaitTime: time.Millisecond, } )
Functions ¶
func AddCqlQuery ¶
func AddCqlQuery(q string)
func NewQueryFactory ¶
func NewQueryFactory(genFunc queryBuilderFunc) *queryFactory
NewQueryFactory creates a query pool for cql queries
func RunCqlQueries ¶
func RunCqlQueries() error
func SetSpeculativeAttempts ¶
func SetSpeculativeAttempts(attempts int)
func SetSpeculativeDelay ¶
Types ¶
type Config ¶
type Config struct { Host string Username string Password string Keyspace string Retries int RetryMinBackOff time.Duration RetryMaxBackOff time.Duration ConnectTimeout time.Duration Timeout time.Duration ReconnectInterval time.Duration Concurrency int Consistency gocql.Consistency SerialConsistency gocql.SerialConsistency ReplicationClass string ReplicationFactor int CqlVersion string DefaultIdempotence bool QueryObserver gocql.QueryObserver PageSize int WriteCoalesceWaitTime time.Duration }
Click to show internal directories.
Click to hide internal directories.