Documentation
¶
Index ¶
- Constants
- func ChangeIntegrationStatus(logTyp string, proto string, isEnabled bool, tlsOptions ...bool) (string, error)
- func ChangePort(logTyp string, proto string, port string) (string, error)
- func ConfigureCollectorFirstTime() error
- func DisableTLSForIntegration(logTyp string, proto string) error
- func EnableTLSForIntegration(logTyp string, proto string) (string, error)
- func IsPortAvailable(port string, proto string, cnf *CollectorConfiguration, ...) bool
- func StartModules()
- func ValidateChangeInPort(newPort string, dataType string) bool
- func WriteCollectorConfig(integrations map[string]Integration, filename string) error
- func WriteCollectorConfigFromModules(mod []Module, filename string) error
- type CollectorConfiguration
- type FramingMethod
- type Integration
- type Module
- type NetflowModule
- func (m *NetflowModule) DisablePort(proto string)
- func (m *NetflowModule) EnablePort(proto string, enableTLS bool) error
- func (m *NetflowModule) GetDataType() string
- func (m *NetflowModule) GetPort(proto string) string
- func (m *NetflowModule) IsPortListen(proto string) bool
- func (m *NetflowModule) SetNewPort(_ string, _ string)
- type Port
- type SyslogModule
- func (m *SyslogModule) DisablePort(proto string)
- func (m *SyslogModule) EnablePort(proto string, enableTLS bool) error
- func (m *SyslogModule) GetDataType() string
- func (m *SyslogModule) GetPort(proto string) string
- func (m *SyslogModule) IsPortListen(proto string) bool
- func (m *SyslogModule) SetNewPort(proto string, port string)
Constants ¶
View Source
const ( MinBufferSize = 480 RecommendedBufferSize = 2048 MaxBufferSize = 8192 UDPBufferSize = 2048 )
Variables ¶
This section is empty.
Functions ¶
func ChangeIntegrationStatus ¶
func ConfigureCollectorFirstTime ¶
func ConfigureCollectorFirstTime() error
func EnableTLSForIntegration ¶
func IsPortAvailable ¶
func IsPortAvailable(port string, proto string, cnf *CollectorConfiguration, currentIntegration string) bool
func StartModules ¶
func StartModules()
func ValidateChangeInPort ¶
ValidateChangeInPort returns true if the port change is allowed
func WriteCollectorConfig ¶
func WriteCollectorConfig(integrations map[string]Integration, filename string) error
Types ¶
type CollectorConfiguration ¶
type CollectorConfiguration struct {
Integrations map[string]Integration `json:"integrations"`
}
func ReadCollectorConfig ¶
func ReadCollectorConfig() (CollectorConfiguration, error)
type FramingMethod ¶
type FramingMethod int
const ( FramingNewline FramingMethod = iota FramingOctetCounting )
type Integration ¶
type Module ¶
type NetflowModule ¶
type NetflowModule struct {
DataType string
Parser parser.Parser
Decoders map[string]*netflow.Decoder
Listener *net.UDPConn
CTX context.Context
Cancel context.CancelFunc
IsEnabled bool
}
func GetNetflowModule ¶
func GetNetflowModule() *NetflowModule
func (*NetflowModule) DisablePort ¶
func (m *NetflowModule) DisablePort(proto string)
func (*NetflowModule) EnablePort ¶
func (m *NetflowModule) EnablePort(proto string, enableTLS bool) error
func (*NetflowModule) GetDataType ¶
func (m *NetflowModule) GetDataType() string
func (*NetflowModule) GetPort ¶
func (m *NetflowModule) GetPort(proto string) string
func (*NetflowModule) IsPortListen ¶
func (m *NetflowModule) IsPortListen(proto string) bool
func (*NetflowModule) SetNewPort ¶
func (m *NetflowModule) SetNewPort(_ string, _ string)
type SyslogModule ¶
type SyslogModule struct {
DataType string
TCPListener listenerTCP
UDPListener listenerUDP
Parser parser.Parser
}
func GetSyslogModule ¶
func GetSyslogModule(dataType string, protoPorts config.ProtoPort) *SyslogModule
func (*SyslogModule) DisablePort ¶
func (m *SyslogModule) DisablePort(proto string)
func (*SyslogModule) EnablePort ¶
func (m *SyslogModule) EnablePort(proto string, enableTLS bool) error
func (*SyslogModule) GetDataType ¶
func (m *SyslogModule) GetDataType() string
func (*SyslogModule) GetPort ¶
func (m *SyslogModule) GetPort(proto string) string
func (*SyslogModule) IsPortListen ¶
func (m *SyslogModule) IsPortListen(proto string) bool
func (*SyslogModule) SetNewPort ¶
func (m *SyslogModule) SetNewPort(proto string, port string)
Click to show internal directories.
Click to hide internal directories.