framework

package
v0.0.0-...-418396d Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PortPrometheusServer           = 9090
	NamePrometheusServer           = "prometheus-server"
	NameGrafana                    = "grafana"
	KindDeployment       PatchKind = "deployment"
	KindService          PatchKind = "service"
)

Variables

View Source
var ErrNoResults = errors.New("no results found for the query")

Functions

func ApplyJSONPatch

func ApplyJSONPatch(cluster framework.Cluster, namespace string, kind PatchKind, name string, operations []json.RawMessage) error

func EnablePrometheusAdminAPIPatch

func EnablePrometheusAdminAPIPatch() []json.RawMessage

func GetApiServerEndpoint

func GetApiServerEndpoint(cluster *framework.K8sCluster, ns, app string, port int) (string, error)

func GrafanaDeploymentPatch

func GrafanaDeploymentPatch() []json.RawMessage

func GrafanaServicePatch

func GrafanaServicePatch() []json.RawMessage

func InstallPrometheusPushgateway

func InstallPrometheusPushgateway(cluster *framework.K8sCluster, ns string) error

func PushReportSpecMetric

func PushReportSpecMetric(cluster *framework.K8sCluster, ns string, value float64) error

func SavePrometheusSnapshot

func SavePrometheusSnapshot(cluster framework.Cluster, namespace string, hostPath string) error

SavePrometheusSnapshot triggers tsdb snapshot and copies it from kube container to hostPath

func SetPrometheusResourcesPatch

func SetPrometheusResourcesPatch() []json.RawMessage

func WatchXdsDeliveryCount

func WatchXdsDeliveryCount(
	ctx context.Context,
	promClient *PromClient,
	stopCh <-chan struct{},
	metricCh chan<- int,
	errCh chan<- error,
)

func XdsAckRequestsReceived

func XdsAckRequestsReceived(ctx context.Context, promClient *PromClient) (int, error)

func XdsDeliveryCount

func XdsDeliveryCount(ctx context.Context, promClient *PromClient) (int, error)

Types

type PatchKind

type PatchKind string

type Patcher

type Patcher func(kind PatchKind, name string, operations ...[]json.RawMessage) error

func NewPatcher

func NewPatcher(cluster framework.Cluster, namespace string, baseOperations ...[]json.RawMessage) Patcher

type PromClient

type PromClient struct {
	// contains filtered or unexported fields
}

func NewPromClient

func NewPromClient(cluster *framework.K8sCluster, ns string) (*PromClient, error)

func (*PromClient) QueryIntValue

func (p *PromClient) QueryIntValue(ctx context.Context, query string) (int, error)

type SpecReport

type SpecReport struct {
	Parameters       map[string]string `json:"parameters"`
	SuitePath        string            `json:"suitePath"`
	SuiteDescription string            `json:"suiteDescription"`
	State            string            `json:"state"`
	Description      string            `json:"description"`
	ReportEntries    map[string]string `json:"reportEntries"`
}

func MakeSpecReports

func MakeSpecReports(ginkgoReport ginkgo.Report) []SpecReport

Directories

Path Synopsis
nolint:all // code here is extracted and revised from github.com/gruntwork-io/terratest, this package should be removed once https://github.com/gruntwork-io/terratest/pull/1384 is merged
nolint:all // code here is extracted and revised from github.com/gruntwork-io/terratest, this package should be removed once https://github.com/gruntwork-io/terratest/pull/1384 is merged

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳