Documentation ¶
Index ¶
- Constants
- func ConfigAdd(path string)
- func NewSession(ctx context.Context, plugins ...Plugin) (*gocql.Session, error)
- func NewSessionWithConfigPath(ctx context.Context, path string, plugins ...Plugin) (*gocql.Session, error)
- func NewSessionWithOptions(ctx context.Context, o *Options, plugins ...Plugin) (session *gocql.Session, err error)
- type ManagedSession
- func NewManagedSession(ctx context.Context, plugins ...Plugin) (*ManagedSession, error)
- func NewManagedSessionWithConfigPath(ctx context.Context, path string, plugins ...Plugin) (*ManagedSession, error)
- func NewManagedSessionWithOptions(ctx context.Context, opts *Options, plugins ...Plugin) (*ManagedSession, error)
- type Options
- type Plugin
Constants ¶
View Source
const (
PluginsRoot = root + ".plugins"
)
Variables ¶
This section is empty.
Functions ¶
func NewSession ¶
NewSession returns a new session with default options.
Types ¶
type ManagedSession ¶
ManagedSession represents a gocqsl managed session
func NewManagedSession ¶
func NewManagedSession(ctx context.Context, plugins ...Plugin) (*ManagedSession, error)
NewManagedSession returns a ManagedSession with default options.
func NewManagedSessionWithConfigPath ¶
func NewManagedSessionWithConfigPath(ctx context.Context, path string, plugins ...Plugin) (*ManagedSession, error)
NewManagedSessionWithConfigPath returns a ManagedSession with options from config path.
func NewManagedSessionWithOptions ¶
func NewManagedSessionWithOptions(ctx context.Context, opts *Options, plugins ...Plugin) (*ManagedSession, error)
NewManagedSessionWithOptions returns a ManagedSession with options.
type Options ¶
type Options struct { Hosts []string Port int DC string `config:"dc"` Username string Password string CQLVersion string `config:"CQLVersion"` ProtoVersion int Timeout time.Duration ConnectTimeout time.Duration Keyspace string NumConns int Consistency string SocketKeepalive time.Duration MaxPreparedStmts int MaxRoutingKeyInfo int PageSize int DefaultTimestamp bool ReconnectInterval time.Duration MaxWaitSchemaAgreement time.Duration DisableInitialHostLookup bool WriteCoalesceWaitTime time.Duration }
Options represents gocql options.
func NewOptions ¶
NewOptions returns options from config file or environment vars.
func NewOptionsWithPath ¶
NewOptionsWithPath unmarshals a given key path into options and returns it.
Click to show internal directories.
Click to hide internal directories.