Documentation
¶
Overview ¶
Package rediskeys builds every Redis key this service uses, so one Redis can host several deployments behind REDIS_KEY_PREFIX.
Index ¶
- type Keys
- func (k Keys) BudgetKey(keyName, modelID, day string) string
- func (k Keys) BudgetUser(userID, modelID, day string) string
- func (k Keys) GCRAKey(keyName, modelID string) string
- func (k Keys) GCRAUser(userID, modelID string) string
- func (k Keys) KeyRPM(keyName string) string
- func (k Keys) KeyTPM(keyName string) string
- func (k Keys) NodeDrain(nodeID string) string
- func (k Keys) NodeHeartbeat(nodeID string) string
- func (k Keys) NodeInflight(nodeID string) string
- func (k Keys) NodeMeta(nodeID string) string
- func (k Keys) NodePerf(nodeID, modelID string) string
- func (k Keys) NodeUsage(nodeID string) string
- func (k Keys) NodeUsageMark(nodeID string) string
- func (k Keys) NodesSet() string
- func (k Keys) RPM(keyName, modelID string, unixMinute int64) string
- func (k Keys) Spend(subject, subjectID, window string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keys ¶
type Keys struct {
// contains filtered or unexported fields
}
func (Keys) BudgetUser ¶
BudgetUser is the daily token budget per end user and model (UTC day).
func (Keys) KeyRPM ¶ added in v1.0.0
KeyRPM and KeyTPM are the GCRA arrival times of a client key's own request and token rates, over all models.
func (Keys) NodeHeartbeat ¶
NodeHeartbeat holds the ephemeral heartbeat timestamp and dynamic telemetry.
func (Keys) NodeInflight ¶
NodeInflight is the ZSET of active in-flight requests on the node.
func (Keys) NodePerf ¶
NodePerf holds EWMA metrics (tps_ema, ttft_ema_ms) for a specific node and model.
func (Keys) NodeUsage ¶ added in v1.3.0
NodeUsage is the stream of requests sent to the node, kept for its owner.
func (Keys) NodeUsageMark ¶ added in v1.3.0
NodeUsageMark holds when the node's usage log was last written; it outlives the log so a pull after the log expired can tell lost records from none.