Documentation ¶
Index ¶
- type ClientSet
- type Config
- type ExecutorCore
- type ExecutorCoreUpdater
- func (c ExecutorCoreUpdater) MonitorActive(active bool, withLock func())
- func (c ExecutorCoreUpdater) ResetMonitor(withLock func())
- func (c ExecutorCoreUpdater) UpdateLFCMetrics(metrics core.LFCMetrics, withLock func())
- func (c ExecutorCoreUpdater) UpdateSystemMetrics(metrics core.SystemMetrics, withLock func())
- func (c ExecutorCoreUpdater) UpdatedVM(vm api.VmInfo, withLock func())
- func (c ExecutorCoreUpdater) UpscaleRequested(resources api.MoreResources, withLock func())
- type ExecutorCoreWithClients
- func (c *ExecutorCoreWithClients) DoMonitorDownscales(ctx context.Context, logger *zap.Logger)
- func (c *ExecutorCoreWithClients) DoMonitorUpscales(ctx context.Context, logger *zap.Logger)
- func (c *ExecutorCoreWithClients) DoNeonVMRequests(ctx context.Context, logger *zap.Logger)
- func (c *ExecutorCoreWithClients) DoPluginRequests(ctx context.Context, logger *zap.Logger)
- type GenerationNumber
- type MonitorHandle
- type MonitorInterface
- type NeonVMInterface
- type PluginInterface
- type StateDump
- type StoredGenerationNumber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientSet ¶
type ClientSet struct { Plugin PluginInterface NeonVM NeonVMInterface Monitor MonitorInterface }
type ExecutorCore ¶
type ExecutorCore struct {
// contains filtered or unexported fields
}
func NewExecutorCore ¶
func (*ExecutorCore) DoSleeper ¶
func (c *ExecutorCore) DoSleeper(ctx context.Context, logger *zap.Logger)
func (*ExecutorCore) StateDump ¶
func (c *ExecutorCore) StateDump() StateDump
StateDump copies and returns the current state inside the executor
func (*ExecutorCore) Updater ¶
func (c *ExecutorCore) Updater() ExecutorCoreUpdater
Updater returns a handle on the object used for making external changes to the ExecutorCore, beyond what's provided by the various client (ish) interfaces
func (*ExecutorCore) WithClients ¶
func (c *ExecutorCore) WithClients(clients ClientSet) ExecutorCoreWithClients
type ExecutorCoreUpdater ¶
type ExecutorCoreUpdater struct {
// contains filtered or unexported fields
}
ExecutorCoreUpdater provides a common interface for external changes to the ExecutorCore
func (ExecutorCoreUpdater) MonitorActive ¶
func (c ExecutorCoreUpdater) MonitorActive(active bool, withLock func())
MonitorActive calls (*core.State).Monitor().Active(...) on the inner core.State and runs withLock while holding the lock.
func (ExecutorCoreUpdater) ResetMonitor ¶
func (c ExecutorCoreUpdater) ResetMonitor(withLock func())
ResetMonitor calls (*core.State).Monitor().Reset() on the inner core.State and runs withLock while holding the lock.
func (ExecutorCoreUpdater) UpdateLFCMetrics ¶ added in v0.31.0
func (c ExecutorCoreUpdater) UpdateLFCMetrics(metrics core.LFCMetrics, withLock func())
UpdateLFCMetrics calls (*core.State).UpdateLFCMetrics() on the inner core.State and runs withLock while holding the lock.
func (ExecutorCoreUpdater) UpdateSystemMetrics ¶ added in v0.31.0
func (c ExecutorCoreUpdater) UpdateSystemMetrics(metrics core.SystemMetrics, withLock func())
UpdateSystemMetrics calls (*core.State).UpdateSystemMetrics() on the inner core.State and runs withLock while holding the lock.
func (ExecutorCoreUpdater) UpdatedVM ¶
func (c ExecutorCoreUpdater) UpdatedVM(vm api.VmInfo, withLock func())
UpdatedVM calls (*core.State).UpdatedVM() on the inner core.State and runs withLock while holding the lock.
func (ExecutorCoreUpdater) UpscaleRequested ¶
func (c ExecutorCoreUpdater) UpscaleRequested(resources api.MoreResources, withLock func())
UpscaleRequested calls (*core.State).Monitor().UpscaleRequested(...) on the inner core.State and runs withLock while holding the lock.
type ExecutorCoreWithClients ¶
type ExecutorCoreWithClients struct { *ExecutorCore // contains filtered or unexported fields }
ExecutorCoreWithClients wraps ExecutorCore with the various
func (*ExecutorCoreWithClients) DoMonitorDownscales ¶
func (c *ExecutorCoreWithClients) DoMonitorDownscales(ctx context.Context, logger *zap.Logger)
func (*ExecutorCoreWithClients) DoMonitorUpscales ¶
func (c *ExecutorCoreWithClients) DoMonitorUpscales(ctx context.Context, logger *zap.Logger)
func (*ExecutorCoreWithClients) DoNeonVMRequests ¶
func (c *ExecutorCoreWithClients) DoNeonVMRequests(ctx context.Context, logger *zap.Logger)
func (*ExecutorCoreWithClients) DoPluginRequests ¶
func (c *ExecutorCoreWithClients) DoPluginRequests(ctx context.Context, logger *zap.Logger)
type GenerationNumber ¶
type GenerationNumber struct {
// contains filtered or unexported fields
}
type MonitorHandle ¶
type MonitorInterface ¶
type MonitorInterface interface { CurrentGeneration() GenerationNumber // GetHandle fetches a stable handle for the current monitor, or nil if there is not one. // This method MUST NOT be called unless holding the executor's lock. GetHandle() MonitorHandle }
type NeonVMInterface ¶
type PluginInterface ¶
type StoredGenerationNumber ¶
type StoredGenerationNumber struct {
// contains filtered or unexported fields
}
func NewStoredGenerationNumber ¶
func NewStoredGenerationNumber() *StoredGenerationNumber
func (*StoredGenerationNumber) Get ¶
func (n *StoredGenerationNumber) Get() GenerationNumber
Get fetches the current value of the stored GenerationNumber
func (*StoredGenerationNumber) Inc ¶
func (n *StoredGenerationNumber) Inc() GenerationNumber
Inc increments the stored GenerationNumber, returning the new value