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
↓ 1 callers
Method
Get
Get returns a key value
session/session.go:395
↓ 1 callers
Method
GetConnChan
GetConnChan returns the wrapper conn chan
acceptorwrapper/base.go:60
↓ 1 callers
Function
GetDieChan
GetDieChan gets the channel that the app sinalizes when its going to die
app.go:201
↓ 1 callers
Function
GetErrorFromPayload
GetErrorFromPayload gets the error from payload
util/util.go:124
↓ 1 callers
Function
GetFromPropagateCtx
GetFromPropagateCtx adds a key and value that came through RPC calls
app.go:589
↓ 1 callers
Method
GetMetadata
()
protos/error.pb.go:68
↓ 1 callers
Method
GetMsg
()
examples/testing/protos/cluster.pb.go:53
↓ 1 callers
Function
GetPrometheusReporter
GetPrometheusReporter gets the prometheus reporter singleton
metrics/prometheus_reporter.go:277
↓ 1 callers
Function
GetSerializer
GetSerializer gets the app serializer
app.go:267
↓ 1 callers
Function
GetServerByID
GetServerByID returns the server with the specified id
app.go:277
↓ 1 callers
Function
GetServersByType
GetServersByType get all servers of type
app.go:282
↓ 1 callers
Method
GetSession
()
protos/request.pb.go:86
↓ 1 callers
Method
GetType
()
protos/msg.pb.go:113
↓ 1 callers
Function
GroupCreateWithTTL
GroupCreateWithTTL creates a group with given TTL
group.go:54
↓ 1 callers
Function
GroupDelete
GroupDelete deletes whole group, including UIDs and base group
group.go:122
↓ 1 callers
Method
Handle
Handle handles messages from a conn app 启动之后 对每个acceptor上管道上传来的conn 创建一个agent然后读取数据成成消息写入消息管道
service/handler.go:174
↓ 1 callers
Method
HasKey
HasKey decides whether a key has associated value
session/session.go:386
↓ 1 callers
Method
Int16
Int16 returns the value associated with the key as a int16.
session/session.go:441
↓ 1 callers
Method
Int32
Int32 returns the value associated with the key as a int32.
session/session.go:458
↓ 1 callers
Method
Int64
Int64 returns the value associated with the key as a int64.
session/session.go:475
↓ 1 callers
Method
Int8
Int8 returns the value associated with the key as a int8.
session/session.go:424
↓ 1 callers
Function
IsCompressed
(data []byte)
util/compression/compression.go:30
↓ 1 callers
Method
IsCompressionEnabled
()
conn/message/message_encoder.go:31
↓ 1 callers
Method
Kick
Kick kicks the user
agent/agent_remote.go:92
↓ 1 callers
Method
Kick
Kick sends a kick packet to a client
agent/agent.go:247
↓ 1 callers
Method
KickUser
KickUser sends a kick to user
service/remote.go:178
↓ 1 callers
Method
ListenAndServe
ListenAndServe starts a goroutine that wraps acceptor's conn and calls acceptor's listenAndServe
acceptorwrapper/base.go:54
↓ 1 callers
Method
LocalAddr
LocalAddr returns the local network address.
acceptor/ws_acceptor.go:228
↓ 1 callers
Method
Marshal
Marshal returns the protobuf encoding of v.
serialize/protobuf/protobuf.go:37
↓ 1 callers
Method
Marshal
Marshal returns the JSON encoding of v.
serialize/json/json.go:36
↓ 1 callers
Function
New
New create a Packet instance.
conn/packet/packet.go:36
↓ 1 callers
Function
NewAfterTimer
NewAfterTimer returns a new Timer containing a function that will be called after duration that specified by the duration argument. The duration d mus
timer.go:63
↓ 1 callers
Function
NewBaseWrapper
把interface作为struct的一个匿名成员,就可以假设struct就是此成员interface的一个实现,而不管struct是否已经实现interface所定义的函数。 NewBaseWrapper returns an instance of BaseWrapper.
acceptorwrapper/base.go:45
↓ 1 callers
Function
NewCustomMetricsSpec
NewCustomMetricsSpec returns a *CustomMetricsSpec by reading config key
metrics/models.go:40
↓ 1 callers
Function
NewEnqueueOpts
NewEnqueueOpts reads from config to build *EnqueueOpts
worker/enqueue_opts.go:36
↓ 1 callers
Function
NewMetagameMock
NewMetagameMock ...
examples/demo/pipeline/main.go:21
↓ 1 callers
Function
NewMockAcceptor
NewMockAcceptor creates a new mock instance
mocks/acceptor.go:25
↓ 1 callers
Function
NewMockRPCJob
NewMockRPCJob creates a new mock instance
worker/mocks/rpc_job.go:26
↓ 1 callers
Function
NewMockServiceDiscovery
NewMockServiceDiscovery creates a new mock instance
cluster/mocks/service_discovery.go:25
↓ 1 callers
Function
NewPitayaClient
(cc *grpc.ClientConn)
protos/pitaya.pb.go:48
↓ 1 callers
Function
NewRoom
NewRoom returns a new room
examples/demo/cluster_grpc/services/room.go:76
↓ 1 callers
Function
NewRoom
NewRoom returns a Handler Base implementation
examples/demo/chat/main.go:56
↓ 1 callers
Function
NewRoom
NewRoom returns a new room
examples/demo/cluster_protobuf/services/room.go:46
↓ 1 callers
Function
NewRoom
NewRoom returns a new room
examples/demo/rate_limiting/services/room.go:15
↓ 1 callers
Function
NewRoom
NewRoom returns a new room
examples/demo/cluster/services/room.go:67
↓ 1 callers
Function
NewWorker
NewWorker configures and returns a *Worker
worker/worker.go:46
↓ 1 callers
Function
OnAfterSessionBind
OnAfterSessionBind adds a method to be called when session is bound and after all sessionBind callbacks
session/session.go:170
↓ 1 callers
Function
OnSessionClose
OnSessionClose adds a method that will be called when every session closes
session/session.go:183
↓ 1 callers
Method
Push
Push pushes the message to the user
agent/agent_remote.go:108
↓ 1 callers
Method
PushToUser
PushToUser sends a push to user
service/remote.go:162
↓ 1 callers
Method
PutBinding
PutBinding puts the binding info into etcd PutBinding 在etcd上存储bindings/frontedtype/uid : serverid
modules/binding_storage.go:77
↓ 1 callers
Method
RPC
RPC makes rpcs RPC或者RPCTo通过doRPC调用过来的 user rpc调用
service/remote.go:212
↓ 1 callers
Method
Read
Read reads data from the connection. Read can be made to time out and return an Error with Timeout() == true after a fixed time limit; see SetDeadline
acceptor/ws_acceptor.go:194
↓ 1 callers
Method
Region
Region gets server's region from config
cluster/config_info_retriever.go:19
↓ 1 callers
Method
Region
()
cluster/cluster.go:68
↓ 1 callers
Function
RegisterPitayaServer
(s *grpc.Server, srv PitayaServer)
protos/pitaya.pb.go:96
↓ 1 callers
Method
RegisterRPCJob
RegisterRPCJob registers a RPC job
worker/worker.go:114
↓ 1 callers
Function
ReliableRPC
ReliableRPC enqueues RPC to worker so it's executed asynchronously Default enqueue options are used
rpc.go:47
↓ 1 callers
Method
RemoteAddr
RemoteAddr returns the remote address of the user
agent/agent_remote.go:160
↓ 1 callers
Method
Remove
Remove delete data associated with the key from session storage
session/session.go:368
↓ 1 callers
Method
RemoveServer
RemoveServer is called when a server is removed 移除服务器的时候断开grpc连接 删除相应的存储
cluster/grpc_rpc_client.go:267
↓ 1 callers
Method
RemoveServer
(*Server)
cluster/cluster.go:56
↓ 1 callers
Function
Report
Report sends periodic of worker reports
worker/report.go:14
↓ 1 callers
Function
ReportExceededRateLimiting
ReportExceededRateLimiting reports the number of requests made after exceeded rate limiting in a connection
metrics/report.go:99
↓ 1 callers
Function
ReportSysMetrics
ReportSysMetrics reports sys metrics
metrics/report.go:81
↓ 1 callers
Method
SendKick
SendKick kicks an user
cluster/nats_rpc_client.go:122
↓ 1 callers
Method
SendPush
SendPush sends a message to a user
cluster/nats_rpc_client.go:112
↓ 1 callers
Method
SessionBindRemote
SessionBindRemote is called when a remote server binds a user session and want us to acknowledge it
service/remote.go:152
↓ 1 callers
Method
SetDeadline
SetDeadline sets the read and write deadlines associated with the connection. It is equivalent to calling both SetReadDeadline and SetWriteDeadline.
acceptor/ws_acceptor.go:252
↓ 1 callers
Function
SetHeartbeatTime
SetHeartbeatTime sets the heartbeat time 设置心跳
app.go:221
↓ 1 callers
Function
SetLogger
SetLogger rewrites the default logger
logger/logger.go:65
↓ 1 callers
Function
SetPacketDecoder
SetPacketDecoder changes the decoder used to parse messages received 设置自己的packetdecoder
app.go:211
↓ 1 callers
Function
SetPacketEncoder
SetPacketEncoder changes the encoder used to package outgoing messages 设置自己的packetencoder
app.go:216
↓ 1 callers
Method
SetPitayaServer
(protos.PitayaServer)
cluster/cluster.go:39
↓ 1 callers
Method
SetReadDeadline
SetReadDeadline sets the deadline for future Read calls and any currently-blocked Read call. A zero value for t means Read will not time out.
acceptor/ws_acceptor.go:263
↓ 1 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.go:94
↓ 1 callers
Function
SetTimerPrecision
SetTimerPrecision set the ticker precision, and time precision can not less than a Millisecond, and can not change after application running. The defa
timer.go:84
↓ 1 callers
Method
SetWriteDeadline
SetWriteDeadline sets the deadline for future Write calls and any currently-blocked Write call. Even if write times out, it may return n > 0, indicati
acceptor/ws_acceptor.go:272
↓ 1 callers
Function
ShouldAlwaysReturn
ShouldAlwaysReturn asserts that the return of f should always be v, timeouts: 0 - evaluation interval, 1 - timeout
helpers/helpers.go:239
↓ 1 callers
Method
Shutdown
Shutdown shutdowns the binary module
modules/binary.go:92
↓ 1 callers
Function
StartProcess
StartProcess starts a process
helpers/helpers.go:91
↓ 1 callers
Function
StartSpanFromRequest
StartSpanFromRequest starts a tracing span from the request
util/util.go:197
↓ 1 callers
Method
Stop
Stop turns off a timer. After Stop, fn will not be called forever
timer/timer.go:120
↓ 1 callers
Method
String
String represents the Packet's in text mode.
conn/packet/packet.go:41
↓ 1 callers
Method
String
()
examples/demo/worker/protos/arg.pb.go:29
↓ 1 callers
Method
Uint
Uint returns the value associated with the key as a uint.
session/session.go:492
↓ 1 callers
Method
Uint32
Uint32 returns the value associated with the key as a uint32.
session/session.go:543
↓ 1 callers
Method
Uint8
Uint8 returns the value associated with the key as a uint8.
session/session.go:509
↓ 1 callers
Method
Unmarshal
Unmarshal parses the protobuf-encoded data and stores the result in the value pointed to by v.
serialize/protobuf/protobuf.go:47
↓ 1 callers
Method
Unmarshal
Unmarshal parses the JSON-encoded data and stores the result in the value pointed to by v.
serialize/json/json.go:42
↓ 1 callers
Method
UnmarshalKey
UnmarshalKey unmarshals key into v
config/config.go:168
↓ 1 callers
Function
WithWrappers
WithWrappers walks through wrappers calling Wrapper wrappers ...Wrapper 不确定参数 wapers ... 切片打算传递 for k,v:= range array slice map(随机) string chan(v) f
acceptorwrapper/wrapper.go:41
↓ 1 callers
Method
Wrap
(acceptor.Acceptor)
acceptorwrapper/wrapper.go:35
↓ 1 callers
Method
bindInFront
(ctx context.Context)
session/session.go:635
↓ 1 callers
Method
bootstrap
()
cluster/etcd_service_discovery.go:334
↓ 1 callers
Method
buildDefaultTags
(tagsMap map[string]string)
metrics/statsd_reporter.go:80
↓ 1 callers
Method
buildProtosFromDescriptor
Receive an array of descriptors in binary format. The function creates the protobuffer from this data and associates it to the message.
client/protoclient.go:98
↓ 1 callers
Function
bytesToInt
Decode packet data length byte to int(Big end)
conn/codec/pomelo_packet_decoder.go:93
↓ 1 callers
Function
caculateMsgIdBytes
(id)
examples/demo/chat/web/protocol.js:284
↓ 1 callers
Function
castValueToCarrier
(val interface{})
tracing/span.go:32
← previous
next →
501–600 of 1,948, ranked by callers