nsq

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNSQDProducerAddressNotProvided = errors.New("must provide nsqd producer address")
View Source
var ErrNotProvidedAnyNSQLookupdOrNSQD = errors.New("you haven't provided any nsqlookupd mor nsqd nodes for the consumer")
View Source
var ErrPanic = errors.New("panic")
View Source
var ErrProvidedBothNSQLookupdAndNSQD = errors.New("must either provide a list of nsqlookupd nodes, or list of nsqd nodes for the consumer, but not both")
View Source
var ErrUnknownPanic = errors.New("unknown panic")
View Source
var ErrWorkersFailed = errors.New("some workers failed to receive the checks. Make sure that is by design")

Functions

This section is empty.

Types

type PubSub

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

func NewNSQPubSub

func NewNSQPubSub(config queueing.Config) (*PubSub, error)

func (PubSub) NotifyTopic

func (p PubSub) NotifyTopic(topic string)

func (PubSub) ReceiveUpdateFromTopic

func (p PubSub) ReceiveUpdateFromTopic(topic string) <-chan struct{}

type WorkerQueue

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

func NewNSQWorkerQueue

func NewNSQWorkerQueue(config queueing.Config) (*WorkerQueue, error)

func (WorkerQueue) Acknowledge

func (n WorkerQueue) Acknowledge(qCheck queueing.QCheck)

func (WorkerQueue) Ping

func (n WorkerQueue) Ping(group *servicegroup.ServiceGroup) error

func (WorkerQueue) Receive

func (n WorkerQueue) Receive()

func (WorkerQueue) Send

func (n WorkerQueue) Send(scoringDataAggregate []*queueing.ScoringData) ([]*queueing.QCheck, error, error)

Send sends scoring data to the NSQD nodes, and returns either a list of checks with a warning, or an error

Jump to

Keyboard shortcuts

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