Documentation
¶
Index ¶
Constants ¶
const LogKey = "width:log"
LogKey is the per-tick sample stream the fold integrates.
Variables ¶
This section is empty.
Functions ¶
func DesiredKey ¶
DesiredKey returns the key for friend's declared slots hash (nova-config apply writes it; the slots field is the width the friend asked for).
func FillstateKey ¶
FillstateKey returns the key for friend's fillstate hash.
func UnmeasuredLine ¶
UnmeasuredLine is the WIDTH row for a friend that has declared slots in friend:<f>:desired but no fillstate yet: slots prints the declared value (or ? when it is not an integer) and every measured field prints ?, since stale or missing prints ?, never a guess (#3615).
Types ¶
type Fillstate ¶
type Fillstate struct {
Friend string
Slots int
Leased int
Working int
Deficit int
Eligible int
IdleNoReady int
IdleDeps int
IdleInput int
IdleUnfilled int
Peak int
PeakAt int64
UnfilledSince int64
At int64
}
Fillstate represents friend:<f>:fillstate data.
func ParseFillstate ¶
ParseFillstate parses a Redis HGetAll map into a Fillstate struct.
func ReadFillstate ¶
ReadFillstate reads friend:<f>:fillstate for one friend.
func (Fillstate) IdleString ¶
IdleString formats the typed idle counts into <reason>:<n>,...
type Row ¶
type Row struct {
Fillstate Fillstate
Measured bool // friend:<f>:fillstate exists
Declared bool // friend:<f>:desired exists
DesiredRaw string // friend:<f>:desired slots, as stored
}
Row is one friend's WIDTH row as read in one pipeline: the fillstate when there is one, else the declared slots from friend:<f>:desired.
func (Row) DesiredSlots ¶
DesiredSlots is the declared slots as an integer (0 when absent or not one).