Documentation
¶
Index ¶
Constants ¶
View Source
const DEFAULT_LISTEN_ADDR = "localhost:4279"
View Source
const DEFAULT_SOCKET_PATH = "/run/clogger/clogger.sock"
Variables ¶
This section is empty.
Functions ¶
func HasConstructorFor ¶
func NewSocketInput ¶
func NewSocketInput(c SocketInputConfig) *socketInput
Types ¶
type GoInput ¶
type GoInput struct {
// contains filtered or unexported fields
}
func NewGoInput ¶
func NewGoInput() *GoInput
type Inputter ¶
type Inputter interface {
Init(ctx context.Context) error
GetBatch(ctx context.Context) (*clogger.MessageBatch, error)
Close(ctx context.Context) error
}
An Inputter is a thing that is able to read messages from somewhere
type JournalDInput ¶
type JournalDInput struct {
RecvConfig
// contains filtered or unexported fields
}
JournalDInput is an Input that reads off of the JournalD stream
func NewJournalDInput ¶
func NewJournalDInput(conf RecvConfig) (*JournalDInput, error)
NewJournalDInput constructs a JournalDInput with the given RecvConf defaulting to the CoreOSJournalDReader
func NewJournalDInputWithReader ¶
func NewJournalDInputWithReader(conf RecvConfig, reader JournalDReader) (*JournalDInput, error)
Constructs a JournalDInput with the given reader, incase we have any others in the future
func (*JournalDInput) GetBatch ¶
func (j *JournalDInput) GetBatch(ctx context.Context) (*clogger.MessageBatch, error)
Gets a single batch of messages off of the JournalD stream
type JournalDReader ¶
type JournalDReader interface {
// GetEntry reads a single message off of the end of the queue
GetEntry(ctx context.Context) (clogger.Message, error)
// Close is provided to clean up any sockets or anything when we exit
Close()
}
JournalDReader is an interface that reads messages off the JournalD stream
type SocketInputConfig ¶
type SocketInputConfig struct {
RecvConfig
ListenAddr string
TLS *clogger.TLSConfig
Type SocketInputType
Parser parse.InputParser
}
type SocketInputType ¶
type SocketInputType int
const ( UNIX_SOCKET_INPUT SocketInputType = iota TCP_SOCKET_INPUT )
Click to show internal directories.
Click to hide internal directories.