multiav

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: 16 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"`
	SharedVolume string             `mapstructure:"shared_volume"`
	EngineName   string             `mapstructure:"engine_name"`
	ScanTimeout  time.Duration      `mapstructure:"scan_timeout"`
	Producer     config.ProducerCfg `mapstructure:"producer"`
	Consumer     config.ConsumerCfg `mapstructure:"consumer"`
}

Config represents our application config.

type ScanResult

type ScanResult struct {
	Infected bool   `json:"infected"`
	Output   string `json:"output"`
	Update   int64  `json:"update"`
}

ScanResult av result

type Scanner

type Scanner interface {
	ScanFile(string, mav.Options) (mav.Result, error)
}

type Service

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

Service represents the Avast scan service.

func New

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

New create a new PE 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