model

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultScale = time.Second * 10

Variables

View Source
var Scales = []time.Duration{
	time.Second * 10,
	time.Second * 30,
	time.Minute,
	time.Minute * 5,
	time.Minute * 15,
	time.Minute * 30,
}

Functions

This section is empty.

Types

type App

type App struct {
	TopLevel model.TopLevel
	Tree     Tree
	TimeLine TimeLine
	Zoomed   bool

	Resources      atomic.Pointer[[]string]
	GroupKindNames atomic.Pointer[query.GroupKindNames]
	CategoryNames  atomic.Pointer[query.CategoryNames]
}

func NewApp

func NewApp(resources []string, gkns query.GroupKindNames, cns query.CategoryNames) *App

type ControlPlane

type ControlPlane struct {
	Namespace, Name string
}

type Event

type Event struct {
	LastTimestamp metav1.Time `json:"lastTimestamp"`
	Message       string      `json:"message"`
	Count         int         `json:"count"`
	Type          string      `json:"type"`
}

type EventsOrder

type EventsOrder []Event

func (EventsOrder) Len

func (e EventsOrder) Len() int

func (EventsOrder) Less

func (e EventsOrder) Less(i, j int) bool

func (EventsOrder) Swap

func (e EventsOrder) Swap(i, j int)

type Interval

type Interval struct {
	From, To time.Time
}

type Object

type Object struct {
	Id string

	Group, Kind     string
	ControlPlane    ControlPlane
	Namespace, Name string

	DeletionTimestamp, CreationTimestamp time.Time

	Synced []Interval
	Ready  []Interval
	JSON   queryv1alpha1.JSONObject
	Events []Event

	Children []*Object
}

func (*Object) IsReady

func (o *Object) IsReady(ts time.Time) bool

func (*Object) IsSynced

func (o *Object) IsSynced(ts time.Time) bool

func (*Object) Title

func (o *Object) Title() string

type ObjectsOrder

type ObjectsOrder []*tview.TreeNode

func (ObjectsOrder) Len

func (o ObjectsOrder) Len() int

func (ObjectsOrder) Less

func (o ObjectsOrder) Less(i, j int) bool

func (ObjectsOrder) Swap

func (o ObjectsOrder) Swap(i, j int)

type TimeLine

type TimeLine struct {
	// the duration of 10 characters
	Scale time.Duration
	// the time at the right of the timeline, or zero when following current time.
	FixedTime time.Time
}

type Tree

type Tree struct {
	AutoCollapse bool
	// contains filtered or unexported fields
}

func NewTree

func NewTree() Tree

func (*Tree) Root

func (t *Tree) Root() *tview.TreeNode

func (*Tree) Update

func (t *Tree) Update(objs []queryv1alpha1.QueryResponseObject)

Jump to

Keyboard shortcuts

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