MCPcopy Create free account

hub / github.com/bytemode/pitaya-notes / functions

Functions1,948 in github.com/bytemode/pitaya-notes

↓ 2 callersMethodValidate
Validate is the the function responsible for validating the 'in' parameter based on the struct tags the parameter has. This function has the pipeline.
defaultpipelines/default_struct_validator.go:21
↓ 2 callersMethodValidateMessageType
ValidateMessageType validates a given message type against the handler's one and returns an error if it is a mismatch and a boolean indicating if the
component/service.go:169
↓ 2 callersFunctionalreadyRegistered
(name string)
module.go:87
↓ 2 callersMethodbootstrapLease
()
modules/binding_storage.go:145
↓ 2 callersMethodbuildPacket
(msg message.Message)
client/client.go:392
↓ 2 callersMethodcall
(ctx context.Context, req *protos.Request)
cluster/grpc_rpc_client.go:362
↓ 2 callersFunctionconnect
(params, url, cb)
examples/demo/chat/web/starx-wsclient.js:289
↓ 2 callersMethodcreateGroup
(ctx context.Context, groupName string, leaseID clientv3.LeaseID)
groups/etcd_group_service.go:89
↓ 2 callersMethoddeleteLocalInvalidServers
(actualServers []string)
cluster/etcd_service_discovery.go:278
↓ 2 callersFunctiondocForMethod
(method reflect.Method, getPtrNames bool)
docgenerator/generator.go:90
↓ 2 callersFunctiondocForType
(typ reflect.Type, isOutput bool, getPtrNames bool)
docgenerator/generator.go:117
↓ 2 callersMethodenqueueOptions
( opts *EnqueueOpts, )
worker/worker.go:172
↓ 2 callersFunctiongetEncodedEmptyMap
()
session/session_test.go:59
↓ 2 callersFunctiongetGroupKV
(ctx context.Context, groupName string)
groups/etcd_group_service.go:75
↓ 2 callersFunctiongetMsgType
(msgTypeIface interface{})
service/util.go:88
↓ 2 callersFunctiongetName
(field reflect.StructField, isOutput bool)
docgenerator/generator.go:165
↓ 2 callersFunctiongetOutputInputNames
Receives each entry from the Unmarshal json from the Docs and read the inputs and outputs associated with it. Return the output type, the input and th
client/protoclient.go:130
↓ 2 callersMethodgetServerHost
(sv *Server)
cluster/grpc_rpc_client.go:286
↓ 2 callersFunctiongetTags
(ctx context.Context, tags map[string]string)
metrics/report.go:119
↓ 2 callersMethodhandleHandshake
()
client/client.go:370
↓ 2 callersMethodhandleMessages
handleMessages 处理主题chan上的消息
cluster/nats_rpc_server.go:185
↓ 2 callersMethodhandleRPCSys
handleRPCSys系统rpc 调用的是本地消息
service/remote.go:382
↓ 2 callersMethodhandleRPCUser
(ctx context.Context, req *protos.Request, rt *route.Route)
service/remote.go:302
↓ 2 callersFunctioninitLogger
()
logger/logger.go:53
↓ 2 callersFunctioninitSysRemotes
初始化注册一个远端组件
app.go:331
↓ 2 callersFunctioninvalidType
(t Type)
conn/message/message.go:136
↓ 2 callersFunctionisFunction
(f interface{})
helpers/type_support.go:5
↓ 2 callersFunctionisHandlerMethod
isHandlerMethod decide a method is suitable handler method 如果是符合本地消息响应的类型Handler类型的方法则返回true 有一个或者两个参数 第一个是context.Context 第二个是[]byte or ptr 有0个或者两个返回
component/method.go:98
↓ 2 callersFunctionisRemoteMethod
isRemoteMethod decide a method is suitable remote method 是rpc过程调用的方法类型 带参数或者不带参数 类型必须是proto.Message类型类型的指针 返回值必须是proto.Message类型指针和error
component/method.go:52
↓ 2 callersMethodlocalProcess
处理本地
service/handler.go:328
↓ 2 callersFunctionnewProto
Return the basic structure for the ProtoClient struct.
client/protoclient.go:285
↓ 2 callersMethodnotifyListeners
notifyListeners 添加删除服务器时进行监听通知
cluster/etcd_service_discovery.go:247
↓ 2 callersFunctionparseEtcdKey
(key string)
cluster/etcd_service_discovery.go:403
↓ 2 callersFunctionparseServer
(value []byte)
cluster/etcd_service_discovery.go:413
↓ 2 callersFunctionparseType
(typ reflect.Type, isOutput bool, getPtrNames bool)
docgenerator/generator.go:178
↓ 2 callersMethodparsedRPCJob
(rpcJob RPCJob)
worker/worker.go:125
↓ 2 callersMethodpendingRequestsReaper
pendingRequestsReaper delete timedout requests
client/client.go:190
↓ 2 callersFunctionpollFuncReturn
(f interface{})
helpers/helpers.go:188
↓ 2 callersFunctionprocessMessage
(starx, msg)
examples/demo/chat/web/starx-wsclient.js:493
↓ 2 callersMethodprocessMessage
(a *agent.Agent, msg *message.Message)
service/handler.go:278
↓ 2 callersMethodreadPackets
(buf *bytes.Buffer)
client/client.go:259
↓ 2 callersMethodremoteProcess
all remote method 所有远程方法调用的反射信息 处理rpc调用根据消息类型进行回复,此处可以是client发送给后端服务器的消息 前端服务器进行的一个转发 转发使用rpc调用
service/remote.go:91
↓ 2 callersFunctionreply
(code int32, msg string)
examples/demo/cluster_protobuf/services/room.go:69
↓ 2 callersMethodreportChannelSize
()
agent/agent.go:493
↓ 2 callersFunctionreportJobsTotal
(r metrics.Reporter, failed, processed int)
worker/report.go:46
↓ 2 callersMethodreportMetrics
()
cluster/nats_rpc_server.go:368
↓ 2 callersFunctionreportQueueSizes
(r metrics.Reporter, queues map[string]string)
worker/report.go:32
↓ 2 callersFunctionresetPipelines
()
pipeline_test.go:31
↓ 2 callersFunctionroutable
(t Type)
conn/message/message.go:132
↓ 2 callersFunctionsendMessage
(reqId, route, msg)
examples/demo/chat/web/starx-wsclient.js:385
↓ 2 callersMethodsendMsg
sendMsg sends the request to the server
client/client.go:406
↓ 2 callersMethodsendRequestToFront
(ctx context.Context, route string, includeData bool)
session/session.go:670
↓ 2 callersFunctionserializeReturn
(ser serialize.Serializer, ret interface{})
service/util.go:126
↓ 2 callersMethodserve
(upgrader *websocket.Upgrader)
acceptor/ws_acceptor.go:149
↓ 2 callersMethodserve
()
acceptor/tcp_acceptor.go:115
↓ 2 callersMethodsessionID
SessionID returns the session id
session/session.go:109
↓ 2 callersFunctionshutdownComponents
()
component.go:84
↓ 2 callersFunctionshutdownModules
shutdownModules starts all modules in reverse order
module.go:113
↓ 2 callersFunctionstartDefaultRPCClient
startDefaultRPCClient 设置默认的Nats作为rpc client
app.go:321
↓ 2 callersFunctionstartDefaultRPCServer
startDefaultRPCServer 设置默认的Nats作为rpc server
app.go:311
↓ 2 callersFunctionstartDefaultSD
startDefaultSD 设置默认的服务发现客户端 etcd
app.go:297
↓ 2 callersMethodsubscribeToBindingsChannel
()
cluster/nats_rpc_server.go:150
↓ 2 callersMethodsubscribeToUserKickChannel
subscribeToUserKickChannel 订阅提出玩家的主题
cluster/nats_rpc_server.go:156
↓ 2 callersMethodsubscribeToUserMessages
subscribeToUserKickChannel 订阅推送到玩家的主题
cluster/nats_rpc_server.go:169
↓ 2 callersFunctiontestCount
(gs GroupService, t *testing.T)
groups/group_service_test.go:279
↓ 2 callersFunctiontestCreateDuplicatedGroup
(gs GroupService, t *testing.T)
groups/group_service_test.go:58
↓ 2 callersFunctiontestCreateGroup
(gs GroupService, t *testing.T)
groups/group_service_test.go:68
↓ 2 callersFunctiontestCreateGroupWithTTL
(gs GroupService, t *testing.T)
groups/group_service_test.go:80
↓ 2 callersFunctiontestDelete
(gs GroupService, t *testing.T)
groups/group_service_test.go:197
↓ 2 callersFunctiontestGroupAddDuplicatedMember
(gs GroupService, t *testing.T)
groups/group_service_test.go:121
↓ 2 callersFunctiontestGroupAddMember
(gs GroupService, t *testing.T)
groups/group_service_test.go:92
↓ 2 callersFunctiontestGroupContainsMember
(gs GroupService, t *testing.T)
groups/group_service_test.go:133
↓ 2 callersFunctiontestMembers
(gs GroupService, t *testing.T)
groups/group_service_test.go:313
↓ 2 callersFunctiontestRemove
(gs GroupService, t *testing.T)
groups/group_service_test.go:164
↓ 2 callersFunctiontestRemoveAll
(gs GroupService, t *testing.T)
groups/group_service_test.go:238
↓ 2 callersMethodtoMap
()
docgenerator/generator.go:77
↓ 2 callersFunctionunmarshalHandlerArg
根据component.Handler中参数的去反序列化消息
service/util.go:56
↓ 2 callersMethodwaitForData
Wait for new messages from the server or the connection end. If the menssage has a response.Route, it decodes based on it. If not, it will try to deco
client/protoclient.go:363
↓ 2 callersMethodwriteLockScope
加锁执行f
cluster/etcd_service_discovery.go:258
↓ 1 callersFunctionAddGRPCInfoToMetadata
AddGRPCInfoToMetadata adds host, external host and port into metadata
app.go:617
↓ 1 callersMethodAddListener
(listener SDListener)
cluster/service_discovery.go:33
↓ 1 callersFunctionAddMetricTagsToPropagateCtx
AddMetricTagsToPropagateCtx adds a key and metric tags that will be propagated through RPC calls. Use the same tags that are at 'pitaya.metrics.additi
app.go:576
↓ 1 callersMethodAddServer
AddServer is called when a new server is discovered 当有新的服务器加入的时候新建一个grpcclient连接他,并且保存serverid和grpcclient
cluster/grpc_rpc_client.go:237
↓ 1 callersMethodBeforeShutdown
()
component/component.go:27
↓ 1 callersMethodBroadcastSessionBind
BroadcastSessionBind sends the binding information to other servers that may br interested in this info
cluster/nats_rpc_client.go:91
↓ 1 callersMethodCheck
(now time.Time)
timer/timer.go:63
↓ 1 callersMethodClose
Close closes the remote
agent/agent_remote.go:157
↓ 1 callersMethodDecode
Decode decode the network bytes slice to packet.Packet(s)
conn/codec/pomelo_packet_decoder.go:55
↓ 1 callersMethodDisconnect
Disconnect the client
client/protoclient.go:353
↓ 1 callersMethodDispatch
Dispatch message to corresponding logic handler app启动的时候启动多个goroutine调用Dispatch来处理消息和定时任务
service/handler.go:119
↓ 1 callersMethodDoRPC
DoRPC do rpc and get answer 调用指定id服务器的rpc
service/remote.go:194
↓ 1 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use
cluster/mocks/cluster.go:285
↓ 1 callersMethodEnqueueRPC
EnqueueRPC enqueues rpc job to worker
worker/worker.go:84
↓ 1 callersMethodEnqueueRPCWithOptions
EnqueueRPCWithOptions enqueues rpc job to worker
worker/worker.go:99
↓ 1 callersMethodError
()
errors/errors.go:66
↓ 1 callersFunctionExtractSpan
ExtractSpan retrieves an opentracing span context from the given context The span context can be received directly or via an RPC call
app.go:595
↓ 1 callersFunctionFileExists
FileExists tells if a file exists
util/util.go:118
↓ 1 callersMethodFloat32
Float32 returns the value associated with the key as a float32.
session/session.go:577
↓ 1 callersMethodFloat64
Float64 returns the value associated with the key as a float64.
session/session.go:594
↓ 1 callersMethodGauge
(name string, value float64, tags []string, rate float64)
metrics/statsd_reporter.go:35
← previousnext →401–500 of 1,948, ranked by callers