pubsub

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 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 Channel

type Channel interface {
	Read(model interface{}) (<-chan interface{}, <-chan error)
	Close() error
}

Channel is channel interface.

type Message

type Message struct {
	Type string
	ID   int
}

Message is pubsub message model.

type PubSub

type PubSub interface {
	Publish(topic string, data interface{}) error
	Subscribe(topic string) (interface{}, error)
	Close() error
}

PubSub is pubsub interface.

func New

func New(l logger.Logger, pubsubType string, address string, user string, password string) (PubSub, error)

New to create new pubsub client.

Jump to

Keyboard shortcuts

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