logsender

package
v3.1.12+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package logsender contains log Writer that sends the logs to the backend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opts

type Opts struct {
	Logger          hclog.Logger
	Conf            agentconf.Config
	CmdName         string
	MessageID       string
	URL             string
	JSONLineConvert func([]byte) ([]byte, error)
}

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

Sender is a log Writer that send the logs to the backend

func New

func New(opts Opts) *Sender

New creates Sender

func (*Sender) Close

func (s *Sender) Close() error

Close flushes buffered data and uploads it.

func (*Sender) Write

func (s *Sender) Write(b []byte) (int, error)

Write implements write interface that can be used by logger.

Jump to

Keyboard shortcuts

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