legacy

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Probe

type Probe struct{}

legacy.Probe is an implementation of the probes.Probe interface that aims to mimic the functionality of the verifier's egress check pre-experimental-probe (i.e., v0.4.10) as closely as possible ("bug- for-bug"). This means launching a custom "validator binary" inside of a "validator container image" inside of a "golden AMI." The list of URLs checked by this validator binary is baked into the image and cannot be changed at runtime. This probe only supports X86 on AWS.

func (Probe) GetEndingToken

func (lgp Probe) GetEndingToken() string

GetEndingToken returns the string token used to signal the end of the probe's output

func (Probe) GetExpandedUserData

func (lgp Probe) GetExpandedUserData(userDataVariables map[string]string) (string, error)

GetExpandedUserData returns a YAML-formatted userdata string filled-in ("expanded") with the values provided in userDataVariables according to os.Expand(). E.g., if the userdata template contains "name: $FOO" and userDataVariables = {"FOO": "bar"}, the returned string will contain "name: bar". Errors will be returned if values aren't provided for required variables listed in the template's "network-verifier-required-variables" directive, or if values *are* provided for variables that must be set to a certain value for the probe to function correctly (presetUserDataVariables) -- this function will fill-in those values for you.

func (Probe) GetMachineImageID

func (lgp Probe) GetMachineImageID(platformType cloud.Platform, cpuArch cpu.Architecture, region string) (string, error)

GetMachineImageID returns the string ID of the VM image to be used for the probe instance

func (Probe) GetStartingToken

func (lgp Probe) GetStartingToken() string

GetStartingToken returns the string token used to signal the beginning of the probe's output

func (Probe) ParseProbeOutput

func (lgp Probe) ParseProbeOutput(ensurePrivate bool, probeOutput string, outputDestination *output.Output)

ParseProbeOutput accepts a string containing all probe output that appeared between the startingToken and the endingToken and a pointer to an Output object. outputDestination will be filled with the results from the egress check

Jump to

Keyboard shortcuts

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