vitess.io/vitess@v0.16.2/go/vt/vttablet/tabletserver/throttle/base/throttle_metric_app.go (about) 1 /* 2 Copyright 2017 GitHub Inc. 3 4 Licensed under MIT License. See https://github.com/github/freno/blob/master/LICENSE 5 */ 6 7 package base 8 9 import ( 10 "errors" 11 ) 12 13 // ErrAppDenied is seen when an app is denied access 14 var ErrAppDenied = errors.New("App denied") 15 16 type appDeniedMetric struct{} 17 18 // Get implements MetricResult 19 func (metricResult *appDeniedMetric) Get() (float64, error) { 20 return 0, ErrAppDenied 21 } 22 23 // AppDeniedMetric is a special metric indicating a "denied" situation 24 var AppDeniedMetric = &appDeniedMetric{}