k8s

package
v1.7.12 Latest Latest
Warning

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

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

Documentation

Overview

Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>

Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>

Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>

Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultManagerMock

func NewDefaultManagerMock() manager.Manager

NewDefaultManagerMock returns default empty mock object.

Types

type ClientMock

type ClientMock struct {
	client.Client

	StatusFunc      func() client.SubResourceWriter
	GetFunc         func(context.Context, client.ObjectKey, client.Object, ...client.GetOption) error
	CreateFunc      func(context.Context, client.Object, ...client.CreateOption) error
	DeleteFunc      func(context.Context, client.Object, ...client.DeleteOption) error
	DeleteAllOfFunc func(context.Context, client.Object, ...client.DeleteAllOfOption) error
}

func (*ClientMock) Create

func (cm *ClientMock) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error

func (*ClientMock) Delete

func (cm *ClientMock) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error

func (*ClientMock) DeleteAllOf

func (cm *ClientMock) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error

func (*ClientMock) Get

func (cm *ClientMock) Get(ctx context.Context, objKey client.ObjectKey, obj client.Object, opts ...client.GetOption) error

func (*ClientMock) Status

func (cm *ClientMock) Status() client.SubResourceWriter

type ControllerMock

type ControllerMock struct {
	StartFunc      func(ctx context.Context) (<-chan error, error)
	GetManagerFunc func() k8s.Manager
}

func (*ControllerMock) GetManager

func (m *ControllerMock) GetManager() k8s.Manager

func (*ControllerMock) Start

func (m *ControllerMock) Start(ctx context.Context) (<-chan error, error)

type ManagerMock

type ManagerMock struct {
	manager.Manager

	GetClientFunc func() client.Client
}

func (*ManagerMock) GetClient

func (mm *ManagerMock) GetClient() client.Client

type SubResourceWriterMock

type SubResourceWriterMock struct {
	client.SubResourceWriter

	UpdateFunc func(context.Context, client.Object, ...client.SubResourceUpdateOption) error
}

func (*SubResourceWriterMock) Update

type ValdK8sClientMock added in v1.7.12

type ValdK8sClientMock struct {
	mock.Mock
}

func (*ValdK8sClientMock) Create added in v1.7.12

func (m *ValdK8sClientMock) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error

func (*ValdK8sClientMock) Delete added in v1.7.12

func (*ValdK8sClientMock) Get added in v1.7.12

func (m *ValdK8sClientMock) Get(ctx context.Context, name string, namespace string, obj client.Object, opts ...crclient.GetOption) error

func (*ValdK8sClientMock) LabelSelector added in v1.7.12

func (m *ValdK8sClientMock) LabelSelector(key string, op selection.Operator, vals []string) (labels.Selector, error)

func (*ValdK8sClientMock) List added in v1.7.12

func (*ValdK8sClientMock) Patch added in v1.7.12

func (*ValdK8sClientMock) Update added in v1.7.12

func (*ValdK8sClientMock) Watch added in v1.7.12

Jump to

Keyboard shortcuts

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