runtime

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: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParameterKeyCoreFileProfilerExpirationSeconds = "param.diagnoser.runtime.core_file_profiler.expiration_seconds"
	ParameterKeyCoreFileProfilerPid               = "param.diagnoser.runtime.core_file_profiler.pid"
	ParameterKeyCoreFileProfilerType              = "param.diagnoser.runtime.core_file_profiler.type"
	ParameterKeyCoreFileProfilerFilepath          = "param.diagnoser.runtime.core_file_profiler.filepath"

	ContextKeyCoreFileProfilerResultEndpoint = "diagnoser.runtime.core_file_profiler.result.endpoint"
)
View Source
const (
	ParameterKeyGoProfilerExpirationSeconds  = "param.diagnoser.runtime.go_profiler.expiration_seconds"
	ParameterKeyGoProfilerType               = "param.diagnoser.runtime.go_profiler.type"
	ParameterKeyGoProfilerSource             = "param.diagnoser.runtime.go_profiler.source"
	ParameterKeyGoProfilerTLSSecretNamespace = "param.diagnoser.runtime.go_profiler.tls.secret_reference.namespace"
	ParameterKeyGoProfilerTLSSecretName      = "param.diagnoser.runtime.go_profiler.tls.secret_reference.name"

	ContextKeyGoProfilerResultEndpoint = "diagnoser.runtime.go_profiler.result.endpoint"
)
View Source
const (
	ParameterKeyTcpdumpProfilerExpirationSeconds = "param.diagnoser.runtime.tcpdump_profiler.expiration_seconds"
	ParameterKeyTcpdumpProfilerContainer         = "param.diagnoser.runtime.tcpdump_profiler.container"
	ParameterKeyTcpdumpProfilerInterface         = "param.diagnoser.runtime.tcpdump_profiler.interface"
	ParameterKeyTcpdumpProfilerFilter            = "param.diagnoser.runtime.tcpdump_profiler.filter"

	ContextKeyTcpdumpProfilerResultEndpoint = "diagnoser.runtime.tcpdump_profiler.result.Endpoint"
)

Variables

This section is empty.

Functions

func DownloadProfileFile

func DownloadProfileFile(filepath string, source string, token []byte, ca []byte, timeout time.Duration) error

DownloadProfileFile do http request to download profile file and write into specified filepath

func GetSecretData

func GetSecretData(ca cache.Cache, name string, namespace string) (map[string][]byte, error)

GetSecretData obtain secret.data from specified secret

func NewCoreFileProfiler

func NewCoreFileProfiler(ctx context.Context, log logr.Logger, dockerEndpoint string, corefileProfilerEnabled bool, dataRoot string) (processors.Processor, error)

NewCoreFileProfiler creates a new coreFileProfiler.

func NewGoProfiler

func NewGoProfiler(
	ctx context.Context,
	logger logr.Logger,
	cache cache.Cache,
	dataRoot string,
	bindAddress string,
	goProfilerEnabled bool,
) processors.Processor

NewGoProfiler creates a new GoProfiler.

func NewTcpdumpProfiler added in v0.3.0

func NewTcpdumpProfiler(
	ctx context.Context,
	logger logr.Logger,
	dockerEndpoint string,
	cache cache.Cache,
	dataRoot string,
	tcpdumpProfilerEnabled bool,
) (processors.Processor, error)

NewTcpdumpProfiler creates a new tcpDumpProfiler.

Types

type CoreFileConfig

type CoreFileConfig struct {
	// ExpirationSeconds is the life time of CoreFileHTTPServer.
	ExpirationSeconds uint64 `json:"expirationSeconds"`
	// Type is type of coreFileProfiler.
	Type CoreFileProfilerType `json:"type"`
	// FilePath is a specified path of core file.
	// If it is empty, CoreDumpHTTPServer will search core file in a path composed of pod information.
	FilePath string `json:"filePath,omitempty"`
	// Pid is a specified pid.
	// If it is 0, GCoreHTTPServer will find all processes in the container of the pod.
	Pid int `json:"pid,omitempty"`
	// Processes is an array of processes in the container of the pod
	Processes container.ContainerTopOKBody `json:"processes,omitempty"`
}

CoreFileConfig contains some configuration required by coreFileProfiler.

type CoreFileProfilerType

type CoreFileProfilerType string

type TcpdumpProfilerType added in v0.3.0

type TcpdumpProfilerType string

Jump to

Keyboard shortcuts

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