Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchObserver ¶
type BatchObserver struct { MetricsReporter middleware.MetricsReporter // contains filtered or unexported fields }
BatchObserver implements gocql.BatchObserver
func (*BatchObserver) ObserveBatch ¶
func (o *BatchObserver) ObserveBatch(ctx context.Context, b gocql.ObservedBatch)
ObserveBatch sends timing metrics to dogstatsd on every batch query
type DataStore ¶
type DataStore interface { SelectMessagesInBucket( ctx context.Context, topic string, bucket, limit int, ) []*models.Message InsertWithTTL( ctx context.Context, topic, payload string, bucket int, ttl ...time.Duration, ) error }
DataStore is the interface with data access methods
func GetCassandra ¶
func GetCassandra( logger *logging.Logger, config *viper.Viper, mr middleware.MetricsReporter, ) (DataStore, error)
GetCassandra connects on Cassandra and returns the client with a session
type QueryObserver ¶
type QueryObserver struct { MetricsReporter middleware.MetricsReporter // contains filtered or unexported fields }
QueryObserver implements gocql.QueryObserver
func (*QueryObserver) ObserveQuery ¶
func (o *QueryObserver) ObserveQuery(ctx context.Context, q gocql.ObservedQuery)
ObserveQuery sends timing metrics to dogstatsd on every query
type Store ¶
type Store struct { DBSession cassandrainterfaces.Session // contains filtered or unexported fields }
Store is the access layer and contains the cassandra session. Implements DataStore
Click to show internal directories.
Click to hide internal directories.