Documentation ¶
Index ¶
- type SlsFlusher
- func (p *SlsFlusher) Description() string
- func (p *SlsFlusher) Flush(projectName string, logstoreName string, configName string, ...) error
- func (p *SlsFlusher) Init(context pipeline.Context) error
- func (p *SlsFlusher) IsReady(projectName string, logstoreName string, logstoreKey int64) bool
- func (*SlsFlusher) SetUrgent(flag bool)
- func (*SlsFlusher) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SlsFlusher ¶
type SlsFlusher struct { EnableShardHash bool KeepShardHash bool // contains filtered or unexported fields }
SlsFlusher uses symbols in LogtailAdaptor(.so) to flush log groups to Logtail.
func (*SlsFlusher) Flush ¶
func (p *SlsFlusher) Flush(projectName string, logstoreName string, configName string, logGroupList []*protocol.LogGroup) error
Flush ... Because IsReady is called before, Logtail must have space in sending queue, just call LogtailSendPb through cgo to push data into queue, Logtail will send data to its destination (SLS mostly) according to its config.
func (*SlsFlusher) IsReady ¶
func (p *SlsFlusher) IsReady(projectName string, logstoreName string, logstoreKey int64) bool
IsReady ... There is a sending queue in Logtail, call LogtailIsValidToSend through cgo to make sure if there is any space for coming data.
func (*SlsFlusher) SetUrgent ¶
func (*SlsFlusher) SetUrgent(flag bool)
SetUrgent ... We do nothing here because necessary flag has already been set in Logtail before this method is called. Any future call of IsReady will return true so that remaining data can be flushed to Logtail (which will flush data to local file system) before it quits.
func (*SlsFlusher) Stop ¶
func (*SlsFlusher) Stop() error
Stop ... We do nothing here because SlsFlusher does not create any resources.