Documentation ¶
Index ¶
- type DummyEvictionPlugin
- type DummyQRMPlugin
- type DummyReporterPlugin
- type EvictionPlugin
- type GenericPlugin
- type MetricCallback
- type PluginRegistrationWrapper
- type QRMPlugin
- type ReporterPlugin
- type ReporterPluginStub
- func (m *ReporterPluginStub) GetReportContent(_ context.Context, _ *v1alpha1.Empty) (*v1alpha1.GetReportContentResponse, error)
- func (m *ReporterPluginStub) ListAndWatchReportContent(empty *v1alpha1.Empty, ...) error
- func (m *ReporterPluginStub) Name() string
- func (m *ReporterPluginStub) Start() (err error)
- func (m *ReporterPluginStub) Stop() error
- func (m *ReporterPluginStub) Update(content []*v1alpha1.ReportContent)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DummyEvictionPlugin ¶
type DummyEvictionPlugin struct {
v1alpha1.UnimplementedEvictionPluginServer
}
DummyEvictionPlugin defines dummy eviction plugin
func (DummyEvictionPlugin) Name ¶
func (DummyEvictionPlugin) Name() string
Name of the dummy eviction plugin
func (DummyEvictionPlugin) ResourceName ¶
func (DummyEvictionPlugin) ResourceName() string
ResourceName returns name of the dummy eviction plugin
func (DummyEvictionPlugin) Start ¶
func (DummyEvictionPlugin) Start() error
Start the dummy eviction plugin
func (DummyEvictionPlugin) Stop ¶
func (DummyEvictionPlugin) Stop() error
Stop the dummy eviction plugin
type DummyQRMPlugin ¶
type DummyQRMPlugin struct {
pluginapi.UnimplementedResourcePluginServer
}
DummyQRMPlugin defines dummy QoS-Resource plugin
func (DummyQRMPlugin) Name ¶
func (DummyQRMPlugin) Name() string
Name of the dummy QoS-Resource plugin
func (DummyQRMPlugin) ResourceName ¶
func (DummyQRMPlugin) ResourceName() string
ResourceName returns name of the dummy QoS-Resource plugin
func (DummyQRMPlugin) Start ¶
func (DummyQRMPlugin) Start() error
Start the dummy QoS-Resource plugin
type DummyReporterPlugin ¶
type DummyReporterPlugin struct {
v1alpha1.UnimplementedReporterPluginServer
}
DummyReporterPlugin performs dummy report actions
func (DummyReporterPlugin) Name ¶
func (DummyReporterPlugin) Name() string
Name of the dummy reporter plugin
func (DummyReporterPlugin) Start ¶
func (DummyReporterPlugin) Start() error
Start the dummy reporter plugin
func (DummyReporterPlugin) Stop ¶
func (DummyReporterPlugin) Stop() error
Stop the dummy reporter plugin
type EvictionPlugin ¶
type EvictionPlugin interface { GenericPlugin pluginapi.EvictionPluginServer }
EvictionPlugin defines the interface that eviction plugins defined out of katalyst should follow.
type GenericPlugin ¶
type GenericPlugin interface { Name() string // Start and Stop function should be none-block. // Start should initialize all channels or goroutines and can be called again // after calling Stop to restart, and Stop should close all channels to stop // plugin goroutines, otherwise the wrapped manager will not work as expected Start() error Stop() error }
GenericPlugin is used to define a skeleton to write a standard katalyst plugin; and every katalyst plugin should implement those functions along with the extra interfaces defined in each individual plugin
type MetricCallback ¶
MetricCallback is used to return key metric as a callback function
type PluginRegistrationWrapper ¶
type PluginRegistrationWrapper struct { sync.Mutex GenericPlugin watcherapi.RegistrationServer // contains filtered or unexported fields }
PluginRegistrationWrapper is a decorator for GenericPlugin implementations, it is responsible to handle the running states of those plugins.
func NewRegistrationPluginWrapper ¶
func NewRegistrationPluginWrapper(plugin GenericPlugin, pluginsRegistrationDirs []string, metricCallback MetricCallback) (*PluginRegistrationWrapper, error)
NewRegistrationPluginWrapper wrap an input plugin with PluginRegistrationWrapper; and the returned PluginRegistrationWrapper also works as a GenericPlugin, besides the standard GenericPlugin functionality, it also handles the running states. The input GenericPlugin must support calling Start to restart after calling Stop.
func (*PluginRegistrationWrapper) Restart ¶
func (p *PluginRegistrationWrapper) Restart() (restartErr error)
Restart will trigger this plugin to restart if plugin has been stopped, it will return error
func (*PluginRegistrationWrapper) Start ¶
func (p *PluginRegistrationWrapper) Start() error
Start the plugin with auto restart logic, besides it will register to plugin grpc server
func (*PluginRegistrationWrapper) Stop ¶
func (p *PluginRegistrationWrapper) Stop() error
Stop will trigger this plugin to stop completely
type QRMPlugin ¶
type QRMPlugin interface { GenericPlugin pluginapi.ResourcePluginServer ResourceName() string }
QRMPlugin defines the interface that QoS-Resource plugins defined out of katalyst should follow.
type ReporterPlugin ¶
type ReporterPlugin interface { GenericPlugin v1alpha1.ReporterPluginServer }
ReporterPlugin performs report actions based on agent requirements.
type ReporterPluginStub ¶
type ReporterPluginStub struct { v1alpha1.UnimplementedReporterPluginServer // contains filtered or unexported fields }
ReporterPluginStub is a stub for test reporter plugin manager
func NewReporterPluginStub ¶
func NewReporterPluginStub(content []*v1alpha1.ReportContent, name string) *ReporterPluginStub
NewReporterPluginStub initialize a reporter plugin stub which will report the input content.
func (*ReporterPluginStub) GetReportContent ¶
func (m *ReporterPluginStub) GetReportContent(_ context.Context, _ *v1alpha1.Empty) (*v1alpha1.GetReportContentResponse, error)
GetReportContent get report content from cache
func (*ReporterPluginStub) ListAndWatchReportContent ¶
func (m *ReporterPluginStub) ListAndWatchReportContent(empty *v1alpha1.Empty, server v1alpha1.ReporterPlugin_ListAndWatchReportContentServer) error
ListAndWatchReportContent watch updateCh channel and send report content to plugin manager
func (*ReporterPluginStub) Name ¶
func (m *ReporterPluginStub) Name() string
Name of reporter plugin stub
func (*ReporterPluginStub) Start ¶
func (m *ReporterPluginStub) Start() (err error)
Start initialize some variables to start plugin
func (*ReporterPluginStub) Stop ¶
func (m *ReporterPluginStub) Stop() error
Stop clean some variables when stop plugin
func (*ReporterPluginStub) Update ¶
func (m *ReporterPluginStub) Update(content []*v1alpha1.ReportContent)
Update send report content to trigger list/watch