Documentation ¶
Index ¶
- func BuildTestContainer(containerName, cpu, mem string) apiv1.Container
- func BuildTestPod(name, containerName, cpu, mem string, creator runtime.Object) *apiv1.Pod
- func BuildTestPolicy(containerName, minCpu, maxCpu, minMemory, maxMemory string) *apimock.ResourcesPolicy
- func BuildTestVerticalPodAutoscaler(containerName, minCpu, maxCpu, minMemory, maxMemory string, selector string) *apimock.VerticalPodAutoscaler
- func Recommendation(containerName, cpu, mem string) *apimock.Recommendation
- func RefJSON(o runtime.Object) string
- type PodListerMock
- type PodsEvictionRestrictionMock
- type RecommenderAPIMock
- type RecommenderMock
- type VerticalPodAutoscalerListerMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTestContainer ¶
BuildTestContainer creates container with specified resources
func BuildTestPod ¶
BuildTestPod creates a pod with specified resources.
func BuildTestPolicy ¶
func BuildTestPolicy(containerName, minCpu, maxCpu, minMemory, maxMemory string) *apimock.ResourcesPolicy
BuildTestPolicy creates ResourcesPolicy with specified constraints
func BuildTestVerticalPodAutoscaler ¶
func BuildTestVerticalPodAutoscaler(containerName, minCpu, maxCpu, minMemory, maxMemory string, selector string) *apimock.VerticalPodAutoscaler
BuildTestVerticalPodAutoscaler creates VerticalPodAutoscaler withs specified policy constraints
func Recommendation ¶
func Recommendation(containerName, cpu, mem string) *apimock.Recommendation
Recommendation creates Recommendation with specified container name and resources
Types ¶
type PodListerMock ¶
PodListerMock is a mock of PodLister
func (*PodListerMock) Pods ¶
func (m *PodListerMock) Pods(namespace string) v1.PodNamespaceLister
Pods is a mock implementation of PodLister.Pods
type PodsEvictionRestrictionMock ¶
PodsEvictionRestrictionMock is a mock of PodsEvictionRestriction
type RecommenderAPIMock ¶
RecommenderAPIMock is a mock of RecommenderAPI
func (*RecommenderAPIMock) GetRecommendation ¶
func (m *RecommenderAPIMock) GetRecommendation(spec *apiv1.PodSpec) (*apimock.Recommendation, error)
GetRecommendation is mock implementation of RecommenderAPI.GetRecommendation
type RecommenderMock ¶
RecommenderMock is a mock of Recommender
func (*RecommenderMock) Get ¶
func (m *RecommenderMock) Get(spec *apiv1.PodSpec) (*apimock.Recommendation, error)
Get is a mock implementation of Recommender.Get
type VerticalPodAutoscalerListerMock ¶
VerticalPodAutoscalerListerMock is a mock of VerticalPodAutoscalerLister
func (*VerticalPodAutoscalerListerMock) List ¶
func (m *VerticalPodAutoscalerListerMock) List() (ret []*apimock.VerticalPodAutoscaler, err error)
List is a mock implementation of VerticalPodAutoscalerLister.List