Documentation ¶
Index ¶
- func FuncMap() template.FuncMap
- type Engine
- func (e *Engine) RenderHelmValue(helmValue *redskyv1beta1.HelmValue, trial *redskyv1beta1.Trial) (string, error)
- func (e *Engine) RenderMetricQueries(metric *redskyv1beta1.Metric, trial *redskyv1beta1.Trial, ...) (string, string, error)
- func (e *Engine) RenderPatch(patch *redskyv1beta1.PatchTemplate, trial *redskyv1beta1.Trial) ([]byte, error)
- type MetricData
- type PatchData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Engine ¶
Engine is used to render Go text templates
func (*Engine) RenderHelmValue ¶
func (e *Engine) RenderHelmValue(helmValue *redskyv1beta1.HelmValue, trial *redskyv1beta1.Trial) (string, error)
RenderHelmValue returns a rendered string of the supplied Helm value
func (*Engine) RenderMetricQueries ¶
func (e *Engine) RenderMetricQueries(metric *redskyv1beta1.Metric, trial *redskyv1beta1.Trial, target runtime.Object) (string, string, error)
RenderMetricQueries returns the metric query and the metric error query
func (*Engine) RenderPatch ¶
func (e *Engine) RenderPatch(patch *redskyv1beta1.PatchTemplate, trial *redskyv1beta1.Trial) ([]byte, error)
RenderPatch returns the JSON representation of the supplied patch template (input can be a Go template that produces YAML)
type MetricData ¶
type MetricData struct { // Trial is a copy of the trial being evaluated. Trial *redskyv1beta1.Trial // Target is the object matched by the resource target of a Kubernetes metric. Target runtime.Object // The time at which the trial run started (possibly adjusted) StartTime time.Time // The time at which the trial run completed CompletionTime time.Time // The duration of the trial run expressed as a Prometheus range value Range string // Trial assignments Values map[string]interface{} }
MetricData represents a trial during metric evaluation
func (*MetricData) Pods ¶
func (m *MetricData) Pods() runtime.Object
Pods returns the metric target if available. Deprecated: Templates should use the `.Target` pipeline instead of `.Pods`.
type PatchData ¶
type PatchData struct { // Trial metadata Trial metav1.ObjectMeta // Trial assignments Values map[string]interface{} }
PatchData represents a trial during patch evaluation
Click to show internal directories.
Click to hide internal directories.