Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chuangyou/qsf
/ functions
Functions
270 in github.com/chuangyou/qsf
⨍
Functions
270
◇
Types & classes
54
↓ 1 callers
Method
Timing
(sampleRate float32, bucket string, d ...time.Duration)
plugin/breaker/panel.go:14
↓ 1 callers
Method
Undo
Undo reverts the last Limit() call, returning consumed allowance
plugin/ratelimit/ratelimit.go:66
↓ 1 callers
Method
UpdateRate
UpdateRate allows to update the allowed rate
plugin/ratelimit/ratelimit.go:34
↓ 1 callers
Method
breakerFail
(name string)
plugin/breaker/panel.go:131
↓ 1 callers
Method
breakerReady
(name string)
plugin/breaker/panel.go:135
↓ 1 callers
Method
breakerReset
(name string)
plugin/breaker/panel.go:114
↓ 1 callers
Method
breakerTripped
(name string)
plugin/breaker/panel.go:107
↓ 1 callers
Function
clientStreamType
(desc *grpc.StreamDesc)
plugin/prometheus/client_metrics.go:136
↓ 1 callers
Function
extractAddrs
(resp *etcd3.GetResponse)
plugin/loadbalance/registry/etcd/watcher.go:92
↓ 1 callers
Function
fetchPrometheusLines
fetchPrometheusLines does mocked HTTP GET request against real prometheus handler to get the same view that Prometheus would have while scraping this
plugin/prometheus/server_test.go:193
↓ 1 callers
Method
handleSignal
()
server/server.go:160
↓ 1 callers
Function
initExampleService
(ctx context.Context, mux *runtime.ServeMux, breaker *breaker.Breaker, tracer opentracing.Tracer, grpcMetr
examples/gateway/gateway_example.go:102
↓ 1 callers
Function
newEtcdWatcher
(key string, cli *etcd3.Client)
plugin/loadbalance/registry/etcd/watcher.go:26
↓ 1 callers
Function
newOpenTracingClientStream
(cs grpc.ClientStream, method string, desc *grpc.StreamDesc, clientSpan opentracing.Span, otgrpcOpts *options)
plugin/tracing/client.go:131
↓ 1 callers
Function
newTestStatter
()
plugin/breaker/panel_test.go:81
↓ 1 callers
Function
preRegisterMethod
preRegisterMethod is invoked on Register of a Server, allowing all gRPC services labels to be pre-populated.
plugin/prometheus/server_metrics.go:172
↓ 1 callers
Method
registry
(registryAddrs []string, serviceName, serviceAddr, serviceNodeId string)
server/server.go:110
↓ 1 callers
Function
remoteCall
()
plugin/breaker/example_test.go:150
↓ 1 callers
Function
request_ExampleService_GetExample_0
(ctx context.Context, marshaler runtime.Marshaler, client ExampleServiceClient, req *http.Request, pathParams
examples/pb/example.pb.gw.go:35
↓ 1 callers
Method
runBreakerReset
()
plugin/breaker/client.go:166
↓ 1 callers
Method
runBreakerTripped
()
plugin/breaker/client.go:160
↓ 1 callers
Function
streamRPCType
(info *grpc.StreamServerInfo)
plugin/prometheus/server_metrics.go:140
↓ 1 callers
Function
typeFromMethodInfo
(mInfo *grpc.MethodInfo)
plugin/prometheus/util.go:39
Method
AuthFunc
(ctx context.Context)
server/server.go:189
Function
BenchmarkLimit
--------------------------------------------------------------------
plugin/ratelimit/ratelimit_test.go:120
Method
CloseSend
()
plugin/tracing/client.go:218
Method
Collect
Collect is called by the Prometheus registry when collecting metrics. The implementation sends each collected metric via the provided channel and retu
plugin/prometheus/server_metrics.go:92
Method
Counter
(sampleRate float32, bucket string, n ...int)
plugin/breaker/panel_test.go:97
Method
Counter
(sampleRate float32, bucket string, n ...int)
plugin/breaker/panel.go:142
Function
CustomHTTPError
(ctx context.Context, _ *runtime.ServeMux, marshaler runtime.Marshaler, w http.ResponseWriter, _ *http.Request
grpc_error/error.go:36
Function
CustomOtherHTTPError
503=服务不可用,500=服务内部错误,401=未登录,403=禁止访问(可带原因),400=参数错误,429=并发限制,200=OK
grpc_error/error.go:24
Method
Describe
Describe sends the super-set of all possible descriptors of metrics collected by this Collector to the provided channel and returns once the last desc
plugin/prometheus/client_metrics.go:69
Method
Describe
Describe sends the super-set of all possible descriptors of metrics collected by this Collector to the provided channel and returns once the last desc
plugin/prometheus/server_metrics.go:79
Method
Descriptor
()
examples/pb/example.pb.go:36
Method
Descriptor
()
examples/pb/example.pb.go:75
Function
ExampleBreaker_events
()
plugin/breaker/example_test.go:81
Function
ExampleHTTPClient
()
plugin/breaker/example_test.go:64
Function
ExampleNewConsecutiveBreaker
()
plugin/breaker/example_test.go:54
Function
ExampleNewThresholdBreaker
()
plugin/breaker/example_test.go:13
Function
ExampleNewThresholdBreaker_manual
()
plugin/breaker/example_test.go:25
Function
ExampleNewThresholdBreaker_timeout
()
plugin/breaker/example_test.go:40
Function
ExamplePanel
()
plugin/breaker/example_test.go:107
Function
ExamplePanel_stats
()
plugin/breaker/example_test.go:130
Method
Fail
Fail records a failure in the current bucket.
plugin/breaker/window.go:76
Method
ForeachKey
(handler func(key, val string) error)
plugin/tracing/shared.go:32
Function
ForwardResponseFilter
(ctx context.Context, w http.ResponseWriter, resp proto.Message)
examples/gateway/gateway_example.go:127
Method
Gauge
(sampleRate float32, bucket string, value ...string)
plugin/breaker/panel_test.go:113
Method
Gauge
(sampleRate float32, bucket string, value ...string)
plugin/breaker/panel.go:15
Method
Gauge
(sampleRate float32, bucket string, value ...string)
plugin/breaker/panel.go:144
Method
GetExample
(ctx context.Context, request *spb.GetExampleRequest)
examples/server/server_example.go:76
Method
GetExample
(ctx context.Context, in *GetExampleRequest, opts ...grpc.CallOption)
examples/pb/example.pb.go:150
Method
GetExample
(context.Context, *GetExampleRequest)
examples/pb/example.pb.go:161
Method
GetRequestMetadata
(context.Context, ...string)
client/client.go:140
Method
GetRequestMetadata
(ctx context.Context, uri ...string)
client/client.go:150
Method
GetValue
()
examples/pb/example.pb.go:97
Function
HandleSignal
(httpServer http.Server)
client/client.go:108
Method
Handled
(code codes.Code)
plugin/prometheus/client_reporter.go:41
Method
Head
Head wraps http.Client Head()
plugin/breaker/client.go:117
Function
IncludingSpans
IncludingSpans binds a IncludeSpanFunc to the options
plugin/tracing/options.go:32
Function
Internal
500 INTERNAL 服务端内部错误,一般是 BUG
grpc_error/error.go:141
Function
InvalidArgument
400 INVALID_ARGUMENT 客户端使用了错误的参数
grpc_error/error.go:82
Function
LogPayloads
LogPayloads returns an Option that tells the OpenTracing instrumentation to try to log application payloads in both directions.
plugin/tracing/options.go:14
Function
MetaDataJoin
(ctx context.Context, r *http.Request)
examples/gateway/gateway_example.go:124
Function
NewClient
(config *Config, isGateway bool)
client/client.go:39
Function
NewHostBasedHTTPClient
NewHostBasedHTTPClient provides a circuit breaker wrapper around http.Client. This client will use one circuit breaker per host parsed from the reques
plugin/breaker/client.go:38
Function
NewRegistry
(option Option)
plugin/loadbalance/registry/etcd/registry.go:38
Function
NewResolver
(registryDir, serviceName string, cfg etcd3.Config)
plugin/loadbalance/registry/etcd/resolver.go:18
Function
NewSevice
(config *Config)
server/server.go:48
Function
NotFound
404 NotFound 未找到资源
grpc_error/error.go:105
Function
OpenTracingClientInterceptor
OpenTracingClientInterceptor returns a grpc.UnaryClientInterceptor suitable for use in a grpc.Dial call. For example: conn, err := grpc.Dial( addres
plugin/tracing/client.go:30
Function
OpenTracingServerInterceptor
OpenTracingServerInterceptor returns a grpc.UnaryServerInterceptor suitable for use in a grpc.NewServer call. For example: s := grpc.NewServer( ...,
plugin/tracing/server.go:27
Function
OpenTracingStreamClientInterceptor
OpenTracingStreamClientInterceptor returns a grpc.StreamClientInterceptor suitable for use in a grpc.Dial call. The interceptor instruments streaming
plugin/tracing/client.go:92
Function
OpenTracingStreamServerInterceptor
OpenTracingStreamServerInterceptor returns a grpc.StreamServerInterceptor suitable for use in a grpc.NewServer call. The interceptor instruments strea
plugin/tracing/server.go:89
Function
PermissionDenied
403 PERMISSION_DENIED 这可能是因为客户端没有权限
grpc_error/error.go:73
Method
Ping
(ctx context.Context, ping *pb_testproto.PingRequest)
plugin/prometheus/server_test.go:234
Method
Post
Post wraps http.Client Post()
plugin/breaker/client.go:129
Method
PostForm
PostForm wraps http.Client PostForm()
plugin/breaker/client.go:141
Method
ProtoMessage
()
examples/pb/example.pb.go:35
Method
ProtoMessage
()
examples/pb/example.pb.go:74
Method
ReceivedMessage
()
plugin/prometheus/client_reporter.go:33
Method
RecvMsg
(m interface{})
plugin/prometheus/client_metrics.go:159
Method
RecvMsg
(m interface{})
plugin/prometheus/server_metrics.go:163
Method
RecvMsg
(m interface{})
plugin/tracing/client.go:203
Function
RegisterExampleServiceHandlerFromEndpoint
RegisterExampleServiceHandlerFromEndpoint is same as RegisterExampleServiceHandler but automatically dials to "endpoint" and closes the connection whe
examples/pb/example.pb.gw.go:50
Function
RegisterExampleServiceServer
(s *grpc.Server, srv ExampleServiceServer)
examples/pb/example.pb.go:164
Method
RequireTransportSecurity
()
client/client.go:141
Method
RequireTransportSecurity
()
client/client.go:155
Method
Reset
Reset resets the count of all buckets.
plugin/breaker/window.go:140
Method
Reset
()
examples/pb/example.pb.go:33
Method
Reset
()
examples/pb/example.pb.go:72
Method
Resolve
Resolve to resolve the service from etcd
plugin/loadbalance/registry/etcd/resolver.go:23
Function
ResourceExhausted
429 RESOURCE_EXHAUSTED 超过资源限额或频率限制
grpc_error/error.go:114
Method
SendMsg
(m interface{})
plugin/prometheus/client_metrics.go:151
Method
SendMsg
(m interface{})
plugin/prometheus/server_metrics.go:155
Method
SendMsg
(m interface{})
plugin/tracing/client.go:195
Method
SentMessage
()
plugin/prometheus/client_reporter.go:37
Method
SetServiceToken
(token string)
client/client.go:147
Method
SetupSuite
()
plugin/prometheus/server_test.go:57
Method
SetupSuite
()
plugin/prometheus/client_test.go:43
Method
SetupTest
()
plugin/prometheus/server_test.go:81
← previous
next →
101–200 of 270, ranked by callers