api

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MPL-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	client.Client
	*kubernetes.Clientset
	Config             *rest.Config
	ClusterPreferences observer.Property[ClusterPreferences]
	Metrics            *Metrics
	Events             *Events
	RESTMapper         meta.RESTMapper
	DynamicClient      *dynamic.DynamicClient
	Scheme             *runtime.Scheme
	Resources          []metav1.APIResource
}

func NewCluster

func NewCluster(ctx context.Context, clusterPrefs observer.Property[ClusterPreferences]) (*Cluster, error)

func (*Cluster) Disconnect

func (c *Cluster) Disconnect()

type ClusterPreferences

type ClusterPreferences struct {
	Name        string
	Host        string
	BearerToken string
	TLS         rest.TLSClientConfig
	Exec        *api.ExecConfig
	Navigation  struct {
		Favourites []schema.GroupVersionResource
	}
}

func (*ClusterPreferences) Defaults

func (c *ClusterPreferences) Defaults()

type Column

type Column struct {
	Name     string
	Priority int8
	Bind     func(listitem *gtk.ListItem, object client.Object)
}

type Events

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

func (*Events) For

func (e *Events) For(object client.Object) []*eventsv1.Event

type GroupProperty

type GroupProperty struct {
	ID       string
	Priority int8
	Name     string
	Children []Property
	Widget   func(gtk.Widgetter, *adw.NavigationView)
}

func (*GroupProperty) GetID

func (p *GroupProperty) GetID() string

func (*GroupProperty) GetPriority

func (p *GroupProperty) GetPriority() int8

type Metrics

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

func (*Metrics) Container

func (m *Metrics) Container(pod types.NamespacedName, container string) *metricsv1beta1.ContainerMetrics

func (*Metrics) Node

func (m *Metrics) Node(name string) *metricsv1beta1.NodeMetrics

func (*Metrics) Pod

func (*Metrics) PodSum

type Preferences

type Preferences struct {
	Clusters []observer.Property[ClusterPreferences]
	// contains filtered or unexported fields
}

func LoadPreferences

func LoadPreferences() (*Preferences, error)

func (Preferences) Defaults

func (c Preferences) Defaults()

func (*Preferences) Save

func (c *Preferences) Save() error

type Property

type Property interface {
	GetID() string
	GetPriority() int8
}

type TextProperty

type TextProperty struct {
	ID     string
	Name   string
	Value  string
	Source client.Object
	Widget func(gtk.Widgetter, *adw.NavigationView)
}

func (*TextProperty) GetID

func (p *TextProperty) GetID() string

func (*TextProperty) GetPriority

func (p *TextProperty) GetPriority() int8

Jump to

Keyboard shortcuts

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