Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bytemode/pitaya-notes
/ functions
Functions
1,948 in github.com/bytemode/pitaya-notes
⨍
Functions
1,948
◇
Types & classes
272
↓ 2 callers
Method
Validate
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 callers
Method
ValidateMessageType
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 callers
Function
alreadyRegistered
(name string)
module.go:87
↓ 2 callers
Method
bootstrapLease
()
modules/binding_storage.go:145
↓ 2 callers
Method
buildPacket
(msg message.Message)
client/client.go:392
↓ 2 callers
Method
call
(ctx context.Context, req *protos.Request)
cluster/grpc_rpc_client.go:362
↓ 2 callers
Function
connect
(params, url, cb)
examples/demo/chat/web/starx-wsclient.js:289
↓ 2 callers
Method
createGroup
(ctx context.Context, groupName string, leaseID clientv3.LeaseID)
groups/etcd_group_service.go:89
↓ 2 callers
Method
deleteLocalInvalidServers
(actualServers []string)
cluster/etcd_service_discovery.go:278
↓ 2 callers
Function
docForMethod
(method reflect.Method, getPtrNames bool)
docgenerator/generator.go:90
↓ 2 callers
Function
docForType
(typ reflect.Type, isOutput bool, getPtrNames bool)
docgenerator/generator.go:117
↓ 2 callers
Method
enqueueOptions
( opts *EnqueueOpts, )
worker/worker.go:172
↓ 2 callers
Function
getEncodedEmptyMap
()
session/session_test.go:59
↓ 2 callers
Function
getGroupKV
(ctx context.Context, groupName string)
groups/etcd_group_service.go:75
↓ 2 callers
Function
getMsgType
(msgTypeIface interface{})
service/util.go:88
↓ 2 callers
Function
getName
(field reflect.StructField, isOutput bool)
docgenerator/generator.go:165
↓ 2 callers
Function
getOutputInputNames
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 callers
Method
getServerHost
(sv *Server)
cluster/grpc_rpc_client.go:286
↓ 2 callers
Function
getTags
(ctx context.Context, tags map[string]string)
metrics/report.go:119
↓ 2 callers
Method
handleHandshake
()
client/client.go:370
↓ 2 callers
Method
handleMessages
handleMessages 处理主题chan上的消息
cluster/nats_rpc_server.go:185
↓ 2 callers
Method
handleRPCSys
handleRPCSys系统rpc 调用的是本地消息
service/remote.go:382
↓ 2 callers
Method
handleRPCUser
(ctx context.Context, req *protos.Request, rt *route.Route)
service/remote.go:302
↓ 2 callers
Function
initLogger
()
logger/logger.go:53
↓ 2 callers
Function
initSysRemotes
初始化注册一个远端组件
app.go:331
↓ 2 callers
Function
invalidType
(t Type)
conn/message/message.go:136
↓ 2 callers
Function
isFunction
(f interface{})
helpers/type_support.go:5
↓ 2 callers
Function
isHandlerMethod
isHandlerMethod decide a method is suitable handler method 如果是符合本地消息响应的类型Handler类型的方法则返回true 有一个或者两个参数 第一个是context.Context 第二个是[]byte or ptr 有0个或者两个返回
component/method.go:98
↓ 2 callers
Function
isRemoteMethod
isRemoteMethod decide a method is suitable remote method 是rpc过程调用的方法类型 带参数或者不带参数 类型必须是proto.Message类型类型的指针 返回值必须是proto.Message类型指针和error
component/method.go:52
↓ 2 callers
Method
localProcess
处理本地
service/handler.go:328
↓ 2 callers
Function
newProto
Return the basic structure for the ProtoClient struct.
client/protoclient.go:285
↓ 2 callers
Method
notifyListeners
notifyListeners 添加删除服务器时进行监听通知
cluster/etcd_service_discovery.go:247
↓ 2 callers
Function
parseEtcdKey
(key string)
cluster/etcd_service_discovery.go:403
↓ 2 callers
Function
parseServer
(value []byte)
cluster/etcd_service_discovery.go:413
↓ 2 callers
Function
parseType
(typ reflect.Type, isOutput bool, getPtrNames bool)
docgenerator/generator.go:178
↓ 2 callers
Method
parsedRPCJob
(rpcJob RPCJob)
worker/worker.go:125
↓ 2 callers
Method
pendingRequestsReaper
pendingRequestsReaper delete timedout requests
client/client.go:190
↓ 2 callers
Function
pollFuncReturn
(f interface{})
helpers/helpers.go:188
↓ 2 callers
Function
processMessage
(starx, msg)
examples/demo/chat/web/starx-wsclient.js:493
↓ 2 callers
Method
processMessage
(a *agent.Agent, msg *message.Message)
service/handler.go:278
↓ 2 callers
Method
readPackets
(buf *bytes.Buffer)
client/client.go:259
↓ 2 callers
Method
remoteProcess
all remote method 所有远程方法调用的反射信息 处理rpc调用根据消息类型进行回复,此处可以是client发送给后端服务器的消息 前端服务器进行的一个转发 转发使用rpc调用
service/remote.go:91
↓ 2 callers
Function
reply
(code int32, msg string)
examples/demo/cluster_protobuf/services/room.go:69
↓ 2 callers
Method
reportChannelSize
()
agent/agent.go:493
↓ 2 callers
Function
reportJobsTotal
(r metrics.Reporter, failed, processed int)
worker/report.go:46
↓ 2 callers
Method
reportMetrics
()
cluster/nats_rpc_server.go:368
↓ 2 callers
Function
reportQueueSizes
(r metrics.Reporter, queues map[string]string)
worker/report.go:32
↓ 2 callers
Function
resetPipelines
()
pipeline_test.go:31
↓ 2 callers
Function
routable
(t Type)
conn/message/message.go:132
↓ 2 callers
Function
sendMessage
(reqId, route, msg)
examples/demo/chat/web/starx-wsclient.js:385
↓ 2 callers
Method
sendMsg
sendMsg sends the request to the server
client/client.go:406
↓ 2 callers
Method
sendRequestToFront
(ctx context.Context, route string, includeData bool)
session/session.go:670
↓ 2 callers
Function
serializeReturn
(ser serialize.Serializer, ret interface{})
service/util.go:126
↓ 2 callers
Method
serve
(upgrader *websocket.Upgrader)
acceptor/ws_acceptor.go:149
↓ 2 callers
Method
serve
()
acceptor/tcp_acceptor.go:115
↓ 2 callers
Method
sessionID
SessionID returns the session id
session/session.go:109
↓ 2 callers
Function
shutdownComponents
()
component.go:84
↓ 2 callers
Function
shutdownModules
shutdownModules starts all modules in reverse order
module.go:113
↓ 2 callers
Function
startDefaultRPCClient
startDefaultRPCClient 设置默认的Nats作为rpc client
app.go:321
↓ 2 callers
Function
startDefaultRPCServer
startDefaultRPCServer 设置默认的Nats作为rpc server
app.go:311
↓ 2 callers
Function
startDefaultSD
startDefaultSD 设置默认的服务发现客户端 etcd
app.go:297
↓ 2 callers
Method
subscribeToBindingsChannel
()
cluster/nats_rpc_server.go:150
↓ 2 callers
Method
subscribeToUserKickChannel
subscribeToUserKickChannel 订阅提出玩家的主题
cluster/nats_rpc_server.go:156
↓ 2 callers
Method
subscribeToUserMessages
subscribeToUserKickChannel 订阅推送到玩家的主题
cluster/nats_rpc_server.go:169
↓ 2 callers
Function
testCount
(gs GroupService, t *testing.T)
groups/group_service_test.go:279
↓ 2 callers
Function
testCreateDuplicatedGroup
(gs GroupService, t *testing.T)
groups/group_service_test.go:58
↓ 2 callers
Function
testCreateGroup
(gs GroupService, t *testing.T)
groups/group_service_test.go:68
↓ 2 callers
Function
testCreateGroupWithTTL
(gs GroupService, t *testing.T)
groups/group_service_test.go:80
↓ 2 callers
Function
testDelete
(gs GroupService, t *testing.T)
groups/group_service_test.go:197
↓ 2 callers
Function
testGroupAddDuplicatedMember
(gs GroupService, t *testing.T)
groups/group_service_test.go:121
↓ 2 callers
Function
testGroupAddMember
(gs GroupService, t *testing.T)
groups/group_service_test.go:92
↓ 2 callers
Function
testGroupContainsMember
(gs GroupService, t *testing.T)
groups/group_service_test.go:133
↓ 2 callers
Function
testMembers
(gs GroupService, t *testing.T)
groups/group_service_test.go:313
↓ 2 callers
Function
testRemove
(gs GroupService, t *testing.T)
groups/group_service_test.go:164
↓ 2 callers
Function
testRemoveAll
(gs GroupService, t *testing.T)
groups/group_service_test.go:238
↓ 2 callers
Method
toMap
()
docgenerator/generator.go:77
↓ 2 callers
Function
unmarshalHandlerArg
根据component.Handler中参数的去反序列化消息
service/util.go:56
↓ 2 callers
Method
waitForData
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 callers
Method
writeLockScope
加锁执行f
cluster/etcd_service_discovery.go:258
↓ 1 callers
Function
AddGRPCInfoToMetadata
AddGRPCInfoToMetadata adds host, external host and port into metadata
app.go:617
↓ 1 callers
Method
AddListener
(listener SDListener)
cluster/service_discovery.go:33
↓ 1 callers
Function
AddMetricTagsToPropagateCtx
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 callers
Method
AddServer
AddServer is called when a new server is discovered 当有新的服务器加入的时候新建一个grpcclient连接他,并且保存serverid和grpcclient
cluster/grpc_rpc_client.go:237
↓ 1 callers
Method
BeforeShutdown
()
component/component.go:27
↓ 1 callers
Method
BroadcastSessionBind
BroadcastSessionBind sends the binding information to other servers that may br interested in this info
cluster/nats_rpc_client.go:91
↓ 1 callers
Method
Check
(now time.Time)
timer/timer.go:63
↓ 1 callers
Method
Close
Close closes the remote
agent/agent_remote.go:157
↓ 1 callers
Method
Decode
Decode decode the network bytes slice to packet.Packet(s)
conn/codec/pomelo_packet_decoder.go:55
↓ 1 callers
Method
Disconnect
Disconnect the client
client/protoclient.go:353
↓ 1 callers
Method
Dispatch
Dispatch message to corresponding logic handler app启动的时候启动多个goroutine调用Dispatch来处理消息和定时任务
service/handler.go:119
↓ 1 callers
Method
DoRPC
DoRPC do rpc and get answer 调用指定id服务器的rpc
service/remote.go:194
↓ 1 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
cluster/mocks/cluster.go:285
↓ 1 callers
Method
EnqueueRPC
EnqueueRPC enqueues rpc job to worker
worker/worker.go:84
↓ 1 callers
Method
EnqueueRPCWithOptions
EnqueueRPCWithOptions enqueues rpc job to worker
worker/worker.go:99
↓ 1 callers
Method
Error
()
errors/errors.go:66
↓ 1 callers
Function
ExtractSpan
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 callers
Function
FileExists
FileExists tells if a file exists
util/util.go:118
↓ 1 callers
Method
Float32
Float32 returns the value associated with the key as a float32.
session/session.go:577
↓ 1 callers
Method
Float64
Float64 returns the value associated with the key as a float64.
session/session.go:594
↓ 1 callers
Method
Gauge
(name string, value float64, tags []string, rate float64)
metrics/statsd_reporter.go:35
← previous
next →
401–500 of 1,948, ranked by callers