Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMissingHosts = errors.New("scylladb: hosts is empty")
Functions ¶
This section is empty.
Types ¶
type ClientSession ¶
ClientSession wraps the scylladb session.
func New ¶
func New(opt *Options) (*ClientSession, error)
New creates a scylladb session with the given configuration. Returns ErrMissingHosts if len(opts.Hosts) == 0. The remaining options aren't validaded.
type Options ¶
type Options struct { // Hosts can have one of the formats <ip/domain>:<port> // or <ip/domain>. The default port is 9042 Hosts []string Username string Password string // HostConns represents the number // of connections per host. HostConns int // Timeout limits a query or batch execution. Timeout time.Duration // ConnectTimeout is the available // time to stablish a connection. ConnectTimeout time.Duration // ReconnectInterval represents the interval between // each attempt on reconnecting to a known down node. ReconnectInterval time.Duration // Reconnection specifies a constant try and error reconnection // policy to use before trying to mark a host as down. Reconnection struct { MaxRetries int Interval time.Duration } }
Options contains a subset of CQL options.
Click to show internal directories.
Click to hide internal directories.