common

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnChange

func OnChange[T any](ctx context.Context, prop observer.Property[T], f func(T))

Call function when prop changes, and also once initially

Types

type ClusterState

type ClusterState struct {
	*State
	*api.Cluster
	Extensions       []extension.Extension
	Namespaces       observer.Property[[]*corev1.Namespace]
	SelectedResource observer.Property[*metav1.APIResource]
	SearchText       observer.Property[string]
	SearchFilter     observer.Property[SearchFilter]
	SelectedObject   observer.Property[client.Object]
}

type SearchFilter

type SearchFilter struct {
	Name      []string
	Namespace []string
}

func NewSearchFilter

func NewSearchFilter(text string) SearchFilter

func (*SearchFilter) Test

func (f *SearchFilter) Test(object client.Object) bool

type State

type State struct {
	Preferences observer.Property[api.Preferences]
}

func NewState

func NewState() (*State, error)

func (*State) NewClusterState

func (s *State) NewClusterState(ctx context.Context, clusterPrefs observer.Property[api.ClusterPreferences]) (*ClusterState, error)

Jump to

Keyboard shortcuts

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