monitorserialization

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: Apache-2.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventsFromFile

func EventsFromFile(filename string) (monitorapi.Intervals, error)

func EventsIntervalsToJSON

func EventsIntervalsToJSON(events monitorapi.Intervals) ([]byte, error)

TODO: this is very similar but subtly different to the function above, what is the purpose of skipping those with from/to equal or empty to?

func EventsToFile

func EventsToFile(filename string, events monitorapi.Intervals) error

func InstanceMapToFile

func InstanceMapToFile(filename string, resourceType string, instances monitorapi.InstanceMap) error

func IntervalFromJSON

func IntervalFromJSON(data []byte) (*monitorapi.Interval, error)

func IntervalToOneLineJSON

func IntervalToOneLineJSON(interval monitorapi.Interval) ([]byte, error)

func IntervalsFromJSON

func IntervalsFromJSON(data []byte) (monitorapi.Intervals, error)

func IntervalsToFile

func IntervalsToFile(filename string, intervals monitorapi.Intervals) error

func IntervalsToJSON

func IntervalsToJSON(intervals monitorapi.Intervals) ([]byte, error)

Types

type EventInterval

type EventInterval struct {
	Level string `json:"level"`

	// TODO: Remove the omitempty, just here to keep from having to repeatedly updated the json
	// files used in some new tests
	Source string `json:"source,omitempty"` // also temporary, unsure if this concept will survive

	Display bool `json:"display,omitempty"`

	Locator monitorapi.Locator `json:"locator"`
	Message monitorapi.Message `json:"message"`

	From metav1.Time `json:"from"`
	To   metav1.Time `json:"to"`
}

Event is not an interval. It is an instant. The instant removes any ambiguity about "when"

type EventIntervalList

type EventIntervalList struct {
	Items []EventInterval `json:"items"`
}

EventList is not an interval. It is an instant. The instant removes any ambiguity about "when"

Jump to

Keyboard shortcuts

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