Documentation ¶
Index ¶
- Variables
- func ChainEncode(e Encoder, objs ...interface{}) (ret string, err error)
- func EncodingError(err error) error
- func FullToGelfMessage(m *model.FullMessage) *gelf.Message
- func RELPEncode(e Encoder, txnr int32, command string, obj interface{}) (ret string, err error)
- func SyslogToGelfMessage(m *model.SyslogMessage) *gelf.Message
- func TcpOctetEncode(e Encoder, obj interface{}) (ret string, err error)
- type Encoder
Constants ¶
This section is empty.
Variables ¶
View Source
var AcceptedMimeTypes = []string{ JsonMimetype, AvroMimetype, NDJsonMimetype, ProtobufMimetype, OctetStreamMimetype, "text/plain", }
View Source
var AvroMimetype = "application/x-avro-binary"
View Source
var JsonMimetype = "application/json"
View Source
var MimeTypes = map[baseenc.Format]string{ baseenc.RFC5424: PlainMimetype, baseenc.RFC3164: PlainMimetype, baseenc.JSON: JsonMimetype, baseenc.FullJSON: JsonMimetype, baseenc.AVRO: AvroMimetype, baseenc.FullAVRO: AvroMimetype, baseenc.JSONAVRO: JsonMimetype, baseenc.FullJSONAVRO: JsonMimetype, baseenc.File: PlainMimetype, baseenc.GELF: JsonMimetype, baseenc.Protobuf: ProtobufMimetype, }
View Source
var NDJsonMimetype = "application/x-ndjson"
View Source
var OctetStreamMimetype = "application/octet-stream"
View Source
var PlainMimetype = mime.FormatMediaType("text/plain", map[string]string{"charset": "utf-8"})
View Source
var ProtobufMimetype = "application/vnd.google.protobuf"
View Source
var RMimeTypes = map[string]Encoder{ JsonMimetype: encodeJSON, NDJsonMimetype: encodeJSON, AvroMimetype: encodeFullAVRO, ProtobufMimetype: encodePB, OctetStreamMimetype: encodePB, PlainMimetype: encode5424, "text/plain": encode5424, }
Functions ¶
func ChainEncode ¶
func EncodingError ¶
func FullToGelfMessage ¶
func FullToGelfMessage(m *model.FullMessage) *gelf.Message
func RELPEncode ¶
func SyslogToGelfMessage ¶
func SyslogToGelfMessage(m *model.SyslogMessage) *gelf.Message
func TcpOctetEncode ¶
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.