Documentation ¶
Index ¶
- Constants
- func CleanDnsName(name string) string
- func GetKubernetesClient(kubernetesConfig string) (client.Client, error)
- func GetKubernetesConfig(kubernetesConfig string) (*rest.Config, error)
- func GetNodeName(pod *corev1.Pod) string
- func GetSelectedSources(cli client.Client, namespace string, selector labels.Selector) ([]*bitflowv1.BitflowSource, error)
- func GetSelectedSteps(cli client.Client, namespace string, selector labels.Selector) ([]*bitflowv1.BitflowStep, error)
- func GetSource(cli client.Client, source, namespace string) (*bitflowv1.BitflowSource, error)
- func GetSources(cli client.Client, namespace string) ([]*bitflowv1.BitflowSource, error)
- func GetStep(cli client.Client, step, namespace string) (*bitflowv1.BitflowStep, error)
- func GetSteps(cli client.Client, namespace string) ([]*bitflowv1.BitflowStep, error)
- func HashName(prefix string, hashInputStrings ...string) string
- func IsBeingDeleted(pod *corev1.Pod) bool
- func IsNodeReady(node *corev1.Node) bool
- func RequestAllPodsOnNode(cli client.Client, nodeName, namespace string, podLabels map[string]string) ([]*corev1.Pod, error)
- func RequestNode(cli client.Client, nodeName string) (*corev1.Node, error)
- func RequestNodes(cli client.Client) (*corev1.NodeList, error)
- func RequestPod(cli client.Client, podName, namespace string) (*corev1.Pod, error)
- func RequestPods(cli client.Client, namespace string) ([]*corev1.Pod, error)
- func RequestReadyNode(cli client.Client, nodeName string) (*corev1.Node, error)
- func RequestReadyNodes(cli client.Client) (*corev1.NodeList, error)
- func RequestSelectedPods(cli client.Client, namespace string, selector labels.Selector) ([]*corev1.Pod, error)
- func UnpackPodList(list *corev1.PodList, err error) ([]*corev1.Pod, error)
- type AbstractTestSuite
- func (suite *AbstractTestSuite) AddStepIngest(step *bitflowv1.BitflowStep, matches ...string)
- func (suite *AbstractTestSuite) AddStepOutput(step *bitflowv1.BitflowStep, name string, labels map[string]string)
- func (suite *AbstractTestSuite) ConfigMap(name string) *corev1.ConfigMap
- func (suite *AbstractTestSuite) MakeFakeClient(objects ...runtime.Object) client.Client
- func (suite *AbstractTestSuite) Node(name string) *corev1.Node
- func (suite *AbstractTestSuite) Node2(name string, labels, annotations map[string]string) *corev1.Node
- func (suite *AbstractTestSuite) Pod(name string) *corev1.Pod
- func (suite *AbstractTestSuite) PodLabels(name string, labels map[string]string) *corev1.Pod
- func (suite *AbstractTestSuite) Source(name string, labels map[string]string) *bitflowv1.BitflowSource
- func (suite *AbstractTestSuite) Step(name string, stepType string, ingestMatches ...string) *bitflowv1.BitflowStep
- func (suite *AbstractTestSuite) StepWithOutput(name string, stepType string, outputName string, ...) *bitflowv1.BitflowStep
- type ResourceWrapper
- type RespawningPods
- func (respawning *RespawningPods) Add(pod *corev1.Pod)
- func (respawning *RespawningPods) CountRestarting(pods []*corev1.Pod, currentPod, currentNode string) int
- func (respawning *RespawningPods) Debug()
- func (respawning *RespawningPods) Delete(name string)
- func (respawning *RespawningPods) DeletePodsWithLabel(labelKey string, labelValue string)
- func (respawning *RespawningPods) DeletePodsWithLabelExcept(labelKey string, labelValue string, valid []string)
- func (respawning *RespawningPods) IsPodRestarting(name string) (RespawningStatus, bool)
- func (respawning *RespawningPods) IsPodRestartingOnNode(podName, nodeName string) (RespawningStatus, bool)
- func (respawning *RespawningPods) ListPods() []string
- func (respawning *RespawningPods) Size() int
- type RespawningStatus
Constants ¶
View Source
const ( TestNamespace = "default" TestNodeCpu = int64(2000) TestNodeMem = int64(4 * 1024 * 1024) TestNodeBufferInitSize = 4 TestNodeBufferFactor = 2.0 TestNodeResourceLimit = 0.1 )
View Source
const (
HashSuffixLength = 8
)
Variables ¶
This section is empty.
Functions ¶
func CleanDnsName ¶
func GetNodeName ¶
func GetSelectedSources ¶
func GetSelectedSteps ¶
func GetSources ¶
func IsBeingDeleted ¶
func IsNodeReady ¶ added in v0.0.2
func RequestAllPodsOnNode ¶
func RequestPod ¶
func RequestReadyNode ¶ added in v0.0.2
func RequestReadyNodes ¶ added in v0.0.2
func RequestSelectedPods ¶
Types ¶
type AbstractTestSuite ¶
type AbstractTestSuite struct {
golib.AbstractTestSuite
}
func (*AbstractTestSuite) AddStepIngest ¶
func (suite *AbstractTestSuite) AddStepIngest(step *bitflowv1.BitflowStep, matches ...string)
func (*AbstractTestSuite) AddStepOutput ¶
func (suite *AbstractTestSuite) AddStepOutput(step *bitflowv1.BitflowStep, name string, labels map[string]string)
func (*AbstractTestSuite) ConfigMap ¶
func (suite *AbstractTestSuite) ConfigMap(name string) *corev1.ConfigMap
func (*AbstractTestSuite) MakeFakeClient ¶
func (suite *AbstractTestSuite) MakeFakeClient(objects ...runtime.Object) client.Client
func (*AbstractTestSuite) Source ¶
func (suite *AbstractTestSuite) Source(name string, labels map[string]string) *bitflowv1.BitflowSource
func (*AbstractTestSuite) Step ¶
func (suite *AbstractTestSuite) Step(name string, stepType string, ingestMatches ...string) *bitflowv1.BitflowStep
func (*AbstractTestSuite) StepWithOutput ¶
func (suite *AbstractTestSuite) StepWithOutput(name string, stepType string, outputName string, outputLabels map[string]string, ingestMatches ...string) *bitflowv1.BitflowStep
type ResourceWrapper ¶
type ResourceWrapper struct { TotalCpuLimit resource.Quantity TotalMemoryLimit resource.Quantity TotalCpuRequest resource.Quantity TotalMemoryRequest resource.Quantity }
func RequestPodResources ¶
func RequestPodResources(cli client.Client, podName, namespace string) (ResourceWrapper, error)
func (*ResourceWrapper) AddLimits ¶
func (wrapper *ResourceWrapper) AddLimits(resourceLimits corev1.ResourceList)
func (*ResourceWrapper) AddPod ¶
func (wrapper *ResourceWrapper) AddPod(pod *corev1.Pod)
func (*ResourceWrapper) AddRequests ¶
func (wrapper *ResourceWrapper) AddRequests(resourceRequests corev1.ResourceList)
func (*ResourceWrapper) AddResources ¶
func (wrapper *ResourceWrapper) AddResources(resources ResourceWrapper)
type RespawningPods ¶
func NewRespawningPods ¶
func NewRespawningPods() *RespawningPods
func (*RespawningPods) Add ¶
func (respawning *RespawningPods) Add(pod *corev1.Pod)
func (*RespawningPods) CountRestarting ¶
func (respawning *RespawningPods) CountRestarting(pods []*corev1.Pod, currentPod, currentNode string) int
func (*RespawningPods) Debug ¶
func (respawning *RespawningPods) Debug()
func (*RespawningPods) Delete ¶
func (respawning *RespawningPods) Delete(name string)
func (*RespawningPods) DeletePodsWithLabel ¶
func (respawning *RespawningPods) DeletePodsWithLabel(labelKey string, labelValue string)
func (*RespawningPods) DeletePodsWithLabelExcept ¶
func (respawning *RespawningPods) DeletePodsWithLabelExcept(labelKey string, labelValue string, valid []string)
func (*RespawningPods) IsPodRestarting ¶
func (respawning *RespawningPods) IsPodRestarting(name string) (RespawningStatus, bool)
func (*RespawningPods) IsPodRestartingOnNode ¶
func (respawning *RespawningPods) IsPodRestartingOnNode(podName, nodeName string) (RespawningStatus, bool)
func (*RespawningPods) ListPods ¶
func (respawning *RespawningPods) ListPods() []string
func (*RespawningPods) Size ¶
func (respawning *RespawningPods) Size() int
type RespawningStatus ¶
func (RespawningStatus) CountContainer ¶
func (spec RespawningStatus) CountContainer() int
Click to show internal directories.
Click to hide internal directories.