publisher

package
v0.0.0-...-765649b Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ID      string   `json:"id"`
	Topic   string   `json:"topic"`
	Payload string   `json:"payload"`
	Type    []string `json:"type"`
}

type Publisher

type Publisher struct {
	Redis      *redisp.RedisDB
	Mongo      *mongo.DB
	Events     []Event
	Mqtt       *emq.Mqtt
	Nats       *natsp.Nats
	Wp         *workerpool.WorkerPool
	WorkerSize int
	// contains filtered or unexported fields
}

func NewPublisher

func NewPublisher(r *redisp.RedisDB, client *emq.Mqtt, natsCl *natsp.Nats,
	m *mongo.DB, size int, logger *zap.Logger,
) *Publisher

func (*Publisher) Cancel

func (pb *Publisher) Cancel()

func (*Publisher) GetEvents

func (pb *Publisher) GetEvents()

func (*Publisher) Work

func (pb *Publisher) Work()

Jump to

Keyboard shortcuts

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