MCPcopy Create free account

hub / github.com/chuangyou/qsf / functions

Functions270 in github.com/chuangyou/qsf

↓ 39 callersMethodString
()
examples/pb/example.pb.go:34
↓ 24 callersMethodAdd
Add sets the name as a reference to the given circuit breaker.
plugin/breaker/panel.go:47
↓ 22 callersMethodCall
Call wraps a function the Breaker will protect. A failure is recorded whenever the function returns an error. If the called function takes longer than
plugin/breaker/circuitbreaker.go:303
↓ 21 callersMethodFail
Fail increments the failure count
plugin/breaker/window.go:32
↓ 21 callersMethodLimit
Limit returns true if rate was exceeded
plugin/ratelimit/ratelimit.go:40
↓ 19 callersMethodTripped
Tripped returns true if the circuit breaker is tripped, false if it is reset.
plugin/breaker/circuitbreaker.go:226
↓ 18 callersMethodReset
Reset resets the counts to 0
plugin/breaker/window.go:26
↓ 16 callersFunctionrequireValue
(t *testing.T, expect int, c prometheus.Collector)
plugin/prometheus/server_test.go:293
↓ 14 callersMethodReady
Ready will return true if the circuit breaker is ready to call the function. It will be ready if the breaker is in a reset state, or if it is time to
plugin/breaker/circuitbreaker.go:291
↓ 13 callersFunctionNewThresholdBreaker
NewThresholdBreaker creates a Breaker with a ThresholdTripFunc.
plugin/breaker/circuitbreaker.go:141
↓ 12 callersFunctionNewBreaker
NewBreaker creates a base breaker with an exponential backoff and no TripFunc
plugin/breaker/circuitbreaker.go:136
↓ 11 callersMethodReset
Reset will reset the circuit breaker. After Reset() is called, Tripped() will return false.
plugin/breaker/circuitbreaker.go:211
↓ 11 callersMethodTrip
Trip will trip the circuit breaker. After Trip() is called, Tripped() will return true.
plugin/breaker/circuitbreaker.go:202
↓ 9 callersFunctionNew
New creates a new rate limiter instance
plugin/ratelimit/ratelimit.go:14
↓ 8 callersMethodClose
()
plugin/loadbalance/registry/etcd/watcher.go:22
↓ 8 callersMethodContext
()
plugin/tracing/server.go:131
↓ 8 callersMethodPingList
(ping *pb_testproto.PingRequest, stream pb_testproto.TestService_PingListServer)
plugin/prometheus/server_test.go:244
↓ 8 callersMethodSuccess
Sucecss increments the success count
plugin/breaker/window.go:37
↓ 8 callersMethodapply
(o prom.CounterOpts)
plugin/prometheus/metric_options.go:12
↓ 8 callersFunctionrequireValueWithRetry
(ctx context.Context, t *testing.T, expect int, c prometheus.Collector)
plugin/prometheus/server_test.go:315
↓ 7 callersMethodFail
Fail is used to indicate a failure condition the Breaker should record. It will increment the failure counters and store the time of the last failure.
plugin/breaker/circuitbreaker.go:255
↓ 7 callersFunctionSetSpanTags
SetSpanTags sets one or more tags on the given span according to the error.
plugin/tracing/errors.go:55
↓ 6 callersMethodDo
Do wraps http.Client Do()
plugin/breaker/client.go:93
↓ 6 callersMethodGet
Get retrieves a circuit breaker by name. If no circuit breaker exists, it returns the NoOp one and sets ok to false.
plugin/breaker/panel.go:75
↓ 6 callersMethodHandled
(code codes.Code)
plugin/prometheus/server_reporter.go:41
↓ 6 callersFunctionNewPanel
NewPanel creates a new Panel
plugin/breaker/panel.go:38
↓ 6 callersMethodStreamServerInterceptor
StreamServerInterceptor is a gRPC server-side interceptor that provides Prometheus monitoring for Streaming RPCs.
plugin/prometheus/server_metrics.go:118
↓ 6 callersMethodUnaryServerInterceptor
UnaryServerInterceptor is a gRPC server-side interceptor that provides Prometheus monitoring for Unary RPCs.
plugin/prometheus/server_metrics.go:103
↓ 6 callersFunctionrequireValueHistCount
(t *testing.T, expect int, o prometheus.Observer)
plugin/prometheus/server_test.go:304
↓ 5 callersMethodGet
Get wraps http.Client Get()
plugin/breaker/client.go:105
↓ 5 callersFunctionNewBreakerWithOptions
NewBreakerWithOptions creates a base breaker with a specified backoff, clock and TripFunc
plugin/breaker/circuitbreaker.go:100
↓ 5 callersMethodbreakerLookup
(val interface{})
plugin/breaker/client.go:152
↓ 4 callersMethodCallContext
CallContext is same as Call but if the ctx is canceled after the circuit returned an error, the error will not be marked as a failure because the call
plugin/breaker/circuitbreaker.go:309
↓ 4 callersMethodConsecFailures
ConsecFailures returns the number of consecutive failures that have occured.
plugin/breaker/circuitbreaker.go:243
↓ 4 callersMethodCount
(name string)
plugin/breaker/panel_test.go:85
↓ 4 callersMethodCounter
(sampleRate float32, bucket string, n ...int)
plugin/breaker/panel.go:13
↓ 4 callersFunctionErrorClass
ErrorClass returns the class of the given error
plugin/tracing/errors.go:25
↓ 4 callersMethodFailures
Failures returns the number of failures for this circuit breaker.
plugin/breaker/circuitbreaker.go:238
↓ 4 callersMethodGetExample
(ctx context.Context, in *GetExampleRequest, opts ...grpc.CallOption)
examples/pb/example.pb.go:139
↓ 4 callersFunctionNewRateBreaker
NewRateBreaker creates a Breaker with a RateTripFunc.
plugin/breaker/circuitbreaker.go:155
↓ 4 callersMethodReceivedMessage
()
plugin/prometheus/server_reporter.go:33
↓ 4 callersMethodSentMessage
()
plugin/prometheus/server_reporter.go:37
↓ 4 callersMethodapply
(opts ...Option)
plugin/tracing/options.go:72
↓ 4 callersFunctionnewOptions
newOptions returns the default options.
plugin/tracing/options.go:65
↓ 4 callersMethodsendEvent
(event BreakerEvent)
plugin/breaker/circuitbreaker.go:373
↓ 3 callersMethodFailures
Failures returns the total number of failures recorded in all buckets.
plugin/breaker/window.go:92
↓ 3 callersMethodHeader
()
plugin/tracing/client.go:187
↓ 3 callersMethodRegister
()
plugin/loadbalance/registry/etcd/registry.go:62
↓ 3 callersMethodRun
()
server/server.go:138
↓ 3 callersMethodSubscribe
Subscribe returns a channel of PanelEvents. Whenever a breaker changes state, the PanelEvent will be sent over the channel. See BreakerEvent for the t
plugin/breaker/panel.go:89
↓ 3 callersMethodSuccesses
Successes returns the number of successes for this circuit breaker.
plugin/breaker/circuitbreaker.go:248
↓ 3 callersMethodUnaryClientInterceptor
UnaryClientInterceptor is a gRPC client-side interceptor that provides Prometheus monitoring for Unary RPCs.
plugin/prometheus/client_metrics.go:108
↓ 3 callersFunctionnewWindow
newWindow creates a new window. windowTime is the time covering the entire window. windowBuckets is the number of buckets the window is divided into.
plugin/breaker/window.go:57
↓ 2 callersMethodEnableClientHandlingTimeHistogram
EnableClientHandlingTimeHistogram turns on recording of handling time of RPCs. Histogram metrics can be very expensive for Prometheus to retain and qu
plugin/prometheus/client_metrics.go:94
↓ 2 callersMethodEnableHandlingTimeHistogram
EnableHandlingTimeHistogram enables histograms being registered when registering the ServerMetrics on a Prometheus registry. Histograms can be expensi
plugin/prometheus/server_metrics.go:63
↓ 2 callersMethodErrorRate
ErrorRate returns the error rate calculated over all buckets, expressed as a floating point number (e.g. 0.9 for 90%)
plugin/breaker/window.go:120
↓ 2 callersMethodErrorRate
ErrorRate returns the current error rate of the Breaker, expressed as a floating point number (e.g. 0.9 for 90%), since the last time the breaker was
plugin/breaker/circuitbreaker.go:284
↓ 2 callersMethodInitializeMetrics
InitializeMetrics initializes all metrics, with their appropriate null value, for all gRPC methods registered on a gRPC server. This is useful, to ens
plugin/prometheus/server_metrics.go:131
↓ 2 callersFunctionNewClientMetrics
NewClientMetrics returns a ClientMetrics object. Use a new instance of ClientMetrics when not using the default Prometheus metrics registry, for examp
plugin/prometheus/client_metrics.go:29
↓ 2 callersFunctionNewConsecutiveBreaker
NewConsecutiveBreaker creates a Breaker with a ConsecutiveTripFunc.
plugin/breaker/circuitbreaker.go:148
↓ 2 callersFunctionNewHTTPClient
NewHTTPClient provides a circuit breaker wrapper around http.Client. It wraps all of the regular http.Client functions. Specifying 0 for timeout will
plugin/breaker/client.go:29
↓ 2 callersFunctionNewServerMetrics
NewServerMetrics returns a ServerMetrics object. Use a new instance of ServerMetrics when not using the default Prometheus metrics registry, for examp
plugin/prometheus/server_metrics.go:26
↓ 2 callersMethodNext
()
plugin/loadbalance/registry/etcd/watcher.go:38
↓ 2 callersMethodPingEmpty
(ctx context.Context, _ *pb_testproto.Empty)
plugin/prometheus/server_test.go:230
↓ 2 callersMethodPingError
(ctx context.Context, ping *pb_testproto.PingRequest)
plugin/prometheus/server_test.go:239
↓ 2 callersMethodSet
(key, val string)
plugin/tracing/shared.go:22
↓ 2 callersMethodStreamClientInterceptor
StreamClientInterceptor is a gRPC client-side interceptor that provides Prometheus monitoring for Streaming RPCs.
plugin/prometheus/client_metrics.go:123
↓ 2 callersMethodSuccess
Success is used to indicate a success condition the Breaker should record. If the success was triggered by a retry attempt, the breaker will be Reset(
plugin/breaker/circuitbreaker.go:268
↓ 2 callersMethodSuccesses
Successes returns the total number of successes recorded in all buckets.
plugin/breaker/window.go:106
↓ 2 callersFunctionextractSpanContext
(ctx context.Context, tracer opentracing.Tracer)
plugin/tracing/server.go:135
↓ 2 callersMethodgetLatestBucket
getLatestBucket returns the current bucket. If the bucket time has elapsed it will move to the next bucket, resetting its counts and updating the last
plugin/breaker/window.go:153
↓ 2 callersFunctioninjectSpanContext
(ctx context.Context, tracer opentracing.Tracer, clientSpan opentracing.Span)
plugin/tracing/client.go:226
↓ 2 callersFunctionnewClientReporter
(m *ClientMetrics, rpcType grpcType, fullMethod string)
plugin/prometheus/client_reporter.go:20
↓ 2 callersFunctionnewServerReporter
(m *ServerMetrics, rpcType grpcType, fullMethod string)
plugin/prometheus/server_reporter.go:20
↓ 2 callersFunctionrequireValueWithRetryHistCount
(ctx context.Context, t *testing.T, expect int, o prometheus.Observer)
plugin/prometheus/server_test.go:333
↓ 2 callersFunctionsplitMethodName
(fullMethodName string)
plugin/prometheus/util.go:31
↓ 2 callersMethodstate
state returns the state of the TrippableBreaker. The states available are: closed - the circuit is in a reset state and is operational open - the circ
plugin/breaker/circuitbreaker.go:348
↓ 2 callersFunctiontoFloat64HistCount
toFloat64HistCount does the same thing as prometheus go client testutil.ToFloat64, but for histograms. TODO(bwplotka): Upstream this function to prome
plugin/prometheus/server_test.go:257
↓ 2 callersFunctionunixNano
now as unix nanoseconds
plugin/ratelimit/ratelimit.go:76
↓ 1 callersMethodAddListener
AddListener adds a channel of ListenerEvents on behalf of a listener. The listener channel must be buffered.
plugin/breaker/circuitbreaker.go:183
↓ 1 callersFunctionAuthHandle
(h http.Handler)
examples/gateway/gateway_example.go:131
↓ 1 callersMethodBreak
Break trips the circuit breaker and prevents it from auto resetting. Use this when manual control over the circuit breaker state is needed.
plugin/breaker/circuitbreaker.go:232
↓ 1 callersMethodCollect
Collect is called by the Prometheus registry when collecting metrics. The implementation sends each collected metric via the provided channel and retu
plugin/prometheus/client_metrics.go:82
↓ 1 callersFunctionConsecutiveTripFunc
ConsecutiveTripFunc returns a TripFunc that trips whenever the consecutive failure count meets the threshold.
plugin/breaker/circuitbreaker.go:398
↓ 1 callersFunctionEnableClientHandlingTimeHistogram
EnableClientHandlingTimeHistogram turns on recording of handling time of RPCs. Histogram metrics can be very expensive for Prometheus to retain and qu
plugin/prometheus/client.go:36
↓ 1 callersFunctionEnableHandlingTimeHistogram
EnableHandlingTimeHistogram turns on recording of handling time of RPCs. Histogram metrics can be very expensive for Prometheus to retain and query. T
plugin/prometheus/server.go:45
↓ 1 callersMethodGetValue
()
examples/pb/example.pb.go:58
↓ 1 callersFunctionNewExampleServiceClient
(cc *grpc.ClientConn)
examples/pb/example.pb.go:146
↓ 1 callersFunctionNewHTTPClientWithBreaker
NewHTTPClientWithBreaker provides a circuit breaker wrapper around http.Client. It wraps all of the regular http.Client functions using the provided B
plugin/breaker/client.go:64
↓ 1 callersFunctionParseError
(err error)
grpc_error/error.go:158
↓ 1 callersFunctionRateTripFunc
RateTripFunc returns a TripFunc that trips whenever the error rate hits the threshold. The error rate is calculated as such: f = number of failures s
plugin/breaker/circuitbreaker.go:411
↓ 1 callersFunctionRegister
Register takes a gRPC server and pre-initializes all counters to 0. This allows for easier monitoring in Prometheus (no missing metrics), and should b
plugin/prometheus/server.go:37
↓ 1 callersFunctionRegisterExampleServiceHandler
RegisterExampleServiceHandler registers the http handlers for service ExampleService to "mux". The handlers forward requests to the grpc endpoint over
examples/pb/example.pb.gw.go:75
↓ 1 callersFunctionRegisterExampleServiceHandlerClient
RegisterExampleServiceHandlerClient registers the http handlers for service ExampleService to "mux". The handlers forward requests to the grpc endpoin
examples/pb/example.pb.gw.go:84
↓ 1 callersMethodRemoveListener
RemoveListener removes a channel previously added via AddListener. Once removed, the channel will no longer receive ListenerEvents. Returns true if th
plugin/breaker/circuitbreaker.go:190
↓ 1 callersMethodResetCounters
ResetCounters will reset only the failures, consecFailures, and success counters
plugin/breaker/circuitbreaker.go:220
↓ 1 callersMethodSetServiceToken
(string)
client/client.go:139
↓ 1 callersMethodSubscribe
Subscribe returns a channel of BreakerEvents. Whenever the breaker changes state, the state will be sent over the channel. See BreakerEvent for the ty
plugin/breaker/circuitbreaker.go:163
↓ 1 callersFunctionThresholdTripFunc
ThresholdTripFunc returns a TripFunc with that trips whenever the failure count meets the threshold.
plugin/breaker/circuitbreaker.go:390
↓ 1 callersMethodTime
(name string)
plugin/breaker/panel_test.go:91
next →1–100 of 270, ranked by callers