events

package
v0.0.0-...-be065d1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	Time  int64 `json:"time" description:"timestamp"`
	Count int64 `json:"count" description:"total number of events at intervals"`
}

type Client

type Client interface {
	SearchEvents(filter *Filter, from, size int64, sort string) (*Events, error)
	CountOverTime(filter *Filter, interval string) (*Histogram, error)
	StatisticsOnResources(filter *Filter) (*Statistics, error)
}

type Events

type Events struct {
	Total   int64         `json:"total" description:"total number of matched results"`
	Records []interface{} `json:"records" description:"actual array of results"`
}

type Filter

type Filter struct {
	InvolvedObjectNamespaceMap map[string]time.Time
	InvolvedObjectNames        []string
	InvolvedObjectNameFuzzy    []string
	InvolvedObjectkinds        []string
	Reasons                    []string
	ReasonFuzzy                []string
	MessageFuzzy               []string
	Type                       string
	StartTime                  time.Time
	EndTime                    time.Time
}

type Histogram

type Histogram struct {
	Total   int64    `json:"total" description:"total number of events"`
	Buckets []Bucket `json:"buckets" description:"actual array of histogram results"`
}

type Options

type Options struct {
	Host        string `json:"host" yaml:"host"`
	BasicAuth   bool   `json:"basicAuth" yaml:"basicAuth"`
	Username    string `json:"username" yaml:"username"`
	Password    string `json:"password" yaml:"password"`
	IndexPrefix string `json:"indexPrefix,omitempty" yaml:"indexPrefix,omitempty"`
	Version     string `json:"version" yaml:"version"`
}

func NewEventsOptions

func NewEventsOptions() *Options

func (*Options) AddFlags

func (s *Options) AddFlags(fs *pflag.FlagSet, c *Options)

func (*Options) ApplyTo

func (s *Options) ApplyTo(options *Options)

func (*Options) Validate

func (s *Options) Validate() []error

type Statistics

type Statistics struct {
	Resources int64 `json:"resources" description:"total number of resources"`
	Events    int64 `json:"events" description:"total number of events"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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