...

Package proactivesampler

import "framework/plugins/proactivesampler"
Overview
Index

Overview ▾

Constants

const (
    DefaultCachedSamplesCount = 100
    DefaultMaxSampleAgeMs     = 500
)
const (
    PluginName = "ProactiveNodesSampler"
)

func NewProactiveNodesSamplerPlugin

func NewProactiveNodesSamplerPlugin(pluginConfig config.PluginConfig, scheduler pipeline.PolarisScheduler) (pipeline.Plugin, error)

type ProactiveNodesSamplerPlugin

This SampleNodesPlugin proactively samples nodes using a wrapped sampler plugin.

type ProactiveNodesSamplerPlugin struct {
    // contains filtered or unexported fields
}

func (*ProactiveNodesSamplerPlugin) Name

func (ps *ProactiveNodesSamplerPlugin) Name() string

Name implements pipeline.SampleNodesPlugin

func (*ProactiveNodesSamplerPlugin) SampleNodes

func (ps *ProactiveNodesSamplerPlugin) SampleNodes(ctx pipeline.SchedulingContext, podInfo *pipeline.PodInfo) ([]*pipeline.NodeInfo, pipeline.Status)

SampleNodes implements pipeline.SampleNodesPlugin

type ProactiveNodesSamplerPluginConfig

Configuration data for the ProactiveNodesSamplerPlugin.

type ProactiveNodesSamplerPluginConfig struct {

    // The wrapped sampling plugin that is used to obtain the samples.
    WrappedSampler *config.PluginsConfigListEntry `json:"wrappedSampler" yaml:"wrappedSampler"`

    // The number of samples that should be cached.
    CachedSamplesCount int32 `json:"cachedSamplesCount" yaml:"cachedSamplesCount"`

    // The maximum age of a sample in milliseconds.
    MaxSampleAgeMs int32 `json:"maxSampleAgeMs" yaml:"maxSampleAgeMs"`
}