Documentation
¶
Index ¶
- Constants
- type Config
- type Entry
- type Fluent
- func (f *Fluent) Close() (err error)
- func (f *Fluent) EncodeAndPostData(tag string, tm time.Time, message interface{}) error
- func (f *Fluent) EncodeData(tag string, tm time.Time, message interface{}) (data []byte, err error)
- func (f *Fluent) Post(tag string, message interface{}) error
- func (f *Fluent) PostRawData(data []byte)
- func (f *Fluent) PostWithTime(tag string, tm time.Time, message interface{}) error
- type Forward
- type Message
Constants ¶
View Source
const Version = "0.5.1"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶ added in v1.0.0
type Entry struct {
Time int64 `msg:"time"`
Record interface{} `msg:"record"`
}
func (Entry) MarshalMsg ¶ added in v1.0.0
MarshalMsg implements msgp.Marshaler
type Fluent ¶
type Fluent struct {
Config
// contains filtered or unexported fields
}
func (*Fluent) EncodeAndPostData ¶ added in v1.0.0
func (*Fluent) EncodeData ¶ added in v1.0.0
func (*Fluent) Post ¶
Post writes the output for a logging event.
Examples:
// send string
f.Post("tag_name", "data")
// send map[string]
mapStringData := map[string]string{
"foo": "bar",
}
f.Post("tag_name", mapStringData)
// send message with specified time
mapStringData := map[string]string{
"foo": "bar",
}
tm := time.Now()
f.PostWithTime("tag_name", tm, mapStringData)
// send struct
structData := struct {
Name string `msg:"name"`
} {
"john smith",
}
f.Post("tag_name", structData)
func (*Fluent) PostRawData ¶ added in v1.0.0
type Forward ¶ added in v1.0.0
type Forward struct {
Tag string `msg:"tag"`
Entries []Entry `msg:"entries"`
Option interface{} `msg:"option"`
}
func (*Forward) MarshalMsg ¶ added in v1.0.0
MarshalMsg implements msgp.Marshaler
type Message ¶ added in v1.0.0
type Message struct {
Tag string `msg:"tag"`
Time int64 `msg:"time"`
Record interface{} `msg:"record"`
Option interface{} `msg:"option"`
}
func (*Message) MarshalMsg ¶ added in v1.0.0
MarshalMsg implements msgp.Marshaler
Click to show internal directories.
Click to hide internal directories.