Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobConfig ¶
type JobConfig struct { // RequestConfig configures resource requests for the job that is started. RequestConfig ResourceConfig // LimitConfig configures resource limits for the job that is started. LimitConfig ResourceConfig // Namespace specifies the namespace for job execution. Namespace string // Privileged indicates if Job has to be run in privileged mode Privileged bool }
JobConfig holds configuration options for the profiling job that is launched by cli.
func (*JobConfig) ToResourceRequirements ¶
func (j *JobConfig) ToResourceRequirements() (apiv1.ResourceRequirements, error)
ToResourceRequirements parses JobConfig into an apiv1.ResourceRequirements map which can be passed to a container spec.
type ProfilerConfig ¶
type ProfilerConfig struct { Target *TargetConfig Job *JobConfig LogLevel api.LogLevel }
func NewProfilerConfig ¶
func NewProfilerConfig(Target *TargetConfig, Job *JobConfig) *ProfilerConfig
NewProfilerConfig instance new ProfilerConfig with given parameters and default values for the rest
func (*ProfilerConfig) WithLogLevel ¶
func (p *ProfilerConfig) WithLogLevel(logLevel api.LogLevel) *ProfilerConfig
WithLogLevel set log level
type ResourceConfig ¶
ResourceConfig holds resource configuration for either requests or limits.
func (ResourceConfig) ParseResources ¶
func (rc ResourceConfig) ParseResources() (apiv1.ResourceList, error)
ParseResources parses the ResourceConfig and returns an apiv1.ResourceList which can be used in a apiv1.ResourceRequirements map.
type TargetConfig ¶
type TargetConfig struct { Namespace string PodName string ContainerName string ContainerId string Event api.ProfilingEvent Duration time.Duration Id string FileName string Alpine bool DryRun bool Image string ContainerRuntime api.ContainerRuntime ContainerRuntimePath string Language api.ProgrammingLanguage Compressor api.Compressor Pgrep string ImagePullSecret string ServiceAccountName string ProfilingTool api.ProfilingTool OutputType api.EventType }
Click to show internal directories.
Click to hide internal directories.