framework

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKind

type APIKind struct {
	ApiResource    metav1.APIResource
	RawEndpoints   map[string]http.HandlerFunc
	Resource       *Resource
	CustomResource *CustomResource
}

type CustomResource

type CustomResource struct {
	CreateHandler  CustomResourceHandlerFunc
	GetHandler     CustomResourceHandlerFunc
	ListHandler    CustomResourceHandlerFunc
	ReplaceHandler CustomResourceHandlerFunc
	DeleteHandler  CustomResourceHandlerFunc
	WatchHandler   CustomResourceHandlerFunc
}

type CustomResourceHandlerFunc

type CustomResourceHandlerFunc func(string, string, http.ResponseWriter, *http.Request)

type Resource

type Resource struct {
	CreateNew     ResourceCreateNew
	CreateNewList ResourceCreateNewList
	ListCallback  ResourceListCallback
	WatchCallback ResourceWatchCallback
}

type ResourceCreateNew

type ResourceCreateNew func() (schema.GroupVersionResource, client.Object)

type ResourceCreateNewList

type ResourceCreateNewList func() (schema.GroupVersionResource, client.ObjectList)

type ResourceListCallback

type ResourceListCallback func(context.Context, string, string, client.ObjectList) (any, error)

type ResourceWatchCallback

type ResourceWatchCallback func(context.Context, string, string, *unstructured.Unstructured) (any, error)

type Server

type Server struct {
	KubeClient         client.Client
	DynamicKubeCluient *dynamic.DynamicClient
	// contains filtered or unexported fields
}

func NewServer

func NewServer(config ServerConfig) *Server

func (*Server) Start

func (s *Server) Start(ctx context.Context) (err error)

type ServerConfig

type ServerConfig struct {
	KubeClient        client.Client
	DynamicKubeClient *dynamic.DynamicClient
	Port              string
	CertFile          string
	KeyFile           string
	Group             string
	Version           string
	APIKinds          []APIKind
}

Jump to

Keyboard shortcuts

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