sls

package
v1.8.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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) Description

func (p *SlsFlusher) Description() string

Description ...

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) Init

func (p *SlsFlusher) Init(context pipeline.Context) error

Init ...

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL