indexconsumer

package
v0.0.0-...-c227d16 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionIndex  = "INDEX"
	ActionUpdate = "UPDATE"
	ActionDelete = "DELETE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IndexerHandler

type IndexerHandler struct {
	C *nsq.Consumer
	// contains filtered or unexported fields
}

MessageHandler is a custom NSQ message handler.

func NewIndexerHandler

func NewIndexerHandler(m *metric.Metric, esc *es.ESClient, timeout time.Duration, topicName, channelName, nsqd, keyNSQ string, numOfConsumer, maxInFlight int) (*IndexerHandler, error)

func (*IndexerHandler) HandleMessage

func (h *IndexerHandler) HandleMessage(msg *nsq.Message) error

HandleMessage is called when a new message is received.

type IndexerHandlerMSG

type IndexerHandlerMSG struct {
	Action string          `json:"action"`
	Doc    docgen.Document `json:"doc"`
}

Jump to

Keyboard shortcuts

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