Documentation ¶
Index ¶
- type FakeK8s
- func (f *FakeK8s) Close()
- func (f *FakeK8s) CreateOrReplaceResource(obj runtime.Object)
- func (f *FakeK8s) DeleteResource(obj runtime.Object) bool
- func (f *FakeK8s) DeleteResourceByName(resKind string, namespace string, name string) bool
- func (f *FakeK8s) SetInitialList(l []runtime.Object)
- func (f *FakeK8s) Start()
- func (f *FakeK8s) URL() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeK8s ¶
FakeK8s is a mock K8s API server. It can serve both list and watch requests.
func (*FakeK8s) CreateOrReplaceResource ¶
CreateOrReplaceResource can be used by unit tests. It will generate a watch event.
func (*FakeK8s) DeleteResource ¶
DeleteResource deletes a resource and sends a watch event if actually deleted.
func (*FakeK8s) DeleteResourceByName ¶
DeleteResourceByName removes a resource from the fake api server. It will generate a watch event for the deletion if the resource existed.
func (*FakeK8s) SetInitialList ¶
SetInitialList adds resources to the server state that are served when doing list requests. l can be a list of any of the supported resource types.
Click to show internal directories.
Click to hide internal directories.