Documentation ¶
Index ¶
- type ID
- type Limits
- type Store
- func (s *Store) All(ctx context.Context) (Limits, error)
- func (s *Store) Max(ctx context.Context, id ID) (int, error)
- func (s *Store) ResetAll(ctx context.Context) error
- func (s *Store) SetMax(ctx context.Context, id ID, max int) error
- func (s *Store) UpdateLimitsTx(ctx context.Context, tx *sql.Tx, id string, max int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ID ¶
type ID string
ID represents the identifier for a given system limit.
const ( // Maximum number of notification rules per user. NotificationRulesPerUser ID = "notification_rules_per_user" // Maximum number of contact methods per user. ContactMethodsPerUser ID = "contact_methods_per_user" // Maximum number of steps on a single escalation policy. EPStepsPerPolicy ID = "ep_steps_per_policy" // Maximum number of actions on a single escalation policy step. EPActionsPerStep ID = "ep_actions_per_step" // Maximum number of participants per rotation. ParticipantsPerRotation ID = "participants_per_rotation" // Pertains to all rules for all assignments/targets. RulesPerSchedule ID = "rules_per_schedule" // Maximum number of integration keys per service. IntegrationKeysPerService ID = "integration_keys_per_service" // Only affects newly created alerts but not re-escalated ones. UnackedAlertsPerService ID = "unacked_alerts_per_service" // Maximum number of targets per schedule. TargetsPerSchedule ID = "targets_per_schedule" // Maximum number of heartbeat monitors per service. HeartbeatMonitorsPerService ID = "heartbeat_monitors_per_service" // Only limits future overrides (i.e. end in the future). UserOverridesPerSchedule ID = "user_overrides_per_schedule" // Maximum number of calendar subscriptions per user. CalendarSubscriptionsPerUser ID = "calendar_subscriptions_per_user" // Maximum number of pending signals per service. PendingSignalsPerService ID = "pending_signals_per_service" // Maximum number of pending signals per destination per service. PendingSignalsPerDestPerService ID = "pending_signals_per_dest_per_service" )
IDs of configurable limits.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
A Store allows getting and setting system limits.
func NewStore ¶ added in v0.25.0
NewStore creates a new DB and prepares all necessary SQL statements.
Click to show internal directories.
Click to hide internal directories.