Documentation ¶
Index ¶
- type Authenticator
- type BasicAuthenticator
- type Configuration
- func (c *Configuration) ApplyDefaults(source *Configuration)
- func (c *Configuration) Close() error
- func (c *Configuration) NewCluster(logger *zap.Logger) (*gocql.ClusterConfig, error)
- func (c *Configuration) NewSession(logger *zap.Logger) (cassandra.Session, error)
- func (c *Configuration) String() string
- func (c *Configuration) Validate() error
- type SessionBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶ added in v0.6.0
type Authenticator struct {
Basic BasicAuthenticator `yaml:"basic" mapstructure:",squash"`
}
Authenticator holds the authentication properties needed to connect to a Cassandra cluster
type BasicAuthenticator ¶ added in v0.6.0
type BasicAuthenticator struct { Username string `yaml:"username" mapstructure:"username"` Password string `yaml:"password" mapstructure:"password" json:"-"` AllowedAuthenticators []string `yaml:"allowed_authenticators" mapstructure:"allowed_authenticators"` }
BasicAuthenticator holds the username and password for a password authenticator for a Cassandra cluster
type Configuration ¶
type Configuration struct { Servers []string `valid:"required,url" mapstructure:"servers"` Keyspace string `mapstructure:"keyspace"` LocalDC string `mapstructure:"local_dc"` ConnectionsPerHost int `mapstructure:"connections_per_host"` Timeout time.Duration `mapstructure:"-"` ConnectTimeout time.Duration `mapstructure:"connection_timeout"` ReconnectInterval time.Duration `mapstructure:"reconnect_interval"` SocketKeepAlive time.Duration `mapstructure:"socket_keep_alive"` MaxRetryAttempts int `mapstructure:"max_retry_attempts"` ProtoVersion int `mapstructure:"proto_version"` Consistency string `mapstructure:"consistency"` DisableCompression bool `mapstructure:"disable_compression"` Port int `mapstructure:"port"` Authenticator Authenticator `mapstructure:",squash"` DisableAutoDiscovery bool `mapstructure:"-"` TLS tlscfg.Options `mapstructure:"tls"` }
Configuration describes the configuration properties needed to connect to a Cassandra cluster
func DefaultConfiguration ¶ added in v1.59.0
func DefaultConfiguration() Configuration
func (*Configuration) ApplyDefaults ¶
func (c *Configuration) ApplyDefaults(source *Configuration)
ApplyDefaults copies settings from source unless its own value is non-zero.
func (*Configuration) Close ¶ added in v1.47.0
func (c *Configuration) Close() error
func (*Configuration) NewCluster ¶
func (c *Configuration) NewCluster(logger *zap.Logger) (*gocql.ClusterConfig, error)
NewCluster creates a new gocql cluster from the configuration
func (*Configuration) NewSession ¶
NewSession creates a new Cassandra session
func (*Configuration) String ¶
func (c *Configuration) String() string
func (*Configuration) Validate ¶ added in v1.56.0
func (c *Configuration) Validate() error
Click to show internal directories.
Click to hide internal directories.