rest

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(resource *resources.ResourceList) func(w http.ResponseWriter, r *http.Request)

func BindCustomResource

func BindCustomResource(resource *resources.ResourceList, cache *resources.Cache) func(w http.ResponseWriter, r *http.Request)

func FilterItemsByFields added in v0.9.0

func FilterItemsByFields(items []unstructured.Unstructured, fieldPaths []string) []map[string]interface{}

FilterItemsByFields filters the given items based on the specified field paths - It takes a slice of unstructured.Unstructured and a slice of field paths. - It returns a slice of maps, each representing a filtered item.

func Handler

func Handler(w http.ResponseWriter, r *http.Request, getData func(string, string) []unstructured.Unstructured, changes <-chan struct{}, fieldsList []string, crdExists func() bool)

Handler is a generic SSE handler that sends data to the client

func WriteHeaders

func WriteHeaders(w http.ResponseWriter)

WriteHeaders sets the headers for an SSE connection

Types

This section is empty.

Jump to

Keyboard shortcuts

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