pubsub

package
v0.1.82 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface{}

Handler is an interface and will contain target function to run in subscriber

type Service

type Service interface {
	Publish(ctx context.Context, topic string, msg proto.Message) error
	Subscribe(ctx context.Context, topic string, handler Handler)
}

Service pubsub service

func Get

func Get() Service

Get return pubsub service instance

func New

func New(client *redis.Client) Service

New create a new instance of pubsub service

type Topic

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

Topic topic holder that contain handlers lists

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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