consumer

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(settings instance.Settings) consumer.Creator

New creates a new Consumer pointer instance.

Types

type Consumer

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

func (*Consumer) Close

func (c *Consumer) Close()

Close closes this NSQConsumer

func (Consumer) HandleMessage

func (c Consumer) HandleMessage(m *nsq.Message) error

type Message

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

func (*Message) Body

func (m *Message) Body() []byte

func (*Message) GetMessageBody

func (m *Message) GetMessageBody() []byte

func (*Message) GetNsqMessage

func (m *Message) GetNsqMessage() *nsq.Message

func (*Message) GetTopic

func (m *Message) GetTopic() string

type NSQConsumer

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

func (*NSQConsumer) Run

func (*NSQConsumer) Stop

func (nc *NSQConsumer) Stop()

func (*NSQConsumer) UpdateConfig added in v0.12.0

func (nc *NSQConsumer) UpdateConfig(config *common.Config)

type Options

type Options struct {
	Channel string `flag:"channel"`

	ConsumerOpts             []string      `flag:"consumer-opt"`
	MaxInFlight              int           `flag:"max-in-flight"`
	HTTPClientConnectTimeout time.Duration `flag:"http-client-connect-timeout"`
	HTTPClientRequestTimeout time.Duration `flag:"http-client-request-timeout"`

	LogPrefix string `flag:"log-prefix"`
	LogLevel  string `flag:"log-level"`
	OutputDir string `flag:"output-dir"`
	WorkDir   string `flag:"work-dir"`
	// DatetimeFormat string        `flag:"datetime-format"`
	SyncInterval time.Duration `flag:"sync-interval"`
}

Options options for config

Jump to

Keyboard shortcuts

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