Documentation
¶
Index ¶
- Constants
- func PrepareTLS(CLIENT_CERT_PATH, CLIENT_KEY_PATH, ROOT_CA_PATH string) (*tls.Config, error)
- func ProducerDescriptor() sputnik.BlockDescriptor
- func RFC3164Props() map[string]string
- func RFC5424Props() map[string]string
- func ReceiverDescriptor() sputnik.BlockDescriptor
- func RegisterMessageProducerFactory(fact func() sidecar.MessageProducer)
- type Server
- type SyslogConfiguration
Constants ¶
View Source
const ( ReceiverName = "syslogreceiver" ReceiverResponsibility = "syslogreceiver" ProducerName = "syslogproducer" ProducerResponsibility = "syslogproducer" StorerName = "syslogstorer" StorerResponsibility = "syslogstorer" )
View Source
const ( RFC5424OnlyKey = "structured_data" RFCFormatKey = "rfc" RFC3164 = "RFC3164" RFC5424 = "RFC5424" SeverityKey = "severity" )
Variables ¶
This section is empty.
Functions ¶
func PrepareTLS ¶
func ProducerDescriptor ¶
func ProducerDescriptor() sputnik.BlockDescriptor
func ReceiverDescriptor ¶
func ReceiverDescriptor() sputnik.BlockDescriptor
func RegisterMessageProducerFactory ¶
func RegisterMessageProducerFactory(fact func() sidecar.MessageProducer)
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(conf SyslogConfiguration) *Server
func (*Server) SetupHandling ¶
func (s *Server) SetupHandling(bc sputnik.BlockCommunicator)
type SyslogConfiguration ¶
type SyslogConfiguration struct {
// The Syslog Severity level ranges between 0 to 7.
// Each number points to the relevance of the action reported.
// From a debugging message (7) to a completely unusable system (0):
//
// 0 Emergency: system is unusable
// 1 Alert: action must be taken immediately
// 2 Critical: critical conditions
// 3 Error: error conditions
// 4 Warning: warning conditions
// 5 Notice: normal but significant condition
// 6 Informational: informational messages
// 7 Debug: debug-level messages
//
// Log with severity above value from configuration will be discarded
// Examples:
// -1 - all logs will be discarded
// 5 - logs with severities 6(Informational) and 7(Debug) will be discarded
// 7 - all logs will be processed
SEVERITYLEVEL int
// IPv4 address of TCP listener.
// For empty string - don't use TCP
// e.g "0.0.0.0:5141" - listen on all adapters, port 5141
// "127.0.0.1:5141" - listen on loopback "adapter"
ADDRTCP string
// IPv4 address of UDP receiver.
// For empty string - don't use UDP
// Usually "0.0.0.0:5141" - receive from all adapters, port 5141
// "127.0.0.1:5141" - receive from loopback "adapter"
ADDRUDP string
// Unix domain socket name - actually file path.
// For empty string - don't use UDS
// Regarding limitations see https://man7.org/linux/man-pages/man7/unix.7.html
UDSPATH string
// TLS section: Listening on non empty ADDRTCPTLS will start only
// for valid tls configuration (created using last 3 parameters)
ADDRTCPTLS string
CLIENT_CERT_PATH string
CLIENT_KEY_PATH string
ROOT_CA_PATH string
}
Click to show internal directories.
Click to hide internal directories.