systems

package
v4.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: Apache-2.0 Imports: 17 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PopulateCache

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(cfg *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

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) GetMemoryUsage

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) Resolvers

func (l *LocalSystem) Resolvers() *resolve.Resolvers

Resolvers implements the System interface.

func (*LocalSystem) SetDataSources

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

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.

func (*LocalSystem) TrustedResolvers

func (l *LocalSystem) TrustedResolvers() *resolve.Resolvers

TrustedResolvers implements the System interface.

type SimpleSystem

type SimpleSystem struct {
	Cfg      *config.Config
	Pool     *resolve.Resolvers
	Trusted  *resolve.Resolvers
	Graph    *netmap.Graph
	ASNCache *requests.ASNCache
	Service  service.Service
}

func (*SimpleSystem) AddAndStart

func (ss *SimpleSystem) AddAndStart(srv service.Service) error

AddAndStart implements the System interface.

func (*SimpleSystem) AddSource

func (ss *SimpleSystem) AddSource(src service.Service) error

AddSource implements the System interface.

func (*SimpleSystem) Cache

func (ss *SimpleSystem) Cache() *requests.ASNCache

Cache implements the System interface.

func (*SimpleSystem) Config

func (ss *SimpleSystem) Config() *config.Config

Config implements the System interface.

func (*SimpleSystem) DataSources

func (ss *SimpleSystem) DataSources() []service.Service

DataSources implements the System interface.

func (*SimpleSystem) GetMemoryUsage

func (ss *SimpleSystem) GetMemoryUsage() uint64

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

func (*SimpleSystem) GraphDatabases

func (ss *SimpleSystem) GraphDatabases() []*netmap.Graph

GraphDatabases implements the System interface.

func (*SimpleSystem) Resolvers

func (ss *SimpleSystem) Resolvers() *resolve.Resolvers

Resolvers implements the System interface.

func (*SimpleSystem) SetDataSources

func (ss *SimpleSystem) SetDataSources(sources []service.Service) error

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

func (*SimpleSystem) Shutdown

func (ss *SimpleSystem) Shutdown() error

Shutdown implements the System interface.

func (*SimpleSystem) TrustedResolvers

func (ss *SimpleSystem) TrustedResolvers() *resolve.Resolvers

TrustedResolvers implements the System interface.

type System

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

	// Returns the pool that handles queries using untrusted DNS resolvers
	Resolvers() *resolve.Resolvers

	// Returns the pool that handles queries using trusted DNS resolvers
	TrustedResolvers() *resolve.Resolvers

	// 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) error

	// 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