Documentation ¶
Index ¶
- Constants
- func ProvideCassandra(unmarshaller config.Unmarshaller, metricsIn metric.Measures, lc fx.Lifecycle, ...) (store.S, error)
- type CassandraClient
- func (s *CassandraClient) Close()
- func (s *CassandraClient) Delete(key model.Key) (store.OwnableItem, error)
- func (s *CassandraClient) Get(key model.Key) (store.OwnableItem, error)
- func (s *CassandraClient) GetAll(bucket string) (map[string]store.OwnableItem, error)
- func (s *CassandraClient) Ping() error
- func (s *CassandraClient) Push(key model.Key, item store.OwnableItem) error
- type CassandraConfig
Constants ¶
View Source
const (
Yugabyte = "yugabyte"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CassandraClient ¶
type CassandraClient struct {
// contains filtered or unexported fields
}
func CreateCassandraClient ¶
func CreateCassandraClient(config CassandraConfig, measures metric.Measures, logger log.Logger) (*CassandraClient, error)
func (*CassandraClient) Close ¶
func (s *CassandraClient) Close()
func (*CassandraClient) Delete ¶
func (s *CassandraClient) Delete(key model.Key) (store.OwnableItem, error)
func (*CassandraClient) Get ¶
func (s *CassandraClient) Get(key model.Key) (store.OwnableItem, error)
func (*CassandraClient) GetAll ¶
func (s *CassandraClient) GetAll(bucket string) (map[string]store.OwnableItem, error)
func (*CassandraClient) Ping ¶
func (s *CassandraClient) Ping() error
Ping is for pinging the database to verify that the connection is still good.
func (*CassandraClient) Push ¶
func (s *CassandraClient) Push(key model.Key, item store.OwnableItem) error
type CassandraConfig ¶
type CassandraConfig struct { // Hosts to connect to. Must have at least one Hosts []string // Database aka Keyspace for cassandra Database string // OpTimeout OpTimeout time.Duration // SSLRootCert used for enabling tls to the cluster. SSLKey, and SSLCert must also be set. SSLRootCert string // SSLKey used for enabling tls to the cluster. SSLRootCert, and SSLCert must also be set. SSLKey string // SSLCert used for enabling tls to the cluster. SSLRootCert, and SSLRootCert must also be set. SSLCert string // If you want to verify the hostname and server cert (like a wildcard for cass cluster) then you should turn this on // This option is basically the inverse of InSecureSkipVerify // See InSecureSkipVerify in http://golang.org/pkg/crypto/tls/ for more info EnableHostVerification bool // Username to authenticate into the cluster. Password must also be provided. Username string // Password to authenticate into the cluster. Username must also be provided. Password string // NumRetries for connecting to the db NumRetries int // WaitTimeMult the amount of time to wait before retrying to connect to the db WaitTimeMult time.Duration // MaxConnsPerHost max number of connections per host MaxConnsPerHost int }
Click to show internal directories.
Click to hide internal directories.