testutils

package
v0.0.0-...-5292f58 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const Agent1StatusPB = `` /* 247-byte string literal not displayed */

Agent1StatusPB is a protobuf for an agent status.

View Source
const Agent2StatusPB = `` /* 250-byte string literal not displayed */

Agent2StatusPB is the protobuf for another agent status.

View Source
const DeploymentPb = `` /* 1617-byte string literal not displayed */

DeploymentPb is a protobuf for a Deployment object

View Source
const EndpointsPb = `` /* 845-byte string literal not displayed */

EndpointsPb is the protobuf for an endpoints object.

View Source
const NamespacePb = `` /* 156-byte string literal not displayed */

NamespacePb is the protobuf for a generic namespace object.

View Source
const NodePb = `
metadata {
  name: "a_node"
  uid: "ijkl"
  resource_version: "1",
  creation_timestamp_ns: 4
  deletion_timestamp_ns: 6
}
`

NodePb is the protobuf for a generic node object.

View Source
const PendingPodPb = `` /* 613-byte string literal not displayed */

PendingPodPb is a protobuf for a pending pod.

View Source
const PodPb = `` /* 365-byte string literal not displayed */

PodPb is the protobuf for a pod object.

View Source
const PodPbWithContainers = `` /* 736-byte string literal not displayed */

PodPbWithContainers is a protobuf for a pod object that has containers.

View Source
const ReplicaSetPb = `` /* 1261-byte string literal not displayed */

ReplicaSetPb is a protobuf for a replicaset object

View Source
const ServicePb = `` /* 580-byte string literal not displayed */

ServicePb is the protobuf for a service object.

View Source
const TDLabelSelectorPb = `` /* 350-byte string literal not displayed */

TDLabelSelectorPb is a protobuf for a TracepointDeployment object with a LabelSelector.

View Source
const TDPodProcessPb = `` /* 331-byte string literal not displayed */

TDPodProcessPb is a protobuf for a TracepointDeployment object with a PodProcess.

View Source
const TerminatedPodPb = `` /* 613-byte string literal not displayed */

TerminatedPodPb is a protobuf for a terminated pod.

Variables

View Source
var ContainerInfoPB = `
name: "container_1"
uid: "container1"
pod_uid: "ijkl"
namespace: "ns"
`

ContainerInfoPB is the protobuf for a container info.

View Source
var ExistingAgentInfo = `` /* 295-byte string literal not displayed */

ExistingAgentInfo is the agent info for the healthy agent that already exists.

View Source
var ExistingAgentUUID = "7ba7b810-9dad-11d1-80b4-00c04fd430c8"

ExistingAgentUUID is the UUID of an agent that already exists and is healthy.

View Source
var HeartbeatAckPB = `
heartbeat_ack {
  update_info {
    service_cidr: "10.64.4.0/22"
    pod_cidrs: "10.64.4.0/21"
  }
}
`

HeartbeatAckPB is a protobuf for a heartbeat ack.

View Source
var HeartbeatPB = `` /* 177-byte string literal not displayed */

HeartbeatPB is the protobuf for a heartbeat.

View Source
var InvalidRegisterAgentRequestPB = `` /* 139-byte string literal not displayed */

InvalidRegisterAgentRequestPB is an invalid protobuf of a register agent request.

View Source
var KelvinAgentUUID = "9ba7b810-9dad-11d1-80b4-00c04fd430c8"

KelvinAgentUUID is the UUID of a Kelvin agent.

View Source
var NewAgentUUID = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"

NewAgentUUID is the UUID of the agent that doesn't yet exist.

View Source
var Process1PB = `
name: 'p1'
upid {
  low: 89101
  high: 528280977975
}
cid: "container_1"
`

Process1PB is the protobuf for a process.

View Source
var Process2PB = `
name: 'p2'
upid {
  low: 246
  high: 528280977975
}
cid: "container_2"
`

Process2PB is the protobuf for another process.

View Source
var ProcessCreated1PB = `
upid {
  low: 89101
  high: 528280977975
}
start_timestamp_ns: 4
cmdline: "./bin/bash"
cid: "container_1"
`

ProcessCreated1PB is the protobuf for a created process.

View Source
var ProcessCreated2PB = `
upid {
  low: 468
  high: 528280977975
}
start_timestamp_ns: 4
cmdline: "test"
cid: "container_2"
`

ProcessCreated2PB is the protobuf for another created process.

View Source
var ProcessInfo1PB = `
upid {
  low: 89101
  high: 528280977975
}
start_timestamp_ns: 4
process_args: "./bin/bash"
cid: "container_1"
`

ProcessInfo1PB is the process info for the first created process.

View Source
var ProcessInfo2PB = `
upid {
  low: 468
  high: 528280977975
}
start_timestamp_ns: 4
process_args: "test"
cid: "container_2"
`

ProcessInfo2PB is the process info for the second created process.

View Source
var ProcessTerminated1PB = `
upid {
  low: 89101
  high: 528280977975
}
stop_timestamp_ns: 6
`

ProcessTerminated1PB is the protobuf for a terminated process.

View Source
var ProcessTerminated2PB = `
upid {
  low:  468
  high: 528280977975
}
stop_timestamp_ns: 10
`

ProcessTerminated2PB is a protobuf for another terminated process.

View Source
var PurgedAgentInfo = `` /* 305-byte string literal not displayed */

PurgedAgentInfo is the agent info for an agent that exists but timed out of agent manager. This agent will try to reregister.

View Source
var PurgedAgentUUID = "4ba7b810-9dad-11d1-80b4-00c04fd430c8"

PurgedAgentUUID is the UUID of an agent that already exists but was purged from ADS.

View Source
var RegisterAgentRequestPB = `` /* 210-byte string literal not displayed */

RegisterAgentRequestPB is the protobuf for a register agent request.

View Source
var RegisterKelvinRequestPB = `` /* 262-byte string literal not displayed */

RegisterKelvinRequestPB is the protobuf for a register agent request.

View Source
var ReregisterPurgedAgentRequestPB = `` /* 220-byte string literal not displayed */

ReregisterPurgedAgentRequestPB is the protobuf for a reregister agent request.

View Source
var SchemaInfo2PB = `` /* 153-byte string literal not displayed */

SchemaInfo2PB is the protobuf for another schema info.

View Source
var SchemaInfo3PB = `` /* 153-byte string literal not displayed */

SchemaInfo3PB is the protobuf for another schema info.

View Source
var SchemaInfoPB = `` /* 153-byte string literal not displayed */

SchemaInfoPB is the protobuf for a schema info.

View Source
var SchemaInfoWithSemanticTypePB = `` /* 175-byte string literal not displayed */

SchemaInfoWithSemanticTypePB is the protobuf for a schema info with semantic type.

View Source
var UnhealthyAgentInfo = `` /* 259-byte string literal not displayed */

UnhealthyAgentInfo is the agent info for the unhealthy agent.

View Source
var UnhealthyAgentUUID = "8ba7b810-9dad-11d1-80b4-00c04fd430c8"

UnhealthyAgentUUID is the UUID of an agent that exists but is unhealthy.

View Source
var UnhealthyKelvinAgentInfo = `` /* 253-byte string literal not displayed */

UnhealthyKelvinAgentInfo is the agent info for the unhealthy kelvin.

View Source
var UnhealthyKelvinAgentUUID = "5ba7b810-9dad-11d1-80b4-00c04fd430c8"

UnhealthyKelvinAgentUUID is the UUID of an unhealthy Kelvin agent.

Functions

This section is empty.

Types

type InMemoryPodLabelStore

type InMemoryPodLabelStore struct {
	Store map[string]string
}

InMemoryPodLabelStore implements the PodLabelStore interface for testing.

func (*InMemoryPodLabelStore) DeletePodLabels

func (s *InMemoryPodLabelStore) DeletePodLabels(namespace string, podName string) error

DeletePodLabels deletes the labels information associated with a pod.

func (*InMemoryPodLabelStore) FetchPodsWithLabelKey

func (s *InMemoryPodLabelStore) FetchPodsWithLabelKey(namespace string, key string) ([]string, error)

FetchPodsWithLabelKey gets the names of all the pods that has a certain label key.

func (*InMemoryPodLabelStore) FetchPodsWithLabels

func (s *InMemoryPodLabelStore) FetchPodsWithLabels(namespace string, labels map[string]string) ([]string, error)

FetchPodsWithLabels gets the names of all the pods whose labels match exactly all the labels provided.

func (*InMemoryPodLabelStore) GetWithPrefix

func (s *InMemoryPodLabelStore) GetWithPrefix(prefix string) ([]string, [][]byte, error)

GetWithPrefix gets all keys and values with the given prefix, for debugging purposes.

func (*InMemoryPodLabelStore) SetPodLabels

func (s *InMemoryPodLabelStore) SetPodLabels(namespace string, podName string, labels map[string]string) error

SetPodLabels stores the pod labels information.

Jump to

Keyboard shortcuts

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