Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Servers []string `validate:"nonzero"` Keyspace string `validate:"nonzero"` ConnectionsPerHost int `validate:"min=1" yaml:"connections_per_host"` Timeout time.Duration `validate:"min=500"` SocketKeepAlive time.Duration `validate:"min=0" yaml:"socket_keep_alive"` MaxRetryAttempts int `validate:"min=0" yaml:"max_retry_attempt"` ProtoVersion int `yaml:"proto_version"` Consistency string `yaml:"consistency"` Port int `yaml:"port"` }
Configuration describes the configuration properties needed to connect to a Cassandra cluster
func (*Configuration) ApplyDefaults ¶
func (c *Configuration) ApplyDefaults(source *Configuration)
ApplyDefaults copies settings from source unless its own value is non-zero.
func (*Configuration) NewCluster ¶
func (c *Configuration) NewCluster() *gocql.ClusterConfig
NewCluster creates a new gocql cluster from the configuration
func (*Configuration) NewSession ¶
func (c *Configuration) NewSession() (cassandra.Session, error)
NewSession creates a new Cassandra session
func (*Configuration) String ¶
func (c *Configuration) String() string
Click to show internal directories.
Click to hide internal directories.