Documentation
¶
Index ¶
- func NewMessage(content []byte) *message
- type ContainerMessage
- func (m ContainerMessage) Content() []byte
- func (m ContainerMessage) GetOrigin() *MessageOrigin
- func (m ContainerMessage) GetSeverity() []byte
- func (m ContainerMessage) GetTagsPayload() []byte
- func (m ContainerMessage) GetTimestamp() string
- func (m ContainerMessage) SetContent(content []byte)
- func (m ContainerMessage) SetOrigin(Origin *MessageOrigin)
- func (m ContainerMessage) SetSeverity(severity []byte)
- func (m ContainerMessage) SetTagsPayload(tagsPayload []byte)
- type FileMessage
- func (m FileMessage) Content() []byte
- func (m FileMessage) GetOrigin() *MessageOrigin
- func (m FileMessage) GetSeverity() []byte
- func (m FileMessage) GetTagsPayload() []byte
- func (m FileMessage) GetTimestamp() string
- func (m FileMessage) SetContent(content []byte)
- func (m FileMessage) SetOrigin(Origin *MessageOrigin)
- func (m FileMessage) SetSeverity(severity []byte)
- func (m FileMessage) SetTagsPayload(tagsPayload []byte)
- type Message
- type MessageOrigin
- type NetworkMessage
- func (m NetworkMessage) Content() []byte
- func (m NetworkMessage) GetOrigin() *MessageOrigin
- func (m NetworkMessage) GetSeverity() []byte
- func (m NetworkMessage) GetTagsPayload() []byte
- func (m NetworkMessage) GetTimestamp() string
- func (m NetworkMessage) SetContent(content []byte)
- func (m NetworkMessage) SetOrigin(Origin *MessageOrigin)
- func (m NetworkMessage) SetSeverity(severity []byte)
- func (m NetworkMessage) SetTagsPayload(tagsPayload []byte)
- type StopMessage
- func (m StopMessage) Content() []byte
- func (m StopMessage) GetOrigin() *MessageOrigin
- func (m StopMessage) GetSeverity() []byte
- func (m StopMessage) GetTagsPayload() []byte
- func (m StopMessage) GetTimestamp() string
- func (m StopMessage) SetContent(content []byte)
- func (m StopMessage) SetOrigin(Origin *MessageOrigin)
- func (m StopMessage) SetSeverity(severity []byte)
- func (m StopMessage) SetTagsPayload(tagsPayload []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContainerMessage ¶
type ContainerMessage struct {
// contains filtered or unexported fields
}
ContainerMessage is a message coming from a container Source
func NewContainerMessage ¶
func NewContainerMessage(content []byte) *ContainerMessage
func (ContainerMessage) Content ¶
func (m ContainerMessage) Content() []byte
Content returns the content the message, the actual log line
func (ContainerMessage) GetOrigin ¶
func (m ContainerMessage) GetOrigin() *MessageOrigin
GetOrigin returns the Origin from which the message comes
func (ContainerMessage) GetSeverity ¶
func (m ContainerMessage) GetSeverity() []byte
GetSeverity returns the severity of the message when set
func (ContainerMessage) GetTagsPayload ¶
func (m ContainerMessage) GetTagsPayload() []byte
GetSeverity returns the tags and sources of the message It will default on the LogSource tags payload, but can be overriden in the message itself with tagsPayload
func (ContainerMessage) GetTimestamp ¶
func (m ContainerMessage) GetTimestamp() string
GetTimestamp returns the timestamp of the message, or "" if no timestamp is relevant
func (ContainerMessage) SetContent ¶
func (m ContainerMessage) SetContent(content []byte)
SetContent updates the content the message
func (ContainerMessage) SetOrigin ¶
func (m ContainerMessage) SetOrigin(Origin *MessageOrigin)
SetOrigin sets the integration from which the message comes
func (ContainerMessage) SetSeverity ¶
func (m ContainerMessage) SetSeverity(severity []byte)
SetSeverity sets the severity of the message
func (ContainerMessage) SetTagsPayload ¶
func (m ContainerMessage) SetTagsPayload(tagsPayload []byte)
SetSeverity sets the tags and sources of the message
type FileMessage ¶
type FileMessage struct {
// contains filtered or unexported fields
}
FileMessage is a message coming from a File
func NewFileMessage ¶
func NewFileMessage(content []byte) *FileMessage
func (FileMessage) Content ¶
func (m FileMessage) Content() []byte
Content returns the content the message, the actual log line
func (FileMessage) GetOrigin ¶
func (m FileMessage) GetOrigin() *MessageOrigin
GetOrigin returns the Origin from which the message comes
func (FileMessage) GetSeverity ¶
func (m FileMessage) GetSeverity() []byte
GetSeverity returns the severity of the message when set
func (FileMessage) GetTagsPayload ¶
func (m FileMessage) GetTagsPayload() []byte
GetSeverity returns the tags and sources of the message It will default on the LogSource tags payload, but can be overriden in the message itself with tagsPayload
func (FileMessage) GetTimestamp ¶
func (m FileMessage) GetTimestamp() string
GetTimestamp returns the timestamp of the message, or "" if no timestamp is relevant
func (FileMessage) SetContent ¶
func (m FileMessage) SetContent(content []byte)
SetContent updates the content the message
func (FileMessage) SetOrigin ¶
func (m FileMessage) SetOrigin(Origin *MessageOrigin)
SetOrigin sets the integration from which the message comes
func (FileMessage) SetSeverity ¶
func (m FileMessage) SetSeverity(severity []byte)
SetSeverity sets the severity of the message
func (FileMessage) SetTagsPayload ¶
func (m FileMessage) SetTagsPayload(tagsPayload []byte)
SetSeverity sets the tags and sources of the message
type Message ¶
type Message interface { Content() []byte SetContent([]byte) GetOrigin() *MessageOrigin SetOrigin(*MessageOrigin) GetTimestamp() string // No need for SetTimestamp as we use MessageOrigin under the hood GetSeverity() []byte SetSeverity([]byte) GetTagsPayload() []byte SetTagsPayload([]byte) }
Message represents a log line sent to datadog, with its metadata
type MessageOrigin ¶
type MessageOrigin struct { Identifier string LogSource *config.IntegrationConfigLogSource Offset int64 Timestamp string }
MessageOrigin represents the Origin of a message
type NetworkMessage ¶
type NetworkMessage struct {
// contains filtered or unexported fields
}
FileMessage is a message coming from a network Source
func NewNetworkMessage ¶
func NewNetworkMessage(content []byte) *NetworkMessage
func (NetworkMessage) Content ¶
func (m NetworkMessage) Content() []byte
Content returns the content the message, the actual log line
func (NetworkMessage) GetOrigin ¶
func (m NetworkMessage) GetOrigin() *MessageOrigin
GetOrigin returns the Origin from which the message comes
func (NetworkMessage) GetSeverity ¶
func (m NetworkMessage) GetSeverity() []byte
GetSeverity returns the severity of the message when set
func (NetworkMessage) GetTagsPayload ¶
func (m NetworkMessage) GetTagsPayload() []byte
GetSeverity returns the tags and sources of the message It will default on the LogSource tags payload, but can be overriden in the message itself with tagsPayload
func (NetworkMessage) GetTimestamp ¶
func (m NetworkMessage) GetTimestamp() string
GetTimestamp returns the timestamp of the message, or "" if no timestamp is relevant
func (NetworkMessage) SetContent ¶
func (m NetworkMessage) SetContent(content []byte)
SetContent updates the content the message
func (NetworkMessage) SetOrigin ¶
func (m NetworkMessage) SetOrigin(Origin *MessageOrigin)
SetOrigin sets the integration from which the message comes
func (NetworkMessage) SetSeverity ¶
func (m NetworkMessage) SetSeverity(severity []byte)
SetSeverity sets the severity of the message
func (NetworkMessage) SetTagsPayload ¶
func (m NetworkMessage) SetTagsPayload(tagsPayload []byte)
SetSeverity sets the tags and sources of the message
type StopMessage ¶
type StopMessage struct {
// contains filtered or unexported fields
}
StopMessage is used to let a component stop gracefully
func NewStopMessage ¶
func NewStopMessage() *StopMessage
func (StopMessage) Content ¶
func (m StopMessage) Content() []byte
Content returns the content the message, the actual log line
func (StopMessage) GetOrigin ¶
func (m StopMessage) GetOrigin() *MessageOrigin
GetOrigin returns the Origin from which the message comes
func (StopMessage) GetSeverity ¶
func (m StopMessage) GetSeverity() []byte
GetSeverity returns the severity of the message when set
func (StopMessage) GetTagsPayload ¶
func (m StopMessage) GetTagsPayload() []byte
GetSeverity returns the tags and sources of the message It will default on the LogSource tags payload, but can be overriden in the message itself with tagsPayload
func (StopMessage) GetTimestamp ¶
func (m StopMessage) GetTimestamp() string
GetTimestamp returns the timestamp of the message, or "" if no timestamp is relevant
func (StopMessage) SetContent ¶
func (m StopMessage) SetContent(content []byte)
SetContent updates the content the message
func (StopMessage) SetOrigin ¶
func (m StopMessage) SetOrigin(Origin *MessageOrigin)
SetOrigin sets the integration from which the message comes
func (StopMessage) SetSeverity ¶
func (m StopMessage) SetSeverity(severity []byte)
SetSeverity sets the severity of the message
func (StopMessage) SetTagsPayload ¶
func (m StopMessage) SetTagsPayload(tagsPayload []byte)
SetSeverity sets the tags and sources of the message