systemeventlog

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventId

type EventId uint16

Ranges of ids for each component detailed in the NS-Server design doc:

https://docs.google.com/document/d/1dMkRVbJFQbGE0cfJl05lYN6qtv_jDv7YEdUfFzQGMbo/edit

type EventSeverity

type EventSeverity string

Severity

const (
	SEInfo    EventSeverity = "info"
	SEError   EventSeverity = "error"
	SEWarning EventSeverity = "warn"
	SEFatal   EventSeverity = "fatal"
)

type SystemEvent

type SystemEvent struct {
	SubComponent string        `json:"sub_component,omitempty"`
	Severity     EventSeverity `json:"severity"`

	SystemEventInfo

	ExtraAttributes interface{} `json:"extra_attributes,omitempty"`
}

func NewSystemEvent

func NewSystemEvent(subComponent string, sei SystemEventInfo,
	severity EventSeverity, extraAttributes interface{}) SystemEvent

type SystemEventInfo

type SystemEventInfo struct {
	EventId     EventId `json:"event_id"`
	Description string  `json:"description,omitempty"`
}

type SystemEventLogger

type SystemEventLogger interface {
	Log(event SystemEvent)
}

func NewSystemEventLogger

func NewSystemEventLogger(config SystemEventLoggerConfig, baseNsserverURL string,
	component string, client http.Client,
	errorLoggerFunc func(message string)) SystemEventLogger

type SystemEventLoggerConfig

type SystemEventLoggerConfig struct {
	QueueSize            uint16
	MaxTries             uint16
	MaxRetryIntervalSecs uint16
}

type SystemEventLoggerImpl

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

func (*SystemEventLoggerImpl) Log

func (seli *SystemEventLoggerImpl) Log(event SystemEvent)

Jump to

Keyboard shortcuts

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