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
↓ 11 callers
Function
memberKey
(groupName, uid string)
groups/etcd_group_service.go:71
↓ 10 callers
Method
Call
(ctx context.Context, in *Request, opts ...grpc.CallOption)
protos/pitaya.pb.go:38
↓ 10 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
worker/mocks/rpc_job.go:33
↓ 10 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
cluster/mocks/cluster.go:114
↓ 10 callers
Function
GetMetricsReporters
GetMetricsReporters gets registered metrics reporters
app.go:241
↓ 10 callers
Function
NewError
NewError ctor
errors/errors.go:47
↓ 10 callers
Function
NewMockReporter
NewMockReporter creates a new mock instance
metrics/mocks/reporter.go:25
↓ 10 callers
Function
NewService
NewService creates a new service
component/service.go:66
↓ 10 callers
Method
Write
Write mocks base method
mocks/net.go:99
↓ 10 callers
Method
shouldRateLimit
shouldRateLimit saves the now as time taken or returns an error if in the limit of rate limiting
acceptorwrapper/rate_limiter.go:94
↓ 9 callers
Method
GetBool
GetBool returns an boolean from the inner config
config/config.go:148
↓ 9 callers
Method
GetServersByType
(serverType string)
cluster/service_discovery.go:29
↓ 9 callers
Function
NewPomeloPacketDecoder
NewPomeloPacketDecoder returns a new decoder that used for decode network bytes slice.
conn/codec/pomelo_packet_decoder.go:35
↓ 9 callers
Function
NewRemote
NewRemote create new Remote instance
agent/agent_remote.go:58
↓ 9 callers
Function
NewTimer
NewTimer creates a cron job
timer/timer.go:97
↓ 9 callers
Method
PushBack
PushBack should not be used after pitaya is running
pipeline/pipeline.go:59
↓ 9 callers
Function
Shutdown
Shutdown send a signal to let 'pitaya' shutdown itself.
app.go:539
↓ 9 callers
Method
Stop
Stop stops the acceptor
acceptor/ws_acceptor.go:161
↓ 9 callers
Method
String
()
examples/demo/cluster_protobuf/protos/cluster.pb.go:163
↓ 9 callers
Method
Value
Value returns the value associated with the key as a interface{}.
session/session.go:628
↓ 9 callers
Function
getChannel
(serverType, serverID string)
cluster/nats_rpc_common.go:30
↓ 9 callers
Function
getClients
(n, port int)
benchmark/benchmark_test.go:34
↓ 8 callers
Function
ExtractSpan
ExtractSpan retrieves an opentracing span context from the given context.Context The span context can be received directly (inside the context) or via
tracing/span.go:53
↓ 8 callers
Method
GetAddr
GetAddr returns the addr the acceptor will listen on
acceptor/tcp_acceptor.go:62
↓ 8 callers
Method
GetConnChan
GetConnChan gets a connection channel
acceptor/ws_acceptor.go:73
↓ 8 callers
Function
GetDefaultLoggerFromCtx
GetDefaultLoggerFromCtx returns the default logger from the given context
app.go:564
↓ 8 callers
Function
GetUserKickTopic
GetUserKickTopic get the topic for kicking an user
cluster/nats_rpc_server.go:120
↓ 8 callers
Method
GroupContainsMember
(ctx context.Context, groupName, uid string)
groups/group_service.go:12
↓ 8 callers
Method
OnClose
OnClose adds the function it receives to the callbacks that will be called when the session is closed
session/session.go:333
↓ 8 callers
Method
PushFront
PushFront should not be used after pitaya is running
pipeline/pipeline.go:51
↓ 8 callers
Function
RegisterModule
RegisterModule registers a module, by default it register after registered modules
module.go:43
↓ 8 callers
Function
SerializeOrRaw
SerializeOrRaw serializes the interface if its not an array of bytes already
util/util.go:105
↓ 8 callers
Method
SetData
SetData sets the whole session data
session/session.go:247
↓ 8 callers
Method
Stop
()
acceptor/acceptor.go:31
↓ 8 callers
Method
bootstrapServer
bootstrapServer 启动服务
cluster/etcd_service_discovery.go:226
↓ 8 callers
Method
grantLease
grantLease创建租约并且续租同时监听续租的相应管道
cluster/etcd_service_discovery.go:191
↓ 8 callers
Function
mustConnectToWS
(t *testing.T, write []byte, w *WSAcceptor, protocol string)
acceptor/ws_acceptor_test.go:78
↓ 7 callers
Method
Clear
Clear releases all data related to current session
session/session.go:648
↓ 7 callers
Function
Decode
Decode decodes the route
route/route.go:65
↓ 7 callers
Function
GetServer
GetServer gets the local server instance
app.go:272
↓ 7 callers
Method
GetStatus
GetStatus gets the status
agent/agent.go:242
↓ 7 callers
Function
GetUserMessagesTopic
GetUserMessagesTopic get the topic for user
cluster/nats_rpc_server.go:115
↓ 7 callers
Function
GroupContainsMember
GroupContainsMember checks whether an UID is contained in group or not
group.go:84
↓ 7 callers
Function
GroupCountMembers
GroupCountMembers get current member amount in group
group.go:112
↓ 7 callers
Method
Init
Init inits nats rpc client
cluster/nats_rpc_client.go:204
↓ 7 callers
Method
ListenAndServe
ListenAndServe listens and serve in the specified addr
acceptor/ws_acceptor.go:104
↓ 7 callers
Function
NewEtcdServiceDiscovery
NewEtcdServiceDiscovery ctor
cluster/etcd_service_discovery.go:80
↓ 7 callers
Function
NewGRPCServer
NewGRPCServer constructor
cluster/grpc_rpc_server.go:44
↓ 7 callers
Function
NewStatsdReporter
NewStatsdReporter returns an instance of statsd reportar and an error if something fails
metrics/statsd_reporter.go:48
↓ 7 callers
Method
PushToUser
(ctx context.Context, in *Push, opts ...grpc.CallOption)
protos/pitaya.pb.go:39
↓ 7 callers
Method
Register
Register registers components
service/remote.go:244
↓ 7 callers
Method
SetStatus
SetStatus sets the agent status
agent/agent.go:263
↓ 7 callers
Function
StartSpan
StartSpan starts a new span with a given parent context, operation name, tags and optional parent span. It returns a context with the created span.
tracing/span.go:95
↓ 7 callers
Method
String
()
conn/message/message.go:179
↓ 7 callers
Function
WriteFile
WriteFile test helper
helpers/helpers.go:73
↓ 7 callers
Function
copyArray
(dest, doffset, src, soffset, length)
examples/demo/chat/web/protocol.js:263
↓ 7 callers
Function
getRPCClient
(c *config.Config)
cluster/grpc_rpc_client_test.go:25
↓ 6 callers
Function
AddTimer
AddTimer adds a timer to the manager
timer/timer.go:87
↓ 6 callers
Method
Close
Close closes the agent, cleans inner state and closes low-level connection. Any blocked Read or Write operations will be unblocked and return errors.
agent/agent.go:203
↓ 6 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
conn/codec/mocks/packet_encoder.go:32
↓ 6 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
cluster/mocks/service_discovery.go:32
↓ 6 callers
Method
GetArgReply
GetArgReply returns the arg and reply of the method
worker/rpc_job.go:49
↓ 6 callers
Method
GetDataEncoded
GetDataEncoded returns the session data as an encoded value
session/session.go:256
↓ 6 callers
Method
GetUserFrontendID
(uid, frontendType string)
interfaces/interfaces.go:33
↓ 6 callers
Function
GroupMembers
GroupMembers returns all member's UIDs
group.go:59
↓ 6 callers
Method
Info
(args ...interface{})
logger/logger.go:41
↓ 6 callers
Function
InitGroups
InitGroups should be called once at the beginning of the application to setup the service type that will manage the groups
group.go:42
↓ 6 callers
Method
KickUser
(ctx context.Context, in *KickMsg, opts ...grpc.CallOption)
protos/pitaya.pb.go:41
↓ 6 callers
Function
NewMemoryGroupService
NewMemoryGroupService returns a new group instance
groups/memory_group_service.go:30
↓ 6 callers
Function
NewMockSerializer
NewMockSerializer creates a new mock instance
serialize/mocks/serializer.go:24
↓ 6 callers
Function
RegisterModuleBefore
RegisterModuleBefore registers a module before all registered modules
module.go:63
↓ 6 callers
Method
ResponseMID
(ctx context.Context, mid uint, v interface{}, isError ...bool)
session/session.go:42
↓ 6 callers
Method
SendPush
(userID string, frontendSv *Server, push *protos.Push)
cluster/cluster.go:46
↓ 6 callers
Function
SendPushToUsers
SendPushToUsers sends a message to the given list of users SendPushToUsers 发送一个消息到所有的用户 通过session或者rcp调用主要依赖本地server是否制定的frontendType
push.go:34
↓ 6 callers
Method
SessionBindRemote
(ctx context.Context, in *BindMsg, opts ...grpc.CallOption)
protos/pitaya.pb.go:40
↓ 6 callers
Function
getKey
getKey 类型和id组装成key servers/serverType/serverID
cluster/etcd_service_discovery.go:290
↓ 5 callers
Function
AddRoute
AddRoute adds a routing function to a server type AddRoute 添加路由策略到路由其中
app.go:523
↓ 5 callers
Method
AnswerWithError
AnswerWithError answers with an error
agent/agent.go:436
↓ 5 callers
Method
BindSession
BindSession binds the local session
remote/sys.go:38
↓ 5 callers
Function
Cron
Cron executes scheduled tasks TODO: if closing Timers'count in single cron call more than timerBacklog will case problem.
timer/timer.go:147
↓ 5 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
protos/mocks/pitaya.go:34
↓ 5 callers
Method
Encode
message编码方式 消息头 ----------flag(1byte) --------------------------------------------------->message id(0~5byte)------>route(0~256byte) preserved(3bit) +
conn/message/message_encoder.go:71
↓ 5 callers
Method
ExtractHandler
ExtractHandler extract the set of methods from the receiver value which satisfy the following conditions: - exported method of exported type - one or
component/service.go:97
↓ 5 callers
Method
ExtractRemote
ExtractRemote extract the set of methods from the receiver value which satisfy the following conditions: - exported method of exported type - two retu
component/service.go:135
↓ 5 callers
Method
GetData
()
protos/msg.pb.go:99
↓ 5 callers
Method
GetName
()
serialize/serializer.go:41
↓ 5 callers
Method
GetRoute
()
protos/msg.pb.go:92
↓ 5 callers
Method
Handle
Handle handles the messages from and to a client
agent/agent.go:268
↓ 5 callers
Method
Init
Init inits nats rpc server
cluster/nats_rpc_server.go:313
↓ 5 callers
Method
ListenAndServe
()
acceptor/acceptor.go:30
↓ 5 callers
Function
NewSerializer
NewSerializer returns a new Serializer.
serialize/protobuf/protobuf.go:32
↓ 5 callers
Function
NewTimer
NewTimer returns a new Timer containing a function that will be called with a period specified by the duration argument. It adjusts the intervals for
timer.go:36
↓ 5 callers
Method
Send
Send publishes a message in a given topic
cluster/nats_rpc_client.go:104
↓ 5 callers
Function
SetDictionary
启用路由压缩 对于服务端,server会扫描所有的Handler信息 对于客户端,用户需要配置一个路由映射表 通过这两种方式,pitaya会拿到所有的客户端和服务端的路由信息,然后将每一个路由信息都映射为一个小整数, 在客户端与服务器建立连接的握手过程中,服务器会将 整个字典传给客户端, 这样在以后
conn/message/message.go:149
↓ 5 callers
Function
StartWorker
StartWorker configures, starts and returns pitaya worker
app.go:637
↓ 5 callers
Function
ToMap
ToMap returns the values that will be propagated through RPC calls in map[string]interface{} format
context/context.go:73
↓ 5 callers
Method
connect
--------------------grpcClient-------------------------------- connect连接指定server上的grpc server
cluster/grpc_rpc_client.go:318
↓ 5 callers
Function
processHandlerMessage
根据Route查找component.Handler利用反射机制调用handler,同时将消息和ctx作为参数
service/util.go:140
↓ 5 callers
Method
processPacket
(a *agent.Agent, p *packet.Packet)
service/handler.go:224
↓ 5 callers
Method
updateEncodedData
()
session/session.go:207
← previous
next →
101–200 of 1,948, ranked by callers