utils

package
v0.0.0-...-e73efaa Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddK8SProbeProperties

func AddK8SProbeProperties(newProbe *dbSchemaProbe.Probe, request model.ProbeRequest) *dbSchemaProbe.Probe

func AddKubernetesCMDProbeProperties

func AddKubernetesCMDProbeProperties(newProbe *dbSchemaProbe.Probe, request model.ProbeRequest) *dbSchemaProbe.Probe

func AddKubernetesHTTPProbeProperties

func AddKubernetesHTTPProbeProperties(newProbe *dbSchemaProbe.Probe, request model.ProbeRequest) *dbSchemaProbe.Probe

func AddPROMProbeProperties

func AddPROMProbeProperties(newProbe *dbSchemaProbe.Probe, request model.ProbeRequest) *dbSchemaProbe.Probe

func GenerateCronExperimentManifestWithProbes

func GenerateCronExperimentManifestWithProbes(manifest string, projectID string) (argoTypes.CronWorkflow, error)

GenerateCronExperimentManifestWithProbes - uses GenerateProbeManifest to get and store the respective probe attribute into Raw Data template

func GenerateExperimentManifestWithProbes

func GenerateExperimentManifestWithProbes(manifest string, projectID string) (argoTypes.Workflow, error)

GenerateExperimentManifestWithProbes - uses GenerateProbeManifest to get and store the respective probe attribute into Raw Data template for Non Cron Workflow

func GenerateProbeManifest

func GenerateProbeManifest(probe *model.Probe, mode model.Mode) (string, error)

GenerateProbeManifest - Generates the types and returns a marshalled probe attribute configuration

func InsertProbeRefAnnotation

func InsertProbeRefAnnotation(rawYaml, value string) (string, error)

func ParseProbesFromManifest

func ParseProbesFromManifest(wfType *dbChaosExperiment.ChaosExperimentType, manifest string) ([]dbChaosExperiment.Probes, error)

ParseProbesFromManifest - Parses the manifest to return probes which is stored in the DB

func ParseProbesFromManifestForRuns

func ParseProbesFromManifestForRuns(wfType *dbChaosExperiment.ChaosExperimentType, manifest string) ([]dbChaosExperimentRun.Probes, error)

ParseProbesFromManifestForRuns - Parses the manifest to return probes which is stored in the DB

func ProbeInputsToProbeRequestConverter

func ProbeInputsToProbeRequestConverter(probeInputs v1alpha1.ProbeAttributes) (model.ProbeRequest, error)

ProbeInputsToProbeRequestConverter Convert the probe inputs to probe request

Types

type CMDProbeAttributes

type CMDProbeAttributes struct {
	// Name of probe
	Name string `json:"name,omitempty"`
	// Type of probe
	Type string `json:"type,omitempty"`
	// inputs needed for the cmd probe
	CmdProbeInputs v1alpha1.CmdProbeInputs `json:"cmdProbe/inputs,omitempty"`
	// RunProperty contains timeout, retry and interval for the probe
	RunProperties v1alpha1.RunProperty `json:"runProperties,omitempty"`
	// mode for k8s probe
	// it can be SOT, EOT, Edge
	Mode string `json:"mode,omitempty"`
	// ResponseTimeout Flag to hold the flag to response timeout for the cmdProbe
	ResponseTimeout int `json:"responseTimeout,omitempty"`
}

type HTTPMethod

type HTTPMethod struct {
	Get  *v1alpha1.GetMethod  `json:"get,omitempty"`
	Post *v1alpha1.PostMethod `json:"post,omitempty"`
}

HTTPMethod define the http method details

type HTTPProbeAttributes

type HTTPProbeAttributes struct {
	// Name of probe
	Name string `json:"name,omitempty"`
	// Type of probe
	Type string `json:"type,omitempty"`
	// inputs needed for the http probe
	HTTPProbeInputs v1alpha1.HTTPProbeInputs `json:"httpProbe/inputs,omitempty"`
	// RunProperty contains timeout, retry and interval for the probe
	RunProperties v1alpha1.RunProperty `json:"runProperties,omitempty"`
	// mode for k8s probe
	// it can be SOT, EOT, Edge
	Mode string `json:"mode,omitempty"`
}

type K8SProbeAttributes

type K8SProbeAttributes struct {
	// Name of probe
	Name string `json:"name,omitempty"`
	// Type of probe
	Type string `json:"type,omitempty"`
	// inputs needed for the k8s probe
	K8sProbeInputs v1alpha1.K8sProbeInputs `json:"k8sProbe/inputs,omitempty"`
	// RunProperty contains timeout, retry and interval for the probe
	RunProperties v1alpha1.RunProperty `json:"runProperties,omitempty"`
	// mode for k8s probe
	// it can be SOT, EOT, Edge
	Mode string `json:"mode,omitempty"`
}

type PROMProbeAttributes

type PROMProbeAttributes struct {
	// Name of probe
	Name string `json:"name,omitempty"`
	// Type of probe
	Type string `json:"type,omitempty"`
	// inputs needed for the prometheus probe
	PromProbeInputs v1alpha1.PromProbeInputs `json:"promProbe/inputs,omitempty"`
	// RunProperty contains timeout, retry and interval for the probe
	RunProperties v1alpha1.RunProperty `json:"runProperties,omitempty"`
	// mode for k8s probe
	// it can be SOT, EOT, Edge
	Mode string `json:"mode,omitempty"`
}

type ProbeWithVerdict

type ProbeWithVerdict struct {
	Name    string             `json:"name"`
	Verdict model.ProbeVerdict `json:"verdict"`
}

Jump to

Keyboard shortcuts

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