instance

package
v0.0.0-...-1081ff4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mongo

type Mongo interface {
	Collection(MongoCollectionName) *mongo.Collection
	Ping(ctx context.Context) error
	RawClient() *mongo.Client
	RawDatabase() *mongo.Database
}

type MongoCollectionName

type MongoCollectionName string

type Prometheus

type Prometheus interface {
	Register(prometheus.Registerer)
	ResponseTimeMilliseconds() prometheus.Histogram
	TwitchChatMessages() prometheus.Histogram
}

type RMQ

type RMQ interface {
	Publish(queueName string, msg amqp.Publishing) error
	Consume(queueName string, consumer string) (*amqp.Channel, <-chan amqp.Delivery, error)
}

type Redis

type Redis interface {
	Ping(ctx context.Context) error
	Subscribe(ctx context.Context, ch chan string, subscribeTo ...string)
	Get(ctx context.Context, key string) (interface{}, error)
	SetEX(ctx context.Context, key string, value interface{}, ttl time.Duration) error
	SetNX(ctx context.Context, key string, value interface{}, ttl time.Duration) (bool, error)
	Pipeline(ctx context.Context) redis.Pipeliner
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL