mockkubeapiserver

package
v1.28.4 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockKubeAPIServer

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

func NewMockKubeAPIServer

func NewMockKubeAPIServer(addr string) (*MockKubeAPIServer, error)

func (*MockKubeAPIServer) Add

func (s *MockKubeAPIServer) Add(gvk schema.GroupVersionKind, resource string, scope meta.RESTScope)

Add registers a type with the schema for the mock kubeapiserver

func (*MockKubeAPIServer) AddObject

func (s *MockKubeAPIServer) AddObject(obj *unstructured.Unstructured) error

AddObject pre-creates an object

func (*MockKubeAPIServer) ServeHTTP

func (s *MockKubeAPIServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*MockKubeAPIServer) StartServing

func (s *MockKubeAPIServer) StartServing() (net.Addr, error)

func (*MockKubeAPIServer) Stop

func (s *MockKubeAPIServer) Stop() error

type Request

type Request interface {
	Run(s *MockKubeAPIServer) error
	Init(w http.ResponseWriter, r *http.Request)
}

Jump to

Keyboard shortcuts

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