Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsLimitError ¶
IsLimitError will determine if an error's cause is a limit.Error.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB implements the Store interface against a Postgres DB.
type ID ¶
type ID string
ID represents the identifier for a given system limit.
const ( NotificationRulesPerUser ID = "notification_rules_per_user" ContactMethodsPerUser ID = "contact_methods_per_user" EPStepsPerPolicy ID = "ep_steps_per_policy" EPActionsPerStep ID = "ep_actions_per_step" ParticipantsPerRotation ID = "participants_per_rotation" RulesPerSchedule ID = "rules_per_schedule" IntegrationKeysPerService ID = "integration_keys_per_service" UnackedAlertsPerService ID = "unacked_alerts_per_service" TargetsPerSchedule ID = "targets_per_schedule" HeartbeatMonitorsPerService ID = "heartbeat_monitors_per_service" UserOverridesPerSchedule ID = "user_overrides_per_schedule" )
IDs of configurable limits.
type Store ¶
type Store interface { // ResetAll will reset all configurable limits to the default (no-limit). ResetAll(context.Context) error // Max will return the current max value for the given limit. Max(context.Context, ID) (int, error) // SetMax allows setting the max value for a limit. SetMax(context.Context, ID, int) error // All will get the current value of all limits. All(context.Context) (Limits, error) }
A Store allows getting and setting system limits.
Click to show internal directories.
Click to hide internal directories.