service

package
v0.0.0-...-00e1031 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RETRY_COUNT = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LogClient

type LogClient struct {
	sync.Mutex // 用来控制 seq 计数, 只有 reportLog 和 gotWriteEvent 日志入队时存在并发问题

	*fsnotify.Watcher
	// contains filtered or unexported fields
}

func NewLogClient

func NewLogClient(conf *config.CollectorConfig, stopCh <-chan struct{}) (*LogClient, error)

NewLogClient TODO 支持动态获取 serverAddr

当前直接从配置中读取

func (*LogClient) Run

func (c *LogClient) Run()

type LogReportRequest

type LogReportRequest struct {
	Data   []byte `json:"data"`
	SeqNum int64  `json:"seq_num"` // 当前传送的 logtree 的序号,防止乱序
}

type LogServer

type LogServer struct {
	*gin.Engine
}

func NewLogServer

func NewLogServer(r *gin.Engine) *LogServer

Jump to

Keyboard shortcuts

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