redis

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEngine

func NewEngine(config Config) async.Engine

NewEngine returns a new Redis-based implementation of the aync.Engine interface

Types

type Config

type Config struct {
	RedisHost               string `envconfig:"REDIS_HOST" required:"true"`
	RedisPort               int    `envconfig:"REDIS_PORT"`
	RedisPassword           string `envconfig:"REDIS_PASSWORD"`
	RedisDB                 int    `envconfig:"REDIS_DB"`
	RedisEnableTLS          bool   `envconfig:"REDIS_ENABLE_TLS"`
	PendingTaskWorkerCount  int    `envconfig:"PENDING_TASK_WORKER_COUNT"`
	DeferedTaskWatcherCount int    `envconfig:"DEFERED_TASK_WATCHER_COUNT"`
	RedisPrefix             string `envconfig:"REDIS_PREFIX"`
}

Config encapsulates all configuration options for the Redis-based implementation of the async.Engine interface

func GetConfigFromEnvironment

func GetConfigFromEnvironment() (Config, error)

GetConfigFromEnvironment returns configuration derived from environment variables

func NewConfigWithDefaults

func NewConfigWithDefaults() Config

NewConfigWithDefaults returns a Config object with default values already applied. Callers are then free to set custom values for the remaining fields and/or override default values.

Jump to

Keyboard shortcuts

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