Documentation
¶
Overview ¶
Package regulator supplies measured process signals for the decision engine. Providers sample in the background, never during request admission.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Goroutines ¶
type Goroutines struct{}
func (Goroutines) Sample ¶
func (Goroutines) Sample(ctx context.Context) (decision.Observation, error)
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
func NewMemory ¶
func NewMemory(c MemoryConfig) (*Memory, error)
NewMemory compares Go-managed memory against an explicit budget (or the current finite GOMEMLIMIT) and, on Linux, visible finite cgroup limits. The highest measured ratio wins. No host-RAM fallback is guessed. Go-managed bytes are runtime Sys - HeapReleased, not process RSS or native allocations.
func (*Memory) Snapshot ¶
func (m *Memory) Snapshot() MemoryState
type MemoryConfig ¶
type MemoryConfig struct{ LimitBytes int64 }