redis

package
v0.0.0-...-0825164 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Redis *redis.Client
)

Functions

func Init

func Init() *redis.Client

Types

type Config

type Config struct {
	Address      *string        `default:":6379"`
	Password     *string        `default:""`
	GroupName    *string        `default:"gate-group"`
	ConsumerName *string        `default:"gate1" envconfig:"hostname"`
	StreamName   *string        `default:"ci-notifications"`
	ClaimMinIdle *time.Duration `default:"3m"`
	ClaimMax     *int           `default:"10"`
	Enabled      *bool          `default:"true"`
}

Config represents a configuration object with values that can be passed via env variable

func New

func New() *Config

New gets a configuration object

type MessageBroker

type MessageBroker struct {
	Redis *redis.Client
}

func (*MessageBroker) PublishMessage

func (b *MessageBroker) PublishMessage(p *domain.Property)

func (*MessageBroker) Subscribe

func (b *MessageBroker) Subscribe(application string, profile string, label string) *redis.PubSub

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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