Documentation ¶
Index ¶
- func UpdateClusterPreferences(prefs *ClusterPreferences, path, context string) error
- func Watch[T client.Object](ctx context.Context, cluster *Cluster, resource *metav1.APIResource, ...)
- type Cluster
- type ClusterPreferences
- type Column
- type Encoder
- type Events
- type GroupProperty
- type Kubeconfig
- type License
- type Metrics
- func (m *Metrics) Container(pod types.NamespacedName, container string) *metricsv1beta1.ContainerMetrics
- func (m *Metrics) Node(name string) *metricsv1beta1.NodeMetrics
- func (m *Metrics) Pod(name types.NamespacedName) *metricsv1beta1.PodMetrics
- func (m *Metrics) PodSum(name types.NamespacedName) (*resource.Quantity, *resource.Quantity)
- type Preferences
- type Property
- type TextProperty
- type WatchOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateClusterPreferences ¶ added in v0.2.0
func UpdateClusterPreferences(prefs *ClusterPreferences, path, context string) error
func Watch ¶ added in v0.3.0
func Watch[T client.Object](ctx context.Context, cluster *Cluster, resource *metav1.APIResource, opts WatchOptions[T])
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 Encoder *Encoder Resources []metav1.APIResource }
func NewCluster ¶
func NewCluster(ctx context.Context, clusterPrefs observer.Property[ClusterPreferences]) (*Cluster, error)
func (*Cluster) GetAPIResource ¶ added in v0.3.0
func (cluster *Cluster) GetAPIResource(gvk schema.GroupVersionKind) *metav1.APIResource
func (*Cluster) GetReference ¶ added in v0.3.0
type ClusterPreferences ¶
type ClusterPreferences struct { Kubeconfig *Kubeconfig Name string Host string BearerToken string TLS rest.TLSClientConfig Exec *api.ExecConfig ReadOnly bool Favourites []schema.GroupVersionResource Pins []corev1.ObjectReference } }
func (*ClusterPreferences) Defaults ¶
func (c *ClusterPreferences) Defaults()
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 Kubeconfig ¶ added in v0.2.0
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 (m *Metrics) Pod(name types.NamespacedName) *metricsv1beta1.PodMetrics
type Preferences ¶
type Preferences struct { Clusters []observer.Property[ClusterPreferences] // contains filtered or unexported fields }
func LoadPreferences ¶
func LoadPreferences() (*Preferences, error)
func (*Preferences) Save ¶
func (c *Preferences) Save() error
type TextProperty ¶
type TextProperty struct { ID string Name string Value string Reference *corev1.ObjectReference Widget func(gtk.Widgetter, *adw.NavigationView) }
func (*TextProperty) GetID ¶
func (p *TextProperty) GetID() string
func (*TextProperty) GetPriority ¶
func (p *TextProperty) GetPriority() int8
type WatchOptions ¶ added in v0.3.0
type WatchOptions[T client.Object] struct { ListOptions metav1.ListOptions Property observer.Property[[]T] AddFunc func(T) UpdateFunc func(T) DeleteFunc func(T) }
Click to show internal directories.
Click to hide internal directories.