types

package
v2.12.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DebugConfig is the name of the podspec annotation that records debugging configuration information.
	// The annotation should be a JSON-encoded map of container-name to a `ContainerDebugConfiguration` object.
	DebugConfig = "debug.cloud.google.com/config"

	// DebugProbesAnnotation is the name of the podspec annotation that disables rewriting of probe timeouts.
	// The annotation value should be `skip`.
	DebugProbeTimeouts = "debug.cloud.google.com/probe/timeouts"
)

Variables

View Source
var Runtimes = struct {
	Go      Runtime
	NodeJS  Runtime
	JVM     Runtime
	Python  Runtime
	NetCore Runtime
	Unknown Runtime
}{
	Go:      "go",
	NodeJS:  "nodejs",
	JVM:     "jvm",
	Python:  "python",
	NetCore: "netcore",
	Unknown: "unknown",
}

Functions

This section is empty.

Types

type ContainerAdapter

type ContainerAdapter interface {
	GetContainer() *ExecutableContainer
	Apply()
}

ContainerAdapter provides a surface to abstract away the underlying container representation which can be operated on by the debug transformers.

type ContainerDebugConfiguration

type ContainerDebugConfiguration struct {
	// Artifact is the corresponding artifact's image name used in the skaffold.yaml
	Artifact string `json:"artifact,omitempty"`
	// Runtime represents the underlying language runtime (`go`, `jvm`, `nodejs`, `python`, `netcore`)
	Runtime string `json:"runtime,omitempty"`
	// WorkingDir is the working directory in the image configuration; may be empty
	WorkingDir string `json:"workingDir,omitempty"`
	// Ports is the list of debugging ports, keyed by protocol type
	Ports map[string]uint32 `json:"ports,omitempty"`
}

ContainerDebugConfiguration captures debugging information for a specific container. This structure is serialized out and included in the pod metadata.

type ContainerEnv

type ContainerEnv struct {
	Order []string
	Env   map[string]string
}

type ContainerPort

type ContainerPort struct {
	Name          string
	HostPort      int32
	ContainerPort int32
	Protocol      string
	HostIP        string
}

adapted from github.com/kubernetes/api/core/v1/types.go

type ExecutableContainer

type ExecutableContainer struct {
	Name    string
	Command []string
	Args    []string
	Env     ContainerEnv
	Ports   []ContainerPort
}

ExecutableContainer holds shared fields between container representations. These fields are mutated by the debug transformers, and are eventually propagated back to the underlying container representation in the adapter.

type Runtime

type Runtime string

Runtime specifies the target language runtime for this artifact that is used to configure debug support

func ToRuntime

func ToRuntime(r string) Runtime

Jump to

Keyboard shortcuts

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