pubsub

package
v0.0.1-0...-ce2eccd Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	// contains filtered or unexported fields
}

Producer is a redis client which appends messages to a channel

func NewConsumer

func NewConsumer(config *configuration.Configuration) (*Consumer, error)

NewClient creates a new redis client

func (*Consumer) Consume

func (c *Consumer) Consume(ctx context.Context, channel string)

Publish appends a new event to channel

func (*Consumer) Ping

func (c *Consumer) Ping(ctx context.Context) error

Publish appends a new event to channel

type Producer

type Producer struct {
	// contains filtered or unexported fields
}

Producer is a redis client which appends messages to a channel

func NewProducer

func NewProducer(config *configuration.Configuration) (*Producer, error)

NewClient creates a new redis client

func (*Producer) Ping

func (p *Producer) Ping(ctx context.Context) error

Publish appends a new event to channel

func (*Producer) Publish

func (p *Producer) Publish(ctx context.Context, channel string, messages interface{})

Publish appends a new event to channel

Jump to

Keyboard shortcuts

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