aggregator

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogLevel string             `mapstructure:"log_level"`
	Consumer config.ConsumerCfg `mapstructure:"consumer"`
	DB       store.Config       `mapstructure:"db"`
	Storage  config.StorageCfg  `mapstructure:"storage"`
}

Config represents our application config.

type Service

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

Service represents the PE scan service. It adheres to the nsq.Handler interface. This allows us to define our own custom handlers for our messages. Think of these handlers much like you would an http handler.

func New

func New(cfg Config, logger log.Logger) (Service, error)

New create a new aggregator scanner service.

func (*Service) HandleMessage

func (s *Service) HandleMessage(m *gonsq.Message) error

HandleMessage is the only requirement needed to fulfill the nsq.Handler.

func (*Service) Start

func (s *Service) Start() error

Start kicks in the service to start consuming events.

Jump to

Keyboard shortcuts

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