sender

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventDimensionKey = "dimension"  // 事件dimension键值
	EventEventKey     = "event"      // 事件内容的事件键值
	EventTimeStampKey = "timestamp"  // 事件事件键值
	EventEventNameKey = "event_name" // 事件名键值
	EventTargetKey    = "target"     // 监控目标键值
)

Variables

View Source
var CounterSend = uint64(0)

Functions

func New

func New(ctx context.Context, cfg keyword.SendConfig, eChan chan<- define.Event) (module.Module, error)

Types

type EventCounter

type EventCounter struct {
	EventName  string                 // 日志采集事件名
	Count      int                    // 事件产生计数器
	LastLog    string                 // 最后日志
	Dimensions map[string]interface{} // 事件相关维度
}

type EventSender

type EventSender struct {
	tasks.CmdbEventSender
	// contains filtered or unexported fields
}

EventSender: 日志关键字的事件发送

func NewEventSender

func NewEventSender(ctx context.Context, config keyword.SendConfig, eChan chan<- define.Event) *EventSender

func (*EventSender) AddInput

func (s *EventSender) AddInput(input <-chan interface{})

func (*EventSender) AddOutput

func (s *EventSender) AddOutput(output chan<- interface{})

AddOutput 由于Sender是最后一个环节了,所以不需要将output保留

func (*EventSender) ID

func (s *EventSender) ID() string

func (*EventSender) Reload

func (s *EventSender) Reload(interface{})

func (*EventSender) Start

func (s *EventSender) Start() error

func (*EventSender) Stop

func (s *EventSender) Stop()

func (*EventSender) Wait

func (s *EventSender) Wait()

type OutputData

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

func (OutputData) AsMapStr

func (o OutputData) AsMapStr() common.MapStr

func (OutputData) GetType

func (o OutputData) GetType() string

func (OutputData) IgnoreCMDBLevel

func (o OutputData) IgnoreCMDBLevel() bool

IgnoreCMDBLevel :

type Sender

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

Sender

func (*Sender) AddInput

func (client *Sender) AddInput(input <-chan interface{})

func (*Sender) AddOutput

func (client *Sender) AddOutput(output chan<- interface{})

AddOutput add one output

func (*Sender) ID

func (client *Sender) ID() string

func (*Sender) Reload

func (client *Sender) Reload(cfg interface{})

func (*Sender) Start

func (client *Sender) Start() error

func (*Sender) Stop

func (client *Sender) Stop()

Stop stops the input and with it all harvesters

func (*Sender) Wait

func (client *Sender) Wait()

Jump to

Keyboard shortcuts

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