discoverers

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsEc2Discoverer

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

AwsEc2Discoverer represents a discoverer for AWS EC2 resources.

func NewAwsEc2Discoverer

func NewAwsEc2Discoverer(cfg aws.Config, opts ...AwsEc2DiscovererOption) *AwsEc2Discoverer

NewEngine returns a new AwsEc2Discoverer, initialized with the given options.

func (*AwsEc2Discoverer) Discover

func (ec2d *AwsEc2Discoverer) Discover(ctx context.Context) *discovery.Result

Discover runs the AwsEc2Discoverer.

type AwsEc2DiscovererOption

type AwsEc2DiscovererOption func(*AwsEc2Discoverer)

AwsEc2DiscovererOption represents a configuration option for an AwsEc2Discoverer.

func WithAwsEc2DiscovererDiscovererId added in v0.1.3

func WithAwsEc2DiscovererDiscovererId(discovererId string) AwsEc2DiscovererOption

WithAwsEc2DiscovererDiscovererId is the AwsEc2DiscovererOption to set a non default discoverer id.

func WithAwsEc2DiscovererGetAccountIdTimeout added in v0.1.3

func WithAwsEc2DiscovererGetAccountIdTimeout(timeout time.Duration) AwsEc2DiscovererOption

WithAwsEc2DiscovererDiscovererId is the AwsEc2DiscovererOption to set a non default timeout for getting the aws account id.

type AwsEcsDiscoverer

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

AwsEcsDiscoverer represents a discoverer for AWS ECS resources.

func NewAwsEcsDiscoverer

func NewAwsEcsDiscoverer(cfg aws.Config, opts ...AwsEcsDiscovererOption) *AwsEcsDiscoverer

NewAwsEcsDiscoverer returns a new AwsEcsDiscoverer.

func (*AwsEcsDiscoverer) Discover

func (ecsd *AwsEcsDiscoverer) Discover(ctx context.Context) *discovery.Result

Discover runs the AwsEcsDiscoverer and closes the channels after a single run.

type AwsEcsDiscovererOption

type AwsEcsDiscovererOption func(*AwsEcsDiscoverer)

AwsEcsDiscovererOption represents a configuration option for an AwsEcsDiscoverer.

func WithAwsEcsDiscovererDiscovererId added in v0.1.3

func WithAwsEcsDiscovererDiscovererId(discovererId string) AwsEcsDiscovererOption

WithAwsEcsDiscovererDiscovererId is the AwsEcsDiscovererOption to set a non default discoverer id.

func WithAwsEcsDiscovererGetAccountIdTimeout added in v0.1.3

func WithAwsEcsDiscovererGetAccountIdTimeout(timeout time.Duration) AwsEcsDiscovererOption

WithAwsEcsDiscovererGetAccountIdTimeout is the AwsEcsDiscovererOption to set a non default timeout for getting the aws account id.

type AwsRdsDiscoverer

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

AwsRdsDiscoverer represents a discoverer for AWS RDS resources.

func NewAwsRdsDiscoverer

func NewAwsRdsDiscoverer(cfg aws.Config, opts ...AwsRdsDiscovererOption) *AwsRdsDiscoverer

NewAwsRdsDiscoverer returns a new AwsRdsDiscoverer, initialized with the given options.

func (*AwsRdsDiscoverer) Discover

func (rdsd *AwsRdsDiscoverer) Discover(ctx context.Context) *discovery.Result

Discover runs the AwsRdsDiscoverer.

type AwsRdsDiscovererOption

type AwsRdsDiscovererOption func(*AwsRdsDiscoverer)

AwsRdsDiscovererOption represents a configuration option for an AwsRdsDiscoverer.

func WithAwsRdsDiscovererDiscovererId added in v0.1.3

func WithAwsRdsDiscovererDiscovererId(discovererId string) AwsRdsDiscovererOption

WithAwsEcsDiscovererDiscovererId is the AwsRdsDiscovererOption to set a non default discoverer id.

func WithAwsRdsDiscovererGetAccountIdTimeout added in v0.1.3

func WithAwsRdsDiscovererGetAccountIdTimeout(timeout time.Duration) AwsRdsDiscovererOption

WithAwsRdsDiscovererGetAccountIdTimeout is the AwsRdsDiscovererOption to set a non default timeout for getting the aws account id.

type AwsSsmDiscoverer added in v0.1.3

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

AwsSsmDiscoverer represents a discoverer for AWS SSM resources.

func NewAwsSsmDiscoverer added in v0.1.3

func NewAwsSsmDiscoverer(cfg aws.Config, opts ...AwsSsmDiscovererOption) *AwsSsmDiscoverer

NewAwsSsmDiscoverer returns a new AwsSsmDiscoverer, initialized with the given options.

func (*AwsSsmDiscoverer) Discover added in v0.1.3

func (ssmd *AwsSsmDiscoverer) Discover(ctx context.Context) *discovery.Result

Discover runs the AwsSsmDiscoverer.

type AwsSsmDiscovererOption added in v0.1.3

type AwsSsmDiscovererOption func(*AwsSsmDiscoverer)

AwsSsmDiscovererOption represents a configuration option for an AwsSsmDiscoverer.

func WithAwsSsmDiscovererDiscovererId added in v0.1.3

func WithAwsSsmDiscovererDiscovererId(discovererId string) AwsSsmDiscovererOption

WithAwsSsmDiscovererDiscovererId is the AwsSsmDiscovererOption to set a non default discoverer id.

func WithAwsSsmDiscovererGetAccountIdTimeout added in v0.1.3

func WithAwsSsmDiscovererGetAccountIdTimeout(timeout time.Duration) AwsSsmDiscovererOption

WithAwsSsmDiscovererGetAccountIdTimeout is the AwsSsmDiscovererOption to set a non default timeout for getting the aws account id.

type NaiveNetworkDiscoverer added in v0.1.4

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

NaiveNetworkDiscoverer represents a discoverer for network-reachable resources with a very rudimentary check using TCP probes. This check can (and will) give false positives or negatives. For a more thorough service detection, you would need a more comprehensive set of checks. Nmap for example uses a combination of probes and a large database of well known service banners to identify the service running on a particular port.

func NewNaiveNetworkDiscoverer added in v0.1.4

func NewNaiveNetworkDiscoverer(opts ...NaiveNetworkDiscovererOption) *NaiveNetworkDiscoverer

NewNaiveNetworkDiscoverer returns a new NaiveNetworkDiscoverer, initialized with the given options.

func (*NaiveNetworkDiscoverer) Discover added in v0.1.4

Discover runs the NaiveNetworkDiscoverer.

type NaiveNetworkDiscovererOption added in v0.1.4

type NaiveNetworkDiscovererOption func(*NaiveNetworkDiscoverer)

NaiveNetworkDiscovererOption represents a configuration option for a NaiveNetworkDiscoverer.

func WithNaiveNetworkDiscovererDiscovererId added in v0.1.4

func WithNaiveNetworkDiscovererDiscovererId(discovererId string) NaiveNetworkDiscovererOption

WithNaiveNetworkDiscovererDiscovererId is the NaiveNetworkDiscovererOption to set a non default discoverer id.

func WithNaiveNetworkDiscovererPorts added in v0.1.4

func WithNaiveNetworkDiscovererPorts(ports ...string) NaiveNetworkDiscovererOption

WithNaiveNetworkDiscovererPorts is the NaiveNetworkDiscovererOption to set non default target ports for discovery.

func WithNaiveNetworkDiscovererScanTimeout added in v0.1.4

func WithNaiveNetworkDiscovererScanTimeout(timeout time.Duration) NaiveNetworkDiscovererOption

WithNaiveNetworkDiscovererScanTimeout is the NaiveNetworkDiscovererOption to set a non default timeout for scanning the network.

func WithNaiveNetworkDiscovererTargets added in v0.1.4

func WithNaiveNetworkDiscovererTargets(targets ...string) NaiveNetworkDiscovererOption

WithNaiveNetworkDiscovererTargets is the NaiveNetworkDiscovererOption to set non default targets (IPs or DNS names) for discovery.

type NmapNetworkDiscoverer added in v0.1.4

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

NmapNetworkDiscoverer represents a discoverer for network-reachable resources using a library that relies on the nmap binary being present. Note that running the NmapNetworkDiscoverer without the nmap binary being available will result in failure to discover resources with this Discoverer.

func NewNmapNetworkDiscoverer added in v0.1.4

func NewNmapNetworkDiscoverer(opts ...NmapNetworkDiscovererOption) *NmapNetworkDiscoverer

NewNmapNetworkDiscoverer returns a new NmapNetworkDiscoverer, initialized with the given options.

func (*NmapNetworkDiscoverer) Discover added in v0.1.4

Discover runs the NmapNetworkDiscoverer.

type NmapNetworkDiscovererOption added in v0.1.4

type NmapNetworkDiscovererOption func(*NmapNetworkDiscoverer)

NmapNetworkDiscovererOption represents a configuration option for an NmapNetworkDiscoverer.

func WithNmapNetworkDiscovererDiscovererId added in v0.1.4

func WithNmapNetworkDiscovererDiscovererId(discovererId string) NmapNetworkDiscovererOption

WithNmapNetworkDiscovererDiscovererId is the NmapNetworkDiscovererOption to set a non default discoverer id.

func WithNmapNetworkDiscovererMaxScanDelay added in v0.1.4

func WithNmapNetworkDiscovererMaxScanDelay(delay time.Duration) NmapNetworkDiscovererOption

WithNmapNetworkDiscovererMaxScanDelay is the NmapNetworkDiscovererOption to set non default max delay for discovery (time between probes).

func WithNmapNetworkDiscovererMaxScanRate added in v0.1.4

func WithNmapNetworkDiscovererMaxScanRate(packetsPerSecond int) NmapNetworkDiscovererOption

WithNmapNetworkDiscovererMaxScanRate is the NmapNetworkDiscovererOption to set non default max rate for discovery (packets per second).

func WithNmapNetworkDiscovererMinScanDelay added in v0.1.4

func WithNmapNetworkDiscovererMinScanDelay(delay time.Duration) NmapNetworkDiscovererOption

WithNmapNetworkDiscovererMinScanDelay is the NmapNetworkDiscovererOption to set non default min delay for discovery (time between probes).

func WithNmapNetworkDiscovererMinScanRate added in v0.1.4

func WithNmapNetworkDiscovererMinScanRate(packetsPerSecond int) NmapNetworkDiscovererOption

WithNmapNetworkDiscovererMinScanRate is the NmapNetworkDiscovererOption to set non default min rate for discovery (packets per second).

func WithNmapNetworkDiscovererPorts added in v0.1.4

func WithNmapNetworkDiscovererPorts(ports ...string) NmapNetworkDiscovererOption

WithNmapNetworkDiscovererPorts is the NmapNetworkDiscovererOption to set non default target ports for discovery.

func WithNmapNetworkDiscovererScanTimeout added in v0.1.4

func WithNmapNetworkDiscovererScanTimeout(timeout time.Duration) NmapNetworkDiscovererOption

WithNmapNetworkDiscovererScanTimeout is the NmapNetworkDiscovererOption to set a non default timeout for scanning the network.

func WithNmapNetworkDiscovererTargets added in v0.1.4

func WithNmapNetworkDiscovererTargets(targets ...string) NmapNetworkDiscovererOption

WithNmapNetworkDiscovererTargets is the NmapNetworkDiscovererOption to set non default targets (IPs or DNS names) for discovery.

Jump to

Keyboard shortcuts

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