const ( DefaultCachedSamplesCount = 100 DefaultMaxSampleAgeMs = 500 )
const (
PluginName = "ProactiveNodesSampler"
)
func NewProactiveNodesSamplerPlugin(pluginConfig config.PluginConfig, scheduler pipeline.PolarisScheduler) (pipeline.Plugin, error)
This SampleNodesPlugin proactively samples nodes using a wrapped sampler plugin.
type ProactiveNodesSamplerPlugin struct {
// contains filtered or unexported fields
}
func (ps *ProactiveNodesSamplerPlugin) Name() string
Name implements pipeline.SampleNodesPlugin
func (ps *ProactiveNodesSamplerPlugin) SampleNodes(ctx pipeline.SchedulingContext, podInfo *pipeline.PodInfo) ([]*pipeline.NodeInfo, pipeline.Status)
SampleNodes implements pipeline.SampleNodesPlugin
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"` }