instance

package
v0.0.0-...-40768b1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: Apache-2.0 Imports: 5 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)

	CurrentStreamCount() prometheus.Gauge
	TotalStreamDurationSeconds() prometheus.Histogram
}

type RMQ

type RMQ interface {
	Publish(queueName string, msg amqp.Publishing) error
}

type Redis

type Redis interface {
	Ping(ctx context.Context) error
	Get(ctx context.Context, key string) (interface{}, error)
	Subscribe(ctx context.Context, ch chan string, subscribeTo ...string)
	Publish(ctx context.Context, channel string, content string) error
	SetNX(ctx context.Context, key string, value string, ttl time.Duration) (bool, error)
	SetEX(ctx context.Context, key string, value string, ttl time.Duration) error
	Expire(ctx context.Context, key string, ttl time.Duration) error
	Del(ctx context.Context, key string) error
}

Jump to

Keyboard shortcuts

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