Documentation
¶
Index ¶
- type LMLogIngest
- func (lli *LMLogIngest) BatchInterval() time.Duration
- func (lli *LMLogIngest) CreateRequestBody() internal.DataPayload
- func (lli *LMLogIngest) ExportData(payloadList internal.DataPayload, uri, method string) error
- func (lli *LMLogIngest) SendLogs(ctx context.Context, logMessage string, ...) error
- func (lli *LMLogIngest) URI() string
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LMLogIngest ¶
type LMLogIngest struct {
// contains filtered or unexported fields
}
func NewLMLogIngest ¶
func NewLMLogIngest(ctx context.Context, opts ...Option) (*LMLogIngest, error)
NewLMLogIngest initializes LMLogIngest
func (*LMLogIngest) BatchInterval ¶
func (lli *LMLogIngest) BatchInterval() time.Duration
BatchInterval returns the time interval for batching
func (*LMLogIngest) CreateRequestBody ¶
func (lli *LMLogIngest) CreateRequestBody() internal.DataPayload
CreateRequestBody prepares log payload from the requests present in cache after batch interval expires
func (*LMLogIngest) ExportData ¶
func (lli *LMLogIngest) ExportData(payloadList internal.DataPayload, uri, method string) error
ExportData exports logs to the LM platform
func (*LMLogIngest) SendLogs ¶
func (lli *LMLogIngest) SendLogs(ctx context.Context, logMessage string, resourceidMap, metadata map[string]string) error
SendLogs is the entry point for receiving log data
func (*LMLogIngest) URI ¶
func (lli *LMLogIngest) URI() string
URI returns the endpoint/uri of log ingest API
type Option ¶ added in v0.2.0
type Option func(*LMLogIngest) error
func WithAuthentication ¶ added in v0.3.0
func WithAuthentication(authProvider model.AuthProvider) Option
WithAuthentication is used for passing authentication token if not set in environment variables.
func WithGzipCompression ¶ added in v0.4.0
WithGzipCompression can be used to enable/disable gzip compression of log payload Note: By default, gzip compression is enabled.
func WithLogBatchingEnabled ¶ added in v0.2.0
WithLogBatchingEnabled is used for enabling batching for logs. Pass time interval for batch as an input parameter.