processor

package
v0.0.0-...-1e996ec Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const TailnodeCollection = "tailnode.log.tailscale.io"
View Source
const TailtrafficCollection = "tailtraffic.log.tailscale.io"

Variables

This section is empty.

Functions

This section is empty.

Types

type FileLoggerService

type FileLoggerService struct {
	BaseDir string
}

func NewFileLoggerService

func NewFileLoggerService(c types.FileLoggerConfig) (*FileLoggerService, error)

func (*FileLoggerService) Log

func (fl *FileLoggerService) Log(m LogtailMsg) error

type ForwardingService

type ForwardingService struct {
	Addr string
}

func NewForwardingService

func NewForwardingService(addr string) *ForwardingService

func (*ForwardingService) Forward

func (fwd *ForwardingService) Forward(m []byte) error

type HostInfo

type HostInfo struct {
	AppConnector    bool   `mapstructure:"AppConnector"`
	BackendLogID    string `mapstructure:"BackendLogID"`
	Container       bool   `mapstructure:"Container"`
	Desktop         bool   `mapstructure:"Desktop"`
	Distro          string `mapstructure:"Distro"`
	DistroVersion   string `mapstructure:"DistroVersion"`
	GoArch          string `mapstructure:"GoArch"`
	GoArchVar       string `mapstructure:"GoArchVar"`
	GoVersion       string `mapstructure:"GoVersion"`
	Hostname        string `mapstructure:"Hostname"`
	IPNVersion      string `mapstructure:"IPNVersion"`
	Machine         string `mapstructure:"Machine"`
	OS              string `mapstructure:"OS"`
	OSVersion       string `mapstructure:"OSVersion"`
	Userspace       bool   `mapstructure:"Userspace"`
	UserspaceRouter bool   `mapstructure:"UserspaceRouter"`
}

type HostInfoService

type HostInfoService struct {
}

func (*HostInfoService) Process

func (hs *HostInfoService) Process(msg LogtailMsg) error

type LogProcessor

type LogProcessor func([]byte)

type LogtailMsg

type LogtailMsg struct {
	Msg        map[string]interface{}
	Collection string
	PrivateID  string
}

type Metric

type Metric struct {
	Name   string
	WireID int
	Value  int
	Type   MetricType
}

type MetricType

type MetricType int64
const (
	Gauge MetricType = iota
	Counter
)

type MetricsService

type MetricsService struct {
	Registry           *prometheus.Registry
	Metrics            map[string]map[int]Metric
	GaugePromMetrics   map[string]*prometheus.GaugeVec
	CounterPromMetrics map[string]*prometheus.CounterVec
}

func NewMetricsService

func NewMetricsService() *MetricsService

func (*MetricsService) Process

func (ms *MetricsService) Process(msg LogtailMsg)

func (*MetricsService) PromHandler

func (ms *MetricsService) PromHandler() http.Handler

type MsgProcessor

type MsgProcessor func(LogtailMsg)

Jump to

Keyboard shortcuts

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