executor

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxDataSize specifies max size of data which could be processed by kubediag.
	// It is the message size limitation in grpc: https://github.com/grpc/grpc-go/blob/v1.30.0/clientconn.go#L95.
	MaxDataSize = 1024 * 1024 * 2

	// DiagnosisUIDTelemetryKey is the telemetry key of diagnosis object uid.
	DiagnosisUIDTelemetryKey = "diagnosis.uid"
	// DiagnosisNamespaceTelemetryKey is the telemetry key of diagnosis namespace.
	DiagnosisNamespaceTelemetryKey = "diagnosis.namespace"
	// DiagnosisNameTelemetryKey is the telemetry key of diagnosis name.
	DiagnosisNameTelemetryKey = "diagnosis.name"
	// PodNamespaceTelemetryKey is the telemetry key of pod namespace.
	PodNamespaceTelemetryKey = "pod.namespace"
	// PodNameTelemetryKey is the telemetry key of pod name.
	PodNameTelemetryKey = "pod.name"
	// ContainerTelemetryKey is the telemetry key of container.
	ContainerTelemetryKey = "container"
	// NodeTelemetryKey is the telemetry key of node.
	NodeTelemetryKey = "node"
)

Variables

View Source
var DiagnosisBackoff = wait.Backoff{
	Steps:    4,
	Duration: 30 * time.Second,
	Factor:   2.0,
	Jitter:   0.1,
}

DiagnosisBackoff is the recommended backoff for a failure when syncing diagnosis.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	// Context carries values across API boundaries.
	context.Context
	// Logger represents the ability to log messages.
	logr.Logger
	// Run runs the Executor.
	Run(<-chan struct{})
}

Executor changes the state of a diagnosis by executing operations.

func NewExecutor

func NewExecutor(
	ctx context.Context,
	logger logr.Logger,
	cli client.Client,
	eventRecorder record.EventRecorder,
	scheme *runtime.Scheme,
	cache cache.Cache,
	nodeName string,
	bindAddress string,
	port int,
	dataRoot string,
	executorCh chan diagnosisv1.Diagnosis,
) Executor

NewExecutor creates a new executor.

Jump to

Keyboard shortcuts

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