cmd

package
v0.0.0-...-e456d62 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GenerateIPs

func GenerateIPs(subnet []string) []string

func Hosts

func Hosts(cidr string) ([]string, error)

func ScanHost

func ScanHost(vrf string, host string, w *BoundedWaitGroup, ch chan models.IPAddress)

Types

type BoundedWaitGroup

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

func NewBoundedWaitGroup

func NewBoundedWaitGroup(cap int) BoundedWaitGroup

Bounded (with limit) wait group, to split target slice to fixed size slices.

func (*BoundedWaitGroup) Add

func (bwg *BoundedWaitGroup) Add(delta int)

func (*BoundedWaitGroup) Done

func (bwg *BoundedWaitGroup) Done()

func (*BoundedWaitGroup) Wait

func (bwg *BoundedWaitGroup) Wait()

type Config

type Config struct {
	Netbox struct {
		Netboxhost     string `yaml:"netboxhost"`
		Netboxapitoken string `yaml:"netboxapitoken"`
	} `yaml:"netbox"`
	Targets []struct {
		Vrf     string   `yaml:"vrf"`
		Subnets []string `yaml:"subnets"`
	} `yaml:"targets"`
	ScanThreads int `yaml:"scanthreads"`
}

Configuration file structure

Jump to

Keyboard shortcuts

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