producer

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTP

type HTTP struct {
	Client   *http.Client
	Endpoint *url.URL
}

HTTP holds configuration for producing completed scan events to an HTTP endpoint

func (*HTTP) Produce

func (p *HTTP) Produce(ctx context.Context, scan domain.CompletedScan) error

Produce sends the completed scan event to an HTTP endpoint

type ProducerComponent

type ProducerComponent struct{}

ProducerComponent satisfies the settings library Component API, and may be used by the settings.NewComponent function.

func (*ProducerComponent) New

New constructs a HTTP from a config.

func (*ProducerComponent) Settings

func (*ProducerComponent) Settings() *ProducerConfig

Settings can be used to populate default values if there are any

type ProducerConfig

type ProducerConfig struct {
	Endpoint string
}

ProducerConfig holds configuration required to send Nexpose assets to a queue via an HTTP Producer

func (*ProducerConfig) Name

func (c *ProducerConfig) Name() string

Name is used by the settings library and will add a "HTTPPRODUCER" prefix to ProducerConfig environment variables

Jump to

Keyboard shortcuts

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