mocks

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAlgorithm

type IAlgorithm struct {
	mock.Mock
}

IAlgorithm is an autogenerated mock type for the IAlgorithm type

func NewIAlgorithm

func NewIAlgorithm(t interface {
	mock.TestingT
	Cleanup(func())
}) *IAlgorithm

NewIAlgorithm creates a new instance of IAlgorithm. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*IAlgorithm) NetworkScore

func (_m *IAlgorithm) NetworkScore(node *pkg.WeightedNode, pod *pkg.WeightedPod) float64

NetworkScore provides a mock function with given fields: node, pod

func (*IAlgorithm) NodeScore

func (_m *IAlgorithm) NodeScore(node *pkg.WeightedNode) float64

NodeScore provides a mock function with given fields: node

func (*IAlgorithm) PodScore

func (_m *IAlgorithm) PodScore(pod *pkg.WeightedPod) float64

PodScore provides a mock function with given fields: pod

func (*IAlgorithm) PriceScore

func (_m *IAlgorithm) PriceScore(node *pkg.WeightedNode) float64

PriceScore provides a mock function with given fields: node

func (*IAlgorithm) ResourceScore

func (_m *IAlgorithm) ResourceScore(node *pkg.WeightedNode, pod *pkg.WeightedPod) float64

ResourceScore provides a mock function with given fields: node, pod

func (*IAlgorithm) StorageScore

func (_m *IAlgorithm) StorageScore(node *pkg.WeightedNode, pod *pkg.WeightedPod) float64

StorageScore provides a mock function with given fields: node, pod

func (*IAlgorithm) TotalScore

func (_m *IAlgorithm) TotalScore(node *pkg.WeightedNode, pod *pkg.WeightedPod) float64

TotalScore provides a mock function with given fields: node, pod

type ICacheService

type ICacheService struct {
	mock.Mock
}

ICacheService is an autogenerated mock type for the ICacheService type

func NewICacheService

func NewICacheService(t interface {
	mock.TestingT
	Cleanup(func())
}) *ICacheService

NewICacheService creates a new instance of ICacheService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*ICacheService) AddCacheItem

func (_m *ICacheService) AddCacheItem(key string, value interface{}, d time.Duration) error

AddCacheItem provides a mock function with given fields: key, value, d

func (*ICacheService) GetAllComputeConfigurations

func (_m *ICacheService) GetAllComputeConfigurations() ([]pkg.ComputeConfiguration, error)

GetAllComputeConfigurations provides a mock function with given fields:

func (*ICacheService) GetCacheItem

func (_m *ICacheService) GetCacheItem(key string) (interface{}, error)

GetCacheItem provides a mock function with given fields: key

func (*ICacheService) GetDurableComputeConfigurations

func (_m *ICacheService) GetDurableComputeConfigurations() ([]pkg.ComputeConfiguration, error)

GetDurableComputeConfigurations provides a mock function with given fields:

func (*ICacheService) GetEphemeralComputeConfigurations

func (_m *ICacheService) GetEphemeralComputeConfigurations() ([]pkg.ComputeConfiguration, error)

GetEphemeralComputeConfigurations provides a mock function with given fields:

func (*ICacheService) GetWeightedInteruptionRates

func (_m *ICacheService) GetWeightedInteruptionRates() ([]pkg.WeightedInteruptionRate, error)

GetWeightedInteruptionRates provides a mock function with given fields:

func (*ICacheService) GetWeightedLatencyRates

func (_m *ICacheService) GetWeightedLatencyRates() ([]pkg.WeightedLatencyRate, error)

GetWeightedLatencyRates provides a mock function with given fields:

func (*ICacheService) GetWeightedNodes

func (_m *ICacheService) GetWeightedNodes() ([]pkg.WeightedNode, error)

GetWeightedNodes provides a mock function with given fields:

type ICertificateService

type ICertificateService struct {
	mock.Mock
}

ICertificateService is an autogenerated mock type for the ICertificateService type

func NewICertificateService

func NewICertificateService(t interface {
	mock.TestingT
	Cleanup(func())
}) *ICertificateService

NewICertificateService creates a new instance of ICertificateService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*ICertificateService) ExportCACert

func (_m *ICertificateService) ExportCACert(caCert []byte, filePath string) error

ExportCACert provides a mock function with given fields: caCert, filePath

func (*ICertificateService) GenerateSelfSignedCert

func (_m *ICertificateService) GenerateSelfSignedCert(organization string, commonName string, dnsNames []string, ipAddresses []net.IP) (tls.Certificate, error)

GenerateSelfSignedCert provides a mock function with given fields: organization, commonName, dnsNames, ipAddresses

type IComputeService

type IComputeService struct {
	mock.Mock
}

IComputeService is an autogenerated mock type for the IComputeService type

func NewIComputeService

func NewIComputeService(t interface {
	mock.TestingT
	Cleanup(func())
}) *IComputeService

NewIComputeService creates a new instance of IComputeService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*IComputeService) CalculateWeightedNodeMedianPrice

func (_m *IComputeService) CalculateWeightedNodeMedianPrice(wNode *pkg.WeightedNode) (float64, error)

CalculateWeightedNodeMedianPrice provides a mock function with given fields: wNode

func (*IComputeService) ComputeConfigurationMatchesWeightedNodeRequirements

func (_m *IComputeService) ComputeConfigurationMatchesWeightedNodeRequirements(computeConfiguration *pkg.ComputeConfiguration, wNode *pkg.WeightedNode) bool

ComputeConfigurationMatchesWeightedNodeRequirements provides a mock function with given fields: computeConfiguration, wNode

func (*IComputeService) ComputeConfigurationMatchesWeightedPodRequirements

func (_m *IComputeService) ComputeConfigurationMatchesWeightedPodRequirements(computeConfiguration *pkg.ComputeConfiguration, wPod *pkg.WeightedPod) bool

ComputeConfigurationMatchesWeightedPodRequirements provides a mock function with given fields: computeConfiguration, wPod

func (*IComputeService) GetInteruptionRateForWeightedNode

func (_m *IComputeService) GetInteruptionRateForWeightedNode(wNode *pkg.WeightedNode) (*pkg.WeightedInteruptionRate, error)

GetInteruptionRateForWeightedNode provides a mock function with given fields: wNode

func (*IComputeService) GetLatencyRateForWeightedNode

func (_m *IComputeService) GetLatencyRateForWeightedNode(wNode *pkg.WeightedNode) (*pkg.WeightedLatencyRate, error)

GetLatencyRateForWeightedNode provides a mock function with given fields: wNode

func (*IComputeService) MatchPodSpec

func (_m *IComputeService) MatchPodSpec(pod *v1.Pod) (*pkg.WeightedNode, error)

MatchPodSpec provides a mock function with given fields: pod

func (*IComputeService) MatchWeightedNodeToComputeConfiguration

func (_m *IComputeService) MatchWeightedNodeToComputeConfiguration(wNode *pkg.WeightedNode) (*pkg.ComputeConfiguration, error)

MatchWeightedNodeToComputeConfiguration provides a mock function with given fields: wNode

func (*IComputeService) MatchWeightedPodToComputeConfiguration

func (_m *IComputeService) MatchWeightedPodToComputeConfiguration(wPod *pkg.WeightedPod) (*pkg.ComputeConfiguration, error)

MatchWeightedPodToComputeConfiguration provides a mock function with given fields: wPod

func (*IComputeService) MatchWeightedPodToWeightedNode

func (_m *IComputeService) MatchWeightedPodToWeightedNode(wPod *pkg.WeightedPod) (*pkg.WeightedNode, error)

MatchWeightedPodToWeightedNode provides a mock function with given fields: wPod

type ICoreClient added in v0.2.0

type ICoreClient struct {
	mock.Mock
}

ICoreClient is an autogenerated mock type for the ICoreClient type

func NewICoreClient added in v0.2.0

func NewICoreClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *ICoreClient

NewICoreClient creates a new instance of ICoreClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*ICoreClient) ListNamespaces added in v0.2.0

func (_m *ICoreClient) ListNamespaces(ctx context.Context, opts v1.ListOptions) (*corev1.NamespaceList, error)

ListNamespaces provides a mock function with given fields: ctx, opts

func (*ICoreClient) ListNodes added in v0.2.0

func (_m *ICoreClient) ListNodes(ctx context.Context, opts v1.ListOptions) (*corev1.NodeList, error)

ListNodes provides a mock function with given fields: ctx, opts

type IMapper

type IMapper struct {
	mock.Mock
}

IMapper is an autogenerated mock type for the IMapper type

func NewIMapper

func NewIMapper(t interface {
	mock.TestingT
	Cleanup(func())
}) *IMapper

NewIMapper creates a new instance of IMapper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*IMapper) MapNodeToWeightedNode

func (_m *IMapper) MapNodeToWeightedNode(node *v1.Node) (pkg.WeightedNode, error)

MapNodeToWeightedNode provides a mock function with given fields: node

func (*IMapper) MapPodToWeightedPod

func (_m *IMapper) MapPodToWeightedPod(pod *v1.Pod) (pkg.WeightedPod, error)

MapPodToWeightedPod provides a mock function with given fields: pod

type IMetricsClient added in v0.2.0

type IMetricsClient struct {
	mock.Mock
}

IMetricsClient is an autogenerated mock type for the IMetricsClient type

func NewIMetricsClient added in v0.2.0

func NewIMetricsClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *IMetricsClient

NewIMetricsClient creates a new instance of IMetricsClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*IMetricsClient) ListNodeMetrics added in v0.2.0

func (_m *IMetricsClient) ListNodeMetrics(ctx context.Context, opts v1.ListOptions) (*pkg.MetricsNodeList, error)

ListNodeMetrics provides a mock function with given fields: ctx, opts

func (*IMetricsClient) ListPodMetrics added in v0.2.0

func (_m *IMetricsClient) ListPodMetrics(ctx context.Context, namespace string, opts v1.ListOptions) (*pkg.MetricsPodList, error)

ListPodMetrics provides a mock function with given fields: ctx, namespace, opts

Jump to

Keyboard shortcuts

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