config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnabledCfgKey         = "enabled"
	MaxWorkersCfgKey      = "maxworkers"
	CheckIntervalCfgKey   = "checkinterval"
	DefaultIntervalCfgKey = "defaultinterval"
	ServerIntervalCfgKey  = "serverinterval"
	PerAddrPauseCfgKey    = "peraddrpause"
	TimeoutCfgKey         = "timeout"
	PingCountCfgKey       = "pingcount"
	CommunityCfgKey       = "community"
	PortsCfgKey           = "ports"
	EnableDebugLogCfgKey  = "enabledebuglog"
)
View Source
const (
	SnmpCfgKey = "snmp"
)

Variables

This section is empty.

Functions

func CfgBusBuildAndBindFlags

func CfgBusBuildAndBindFlags(pflags *pflag.FlagSet, cfg *Bus)

func CfgDiscoBuildAndBindFlags

func CfgDiscoBuildAndBindFlags(pflags *pflag.FlagSet, cfg *Discovery)

func CfgEnrichBuildAndBindFlags

func CfgEnrichBuildAndBindFlags(pflags *pflag.FlagSet, cfg *Enrichment)

func CfgPerfPingeBuildAndBindFlags

func CfgPerfPingeBuildAndBindFlags(pflags *pflag.FlagSet, cfg *Pinger)

func CfgServerBuildAndBindFlags

func CfgServerBuildAndBindFlags(pflags *pflag.FlagSet, cfg *Server)

func CfgStoreBuildAndBindFlags

func CfgStoreBuildAndBindFlags(flags *pflag.FlagSet, cfg *Store)

func Key

func Key(keys ...string) string

Types

type Bus

type Bus struct {
	MaxEvents               *int
	MaxErrors               *int
	InboundSize             *int
	EnableDebugLog          *bool
	EnableErrorLog          *bool
	CheckErrorTypeOnPublish *bool
}

type Config

type Config struct {
	Store             *Store
	Server            *Server
	Bus               *Bus
	Discovery         *Discovery
	PerformancePinger *Pinger
	Enrichment        *Enrichment
}

func GetConfig

func GetConfig() *Config

func (Config) Save

func (c Config) Save() error

type Discovery

type Discovery struct {
	Enabled                 *bool
	BootstrapOnFirstRun     *bool
	AutoDiscoverNewNetworks *bool
	CheckInterval           *time.Duration
	NetworkScanInterval     *time.Duration
	MaxWorkers              *int
	MaxNetworkScanners      *int
	ArpPing                 *DiscoveryArpConfig
	IcmpPing                *DiscoveryICMPConfig
	Snmp                    *DiscoverySNMPConfig
}

type DiscoveryArpConfig

type DiscoveryArpConfig struct {
	Enabled *bool
	Timeout *time.Duration
}

type DiscoveryICMPConfig

type DiscoveryICMPConfig struct {
	Enabled   *bool
	Timeout   *time.Duration
	PingCount *int
}

type DiscoverySNMPConfig

type DiscoverySNMPConfig struct {
	Enabled                 *bool
	Timeout                 *time.Duration
	Community               []string
	Ports                   []int
	ArpTableRescanInterval  *time.Duration
	InterfaceRescanInterval *time.Duration
}

type DnsLookupConfig

type DnsLookupConfig struct {
	Enabled *bool
}

type Enrichment

type Enrichment struct {
	Enabled     *bool
	MaxWorkers  *int
	DnsLookup   *DnsLookupConfig
	OuiLookup   *OuiLookupConfig
	PortScanner *PortScannerConfig
	SNMP        *SNMPEnrichmentConfig
}

type OuiLookupConfig

type OuiLookupConfig struct {
	Enabled *bool
}

type Pinger

type Pinger struct {
	Enabled         *bool
	MaxWorkers      *int
	PingCount       *int
	Timeout         *time.Duration
	CheckInterval   *time.Duration
	DefaultInterval *time.Duration
	ServerInterval  *time.Duration
}

type PortScannerConfig

type PortScannerConfig struct {
	Enabled         *bool
	PortTimeout     *time.Duration
	MaxWorkers      *int
	DefaultInterval *time.Duration
	ServerInterval  *time.Duration
	PortList        *string
}

type SNMPEnrichmentConfig

type SNMPEnrichmentConfig struct {
	Enabled   *bool
	Timeout   *time.Duration
	Community []string
	Ports     []int
}

type Server

type Server struct {
	TUIPort *string
	WebPort *string
}

type Store

type Store struct {
	Directory    *string
	WSPRetention *string
}

StoresConfig holds configuration needed to configure the data stores used in Mason

Jump to

Keyboard shortcuts

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