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
↓ 4 callers
Method
Count
(name string, value int64, tags []string, rate float64)
metrics/statsd_reporter.go:34
↓ 4 callers
Function
Decode
Decode unmarshal the bytes slice to a message See ref: https://github.com/topfreegames/pitaya/blob/master/docs/communication_protocol.md
conn/message/message_encoder.go:145
↓ 4 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
metrics/mocks/statsd_reporter.go:32
↓ 4 callers
Function
FromMap
FromMap creates a new context from a map with propagated values
context/context.go:85
↓ 4 callers
Function
GetBindBroadcastTopic
GetBindBroadcastTopic gets the topic on which bind events will be broadcasted
cluster/nats_rpc_server.go:125
↓ 4 callers
Method
GetData
GetData gets the data
session/session.go:239
↓ 4 callers
Function
GetErrorPayload
GetErrorPayload creates and serializes an error payload
util/util.go:138
↓ 4 callers
Function
GetSessionByID
GetSessionByID return a session bound to a frontend server id
session/session.go:145
↓ 4 callers
Method
GetStringSlice
GetStringSlice returns a string slice from the inner config
config/config.go:153
↓ 4 callers
Method
GetUid
()
protos/push.pb.go:61
↓ 4 callers
Method
GetUserId
()
protos/kick.pb.go:52
↓ 4 callers
Method
GroupCountMembers
(ctx context.Context, groupName string)
groups/group_service.go:13
↓ 4 callers
Function
GroupRemoveMember
GroupRemoveMember removes specified UID from group
group.go:101
↓ 4 callers
Function
InflateData
(data []byte)
util/compression/compression.go:20
↓ 4 callers
Method
Init
Init inits grpc rpc server 在grpc中注册我们的服务实现并且启动监听开始grpc服务
cluster/grpc_rpc_server.go:55
↓ 4 callers
Function
NewConfigInfoRetriever
NewConfigInfoRetriever returns a *ConfigInfoRetriever
cluster/config_info_retriever.go:12
↓ 4 callers
Function
NewCountTimer
NewCountTimer returns a new Timer containing a function that will be called with a period specified by the duration argument. After count times, timer
timer.go:45
↓ 4 callers
Function
NewGRPCClient
NewGRPCClient returns a new instance of GRPCClient
cluster/grpc_rpc_client.go:59
↓ 4 callers
Function
NewRateLimiter
NewRateLimiter returns an initialized *RateLimiting
acceptorwrapper/rate_limiter.go:52
↓ 4 callers
Function
OKResponse
OKResponse returns a response with code 200
examples/demo/custom_metrics/messages/responses.go:9
↓ 4 callers
Function
OnSessionBind
OnSessionBind adds a method to be called when a session is bound same function cannot be added twice! 添加sessionbind的回调方法
session/session.go:156
↓ 4 callers
Method
PushToFront
PushToFront updates the session in the frontend
session/session.go:640
↓ 4 callers
Function
RPC
RPC calls a method in a different server RPC 调用 路由信息 replay rpc调用回复 arg rpc调用参数
rpc.go:35
↓ 4 callers
Method
RPC
RPC executes the RPC It is expected that if serverID is "" the RPC happens to any destiny server
worker/rpc_job.go:41
↓ 4 callers
Method
Read
Read mocks base method
mocks/net.go:86
↓ 4 callers
Method
Register
Register registers components 将组件Component中的复合Handler的方法遍历处理按照路由名字生成一个map放入HandleServices 一个组件生成一个Service存储组件本身和组件中handler的反射信息 同时将组件名字和service关联 且记录所
service/handler.go:149
↓ 4 callers
Function
RegisterModuleAfter
RegisterModuleAfter registers a module after all registered modules
module.go:48
↓ 4 callers
Function
RegisterRPCJob
RegisterRPCJob registers rpc job to execute jobs with retries
app.go:650
↓ 4 callers
Method
ResponseMID
ResponseMID implementation for session.NetworkEntity interface Respond message to session
agent/agent.go:170
↓ 4 callers
Method
SendNotify
(route string, data []byte)
client/pitayaclient.go:31
↓ 4 callers
Method
SendRequest
(route string, data []byte)
client/pitayaclient.go:32
↓ 4 callers
Method
ServerDiscovery
ServerDiscovery returns a serverID based on the route and any metadata that is necessary to decide
worker/rpc_job.go:33
↓ 4 callers
Method
SetCondition
SetCondition sets the condition used for verifying when the cron job should run
timer/timer.go:115
↓ 4 callers
Function
SetDictionary
SetDictionary sets routes map
app.go:514
↓ 4 callers
Method
SetPitayaServer
SetPitayaServer sets the pitaya server 设置grpc具体实现的服务接口 基本上都是remoteService
cluster/grpc_rpc_server.go:73
↓ 4 callers
Function
SetRPCClient
SetRPCClient to be used 设置rpc client
app.go:251
↓ 4 callers
Function
SetRPCServer
SetRPCServer to be used 设置rpc sercer
app.go:246
↓ 4 callers
Function
SetServiceDiscoveryClient
SetServiceDiscoveryClient to be used 设置服务发现客户端
app.go:256
↓ 4 callers
Method
Shutdown
结束之前
interfaces/interfaces.go:28
↓ 4 callers
Method
Stop
Stop stops the acceptor
acceptor/tcp_acceptor.go:75
↓ 4 callers
Method
String
()
examples/testing/protos/cluster.pb.go:30
↓ 4 callers
Method
String
()
agent/agent_test.go:54
↓ 4 callers
Function
buildRequest
( ctx context.Context, rpcType protos.RPCType, route *route.Route, session *session.Session, msg *message
cluster/cluster.go:80
↓ 4 callers
Function
checkReportErr
(metric string, err error)
worker/report.go:60
↓ 4 callers
Function
executeAfterPipeline
(ctx context.Context, res interface{}, err error)
service/util.go:116
↓ 4 callers
Function
executeBeforePipeline
对参数进行一些列的管道函数处理
service/util.go:101
↓ 4 callers
Function
getCtxWithRequestKeys
()
agent/agent_test.go:62
↓ 4 callers
Method
getUserKickChannel
()
cluster/nats_rpc_server.go:233
↓ 4 callers
Method
heartbeat
()
agent/agent.go:301
↓ 4 callers
Function
pexec
execute job function with protection
timer/timer.go:135
↓ 4 callers
Function
resetComps
()
component_test.go:44
↓ 4 callers
Function
resetModules
()
module_test.go:40
↓ 4 callers
Function
send
(packet)
examples/demo/chat/web/starx-wsclient.js:401
↓ 4 callers
Method
send
发送消息
agent/agent.go:140
↓ 3 callers
Function
AddMetricsReporter
AddMetricsReporter to be used
app.go:292
↓ 3 callers
Method
AddRemoteBindingListener
AddRemoteBindingListener adds a listener
service/remote.go:123
↓ 3 callers
Method
AddRoute
AddRoute adds a routing function to a server type 指定类型添加一个路由函数
router/router.go:114
↓ 3 callers
Method
AddServer
(*Server)
cluster/cluster.go:55
↓ 3 callers
Function
AddToPropagateCtx
上下文 多goroutine共享数据和多goroutine管理机制 type Context interface { Deadline() (deadline time.Time, ok bool) Done() <-chan struct{} Err() error Value(key inte
context/context.go:57
↓ 3 callers
Method
AsJSONString
AsJSONString returns the server as a json string
cluster/server.go:59
↓ 3 callers
Function
BeforeHandler
BeforeHandler pushs a function to the back of the functions pipeline that will be executed before the handler method
pipeline.go:27
↓ 3 callers
Method
BeforeShutdown
初始化之后
interfaces/interfaces.go:27
↓ 3 callers
Method
Clear
Clear should not be used after pitaya is running
pipeline/pipeline.go:64
↓ 3 callers
Function
Decode
Decode returns a context given a binary encoded message
context/context.go:99
↓ 3 callers
Method
Decode
(data []byte)
conn/codec/packet_decoder.go:28
↓ 3 callers
Function
DeflateData
(data []byte)
util/compression/compression.go:9
↓ 3 callers
Method
Disconnect
Disconnect disconnects the client
client/client.go:323
↓ 3 callers
Function
Documentation
Documentation returns handler and remotes documentacion
app.go:600
↓ 3 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
protos/mocks/pitaya.go:129
↓ 3 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
interfaces/mocks/interfaces.go:98
↓ 3 callers
Method
GetConnChan
()
acceptor/acceptor.go:33
↓ 3 callers
Method
GetConnChan
GetConnChan gets a connection channel
acceptor/tcp_acceptor.go:70
↓ 3 callers
Function
GetFromPropagateCtx
GetFromPropagateCtx get a value from the propagate
context/context.go:64
↓ 3 callers
Method
GetMsg
()
examples/demo/cluster_protobuf/protos/cluster.pb.go:193
↓ 3 callers
Method
GetUnhandledRequestsChannel
GetUnhandledRequestsChannel gets the unhandled requests channel from nats rpc server
cluster/nats_rpc_server.go:225
↓ 3 callers
Method
GroupRemoveAll
(ctx context.Context, groupName string)
groups/group_service.go:18
↓ 3 callers
Method
GroupRenewTTL
(ctx context.Context, groupName string)
groups/group_service.go:20
↓ 3 callers
Function
HandlersDocs
HandlersDocs returns a map from route to input and output
docgenerator/generator.go:46
↓ 3 callers
Method
Init
()
component/component.go:25
↓ 3 callers
Method
Init
()
interfaces/interfaces.go:25
↓ 3 callers
Function
InjectSpan
InjectSpan retrieves an opentrancing span from the current context and creates a new context with it encoded in binary format inside the propagatable
tracing/span.go:79
↓ 3 callers
Function
NewBinary
NewBinary creates a new binary module with the given path
modules/binary.go:45
↓ 3 callers
Function
NewMockConn
NewMockConn creates a new mock instance
mocks/net.go:74
↓ 3 callers
Function
Pcall
Pcall calls a method that returns an interface and an error and recovers in case of panic
util/util.go:64
↓ 3 callers
Method
Push
Push implementation for session.NetworkEntity interface
agent/agent.go:152
↓ 3 callers
Function
RPCTo
RPCTo send a rpc to a specific server RPC 调用指定server 路由信息 replay rpc调用回复 arg rpc调用参数
rpc.go:41
↓ 3 callers
Function
RemotesDocs
RemotesDocs returns a map from route to input and output
docgenerator/generator.go:62
↓ 3 callers
Function
ReportMessageProcessDelayFromCtx
ReportMessageProcessDelayFromCtx reports the delay to process the messages
metrics/report.go:58
↓ 3 callers
Method
SendKick
(userID string, serverType string, kick *protos.KickMsg)
cluster/cluster.go:47
↓ 3 callers
Function
SendKickToUsers
SendKickToUsers sends kick to an user array
kick.go:33
↓ 3 callers
Method
SetDataEncoded
SetDataEncoded sets the whole session data from an encoded value
session/session.go:261
↓ 3 callers
Method
SetPitayaServer
SetPitayaServer sets the pitaya server
cluster/nats_rpc_server.go:146
↓ 3 callers
Function
SetTimerBacklog
SetTimerBacklog set the timer created/closing channel backlog, A small backlog may cause the logic to be blocked when call NewTimer/NewCountTimer/time
timer/timer.go:186
↓ 3 callers
Method
Start
Start starts worker in another gorotine
worker/worker.go:73
↓ 3 callers
Method
TimeInMilliseconds
(name string, value float64, tags []string, rate float64)
metrics/statsd_reporter.go:36
↓ 3 callers
Method
Uint64
Uint64 returns the value associated with the key as a uint64.
session/session.go:560
↓ 3 callers
Method
addServer
addServer 将Server存入serverMapByID(map[id]*Server) 和 serverMapByType(map[type]map[id]*Server)
cluster/etcd_service_discovery.go:508
↓ 3 callers
Method
addServerIntoEtcd
服务注册 将Server的type和id组装成key 序列化信息做为value将 kv写入etcd
cluster/etcd_service_discovery.go:215
↓ 3 callers
Method
defaultRoute
默认的路由是随机返回一台cluster.Server
router/router.go:64
↓ 3 callers
Method
deleteServer
根据id删除本地的server信息记录
cluster/etcd_service_discovery.go:265
← previous
next →
201–300 of 1,948, ranked by callers