event

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Key          string       `json:"key"`
	Type         Type         `json:"type"`
	ResourceType ResourceType `json:"resource_type"`
	ResourceName string       `json:"resource_name"`
	FirstTime    time.Time    `json:"first_time"`
	LastTime     time.Time    `json:"last_time"`
	Count        int          `json:"count"`
	MessageType  MessageType  `json:"type_message"`
	Message      string       `json:"message"`
	NodeName     string       `json:"node_name"`
	NodeIP       net.IP       `json:"node_ip"`
}

Event generated by pipelines and nodes in the cluster. Events include common information and error information, which can be easily located when an error occurs

func NewErrorPipeline

func NewErrorPipeline(name string, msg string) (e *Event)

NewErrorPipeline returns a new pipeline error event

func NewInfoNode

func NewInfoNode(msg string) (e *Event)

NewInfoNode returns a new node event of info level

func NewInfoPipeline

func NewInfoPipeline(name string, msg string) (e *Event)

NewInfoPipeline returns a new pipeline info event

func NewWarnPipeline

func NewWarnPipeline(name string, msg string) (e *Event)

NewWarnPipeline returns a new pipeline warn event

type MessageType

type MessageType string

MessageType todo

type ResourceType

type ResourceType string

ResourceType pipeline or node or etc.

const (
	// PIPELINE resource type
	PIPELINE ResourceType = "pipeline"
	// ResourceType resource type
	NODE ResourceType = "node"
	// CLUSTER resource type
	CLUSTER ResourceType = "cluster"
)

type Type

type Type string

Type event level

const (
	// WARN level
	WARN Type = "warn"
	// ERROR level
	ERROR Type = "error"
	// INFO level
	INFO Type = "info"
)

Jump to

Keyboard shortcuts

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