systems

package
v3.13.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PopulateCache added in v3.11.3

func PopulateCache(ctx context.Context, asn int, sys System)

PopulateCache updates the provided System cache with ASN information from the System data sources.

Types

type LocalSystem

type LocalSystem struct {
	Cfg *config.Config
	// contains filtered or unexported fields
}

LocalSystem implements a System to be executed within a single process.

func NewLocalSystem

func NewLocalSystem(c *config.Config) (*LocalSystem, error)

NewLocalSystem returns an initialized LocalSystem object.

func (*LocalSystem) AddAndStart

func (l *LocalSystem) AddAndStart(srv service.Service) error

AddAndStart implements the System interface.

func (*LocalSystem) AddSource

func (l *LocalSystem) AddSource(src service.Service) error

AddSource implements the System interface.

func (*LocalSystem) Cache added in v3.10.4

func (l *LocalSystem) Cache() *requests.ASNCache

Cache implements the System interface.

func (*LocalSystem) Config

func (l *LocalSystem) Config() *config.Config

Config implements the System interface.

func (*LocalSystem) DataSources

func (l *LocalSystem) DataSources() []service.Service

DataSources implements the System interface.

func (*LocalSystem) GetAllSourceNames

func (l *LocalSystem) GetAllSourceNames() []string

GetAllSourceNames returns the names of all the available data sources.

func (*LocalSystem) GetMemoryUsage added in v3.9.0

func (l *LocalSystem) GetMemoryUsage() uint64

GetMemoryUsage returns the number bytes allocated to heap objects on this system.

func (*LocalSystem) GraphDatabases

func (l *LocalSystem) GraphDatabases() []*netmap.Graph

GraphDatabases implements the System interface.

func (*LocalSystem) Pool

func (l *LocalSystem) Pool() resolve.Resolver

Pool implements the System interface.

func (*LocalSystem) SetDataSources

func (l *LocalSystem) SetDataSources(sources []service.Service)

SetDataSources assigns the data sources that will be used by the system.

func (*LocalSystem) Shutdown

func (l *LocalSystem) Shutdown() error

Shutdown implements the System interface.

type System

type System interface {
	// Returns the configuration for the enumeration this service supports
	Config() *config.Config

	// Returns the resolver pool that handles DNS requests
	Pool() resolve.Resolver

	// Returns the cache populated by the system
	Cache() *requests.ASNCache

	// AddSource appends the provided data source to the slice of sources managed by the System
	AddSource(srv service.Service) error

	// AddAndStart starts the provided data source and then appends it to the slice of sources
	AddAndStart(srv service.Service) error

	// DataSources returns the slice of data sources managed by the System
	DataSources() []service.Service

	// SetDataSources assigns the data sources that will be used by System
	SetDataSources(sources []service.Service)

	// GraphDatabases return the Graphs used by the System
	GraphDatabases() []*netmap.Graph

	// GetMemoryUsage() returns the number bytes allocated to heap objects on this system
	GetMemoryUsage() uint64

	// Shutdown will shutdown the System
	Shutdown() error
}

System is the object type for managing services that perform various reconnaissance activities.

Jump to

Keyboard shortcuts

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