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
↓ 3 callers
Method
disconnect
disconnect 断开连接
cluster/grpc_rpc_client.go:342
↓ 3 callers
Function
doSendRPC
(ctx context.Context, serverID, routeStr string, reply proto.Message, arg proto.Message)
rpc.go:66
↓ 3 callers
Function
elementIndex
(slice []string, element string)
groups/group_service.go:24
↓ 3 callers
Method
ensureLabels
ensureLabels checks if labels contains the additionalLabels values, otherwise adds them with the default values
metrics/prometheus_reporter.go:346
↓ 3 callers
Method
forward
(buf *bytes.Buffer)
conn/codec/pomelo_packet_decoder.go:39
↓ 3 callers
Function
getHandler
(rt *route.Route)
service/util.go:45
↓ 3 callers
Method
getServerFromEtcd
getServerFromEtcd 查询etcd上的server序列化信息
cluster/etcd_service_discovery.go:295
↓ 3 callers
Function
getUserBindingKey
bindings/frontedtype/uid 组成key
modules/binding_storage.go:71
↓ 3 callers
Method
getUserPushChannel
()
cluster/nats_rpc_server.go:229
↓ 3 callers
Function
isExported
通过首字母大写判断导出情况
component/method.go:45
↓ 3 callers
Function
msgHasId
(type)
examples/demo/chat/web/protocol.js:275
↓ 3 callers
Function
msgHasRoute
(type)
examples/demo/chat/web/protocol.js:279
↓ 3 callers
Function
newSessionIDService
()
session/session.go:102
↓ 3 callers
Function
onSessionClosed
(s *session.Session)
agent/agent.go:329
↓ 3 callers
Method
printServers
()
cluster/etcd_service_discovery.go:422
↓ 3 callers
Method
remoteCall
remoteCall rpc调用 路由到指定的server调用rpcClient根军server找到连接server的grprc client进行rpc调用,最终调用到remoteSevice的Call方法使用handlers或者remotes进行处理
service/remote.go:430
↓ 3 callers
Function
reportJobsRetry
(r metrics.Reporter, retries int64)
worker/report.go:27
↓ 3 callers
Function
resetDicts
(t *testing.T)
conn/message/message_test.go:15
↓ 3 callers
Function
startModules
startModules starts all modules in order 调用module的init和afterinit
module.go:97
↓ 3 callers
Function
startupComponents
()
component.go:48
↓ 3 callers
Method
subscribe
subscribe 订阅主题使用 chan收消息
cluster/nats_rpc_server.go:361
↓ 3 callers
Function
suitableHandlerMethods
将组件中所有的符合本地消息响应方法类型的方法 进行信息封装到Handler并且和方法名map存储
component/method.go:156
↓ 3 callers
Function
suitableRemoteMethods
将组件中所有的符合rpc方法类型的方法 进行信息封装到Remote并且和方法名map存储
component/method.go:131
↓ 3 callers
Function
unmarshalRemoteArg
(remote *component.Remote, payload []byte)
service/util.go:72
↓ 3 callers
Method
watchEtcdChanges
监听所有ETCD上的Server的key
cluster/etcd_service_discovery.go:527
↓ 3 callers
Method
write
从send管道读取要发送的消息 然后通过
agent/agent.go:352
↓ 2 callers
Function
AddToPropagateCtx
AddToPropagateCtx adds a key and value that will be propagated through RPC calls
app.go:584
↓ 2 callers
Function
AfterHandler
AfterHandler pushs a function to the back of the functions pipeline that will be executed after the handler method
pipeline.go:33
↓ 2 callers
Method
AfterInit
初始化
interfaces/interfaces.go:26
↓ 2 callers
Method
BroadcastSessionBind
(uid string)
cluster/cluster.go:48
↓ 2 callers
Method
Call
Call calls a method remotelly 远程调用方法
cluster/nats_rpc_client.go:132
↓ 2 callers
Function
CloseAll
CloseAll calls Close on all sessions
session/session.go:197
↓ 2 callers
Function
CodeFromError
CodeFromError returns the code of error. If error is nil, return empty string. If error is not a pitaya error, returns unkown code
errors/errors.go:84
↓ 2 callers
Function
Configure
Configure configures a global Jaeger tracer
tracing/jaeger/config.go:40
↓ 2 callers
Method
Configure
Configure starts workers and register rpc job
examples/demo/worker/services/worker.go:18
↓ 2 callers
Method
ConnectToTLS
(addr string, skipVerify bool)
client/pitayaclient.go:29
↓ 2 callers
Function
ConvertProtoToMessageType
ConvertProtoToMessageType converts a protos.MsgType to a message.Type
util/util.go:157
↓ 2 callers
Function
CtxWithDefaultLogger
CtxWithDefaultLogger inserts a default logger on ctx to be used on handlers and remotes. If using logrus, userId, route and requestId will be added as
util/util.go:171
↓ 2 callers
Function
Descriptor
Descriptor returns the protobuf message descriptor for a given message name
app.go:632
↓ 2 callers
Method
Docs
Docs returns documentation for remotes
service/remote.go:467
↓ 2 callers
Method
DumpServices
DumpServices outputs all registered services
service/remote.go:460
↓ 2 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
mocks/acceptor.go:32
↓ 2 callers
Function
Encode
Encode returns the given propagatable context encoded in binary format
context/context.go:90
↓ 2 callers
Method
Encode
type(1byte) + length(3byte) + body(length bytes) package分为header和body两部分。header描述package包的类型和包的长度,body则是需要传输的数据内容。 type - package类型,1个byte 0x01: 客户端到
conn/codec/pomelo_packet_encoder.go:53
↓ 2 callers
Function
FixtureGoldenFileName
FixtureGoldenFileName returns the golden file name on fixtures path
helpers/helpers.go:170
↓ 2 callers
Method
GetAddr
()
acceptor/acceptor.go:32
↓ 2 callers
Method
GetAddr
GetAddr returns the addr the acceptor will listen on
acceptor/ws_acceptor.go:65
↓ 2 callers
Method
GetBindingsChannel
GetBindingsChannel gets the channel that will receive all bindings
cluster/nats_rpc_server.go:110
↓ 2 callers
Function
GetContextFromRequest
GetContextFromRequest gets the context from a request
util/util.go:220
↓ 2 callers
Function
GetDictionary
GetDictionary gets the routes map which is used to compress route.
conn/message/message.go:175
↓ 2 callers
Method
GetHandshakeData
GetHandshakeData gets the handshake data received by the client.
session/session.go:666
↓ 2 callers
Method
GetId
()
protos/msg.pb.go:85
↓ 2 callers
Function
GetModule
GetModule gets a module with a name
module.go:80
↓ 2 callers
Method
GetReply
()
protos/msg.pb.go:106
↓ 2 callers
Method
GetServers
()
cluster/service_discovery.go:31
↓ 2 callers
Method
GetStringMapString
GetStringMapString returns a string map string from the inner config
config/config.go:163
↓ 2 callers
Method
GroupCreateWithTTL
(ctx context.Context, groupName string, ttlTime time.Duration)
groups/group_service.go:15
↓ 2 callers
Method
GroupDelete
(ctx context.Context, groupName string)
groups/group_service.go:16
↓ 2 callers
Method
GroupMembers
(ctx context.Context, groupName string)
groups/group_service.go:17
↓ 2 callers
Function
GroupRemoveAll
GroupRemoveAll clears all UIDs
group.go:107
↓ 2 callers
Method
GroupRemoveMember
(ctx context.Context, groupName, uid string)
groups/group_service.go:19
↓ 2 callers
Function
GroupRenewTTL
GroupRenewTTL renews group with the initial TTL
group.go:117
↓ 2 callers
Method
IPVersion
IPVersion returns the remote address ip version. net.TCPAddr and net.UDPAddr implementations of String() always construct result as <ip>:<port> on bot
agent/agent.go:290
↓ 2 callers
Method
Init
Init initializes the binary
modules/binary.go:64
↓ 2 callers
Method
Kick
Kick kicks a local user
remote/sys.go:62
↓ 2 callers
Method
ListenAndServe
ListenAndServe using tcp acceptor
acceptor/tcp_acceptor.go:85
↓ 2 callers
Method
ListenAndServeTLS
ListenAndServeTLS listens and serve in the specified addr using tls
acceptor/ws_acceptor.go:129
↓ 2 callers
Method
ListenAndServeTLS
ListenAndServeTLS listens using tls
acceptor/tcp_acceptor.go:101
↓ 2 callers
Method
LoadServerInfo
LoadServerInfo load commands information from the server. Addr is the server address.
client/protoclient.go:317
↓ 2 callers
Function
LogError
LogError logs an error to an opentracing span
tracing/log.go:31
↓ 2 callers
Function
New
New returns a new message instance
conn/message/message.go:112
↓ 2 callers
Function
NewCondTimer
NewCondTimer returns a new Timer containing a function that will be called when condition satisfied that specified by the condition argument. The dura
timer.go:71
↓ 2 callers
Function
NewETCDBindingStorage
NewETCDBindingStorage returns a new instance of BindingStorage
modules/binding_storage.go:53
↓ 2 callers
Function
NewEtcdGroupService
NewEtcdGroupService returns a new group instance
groups/etcd_group_service.go:28
↓ 2 callers
Function
NewRateLimitingWrapper
NewRateLimitingWrapper returns an instance of *RateLimitingWrapper
acceptorwrapper/rate_limiting_wrapper.go:37
↓ 2 callers
Method
OnUserBind
(uid, fid string)
cluster/cluster.go:61
↓ 2 callers
Function
ProtoDescriptors
ProtoDescriptors returns the descriptor for a given message name or .proto file
docgenerator/descriptors.go:12
↓ 2 callers
Method
PushSession
PushSession updates the local session
remote/sys.go:50
↓ 2 callers
Method
RemoteAddr
RemoteAddr implementation for session.NetworkEntity interface returns the remote network address.
agent/agent.go:232
↓ 2 callers
Function
RemoveTimer
RemoveTimer removes a timer to the manager
timer/timer.go:92
↓ 2 callers
Method
ReportCount
(metric string, tags map[string]string, count float64)
metrics/reporter_interfaces.go:25
↓ 2 callers
Method
ReportCount
ReportCount sends count reports to statsd
metrics/statsd_reporter.go:95
↓ 2 callers
Function
ReportNumberOfConnectedClients
ReportNumberOfConnectedClients reports the number of connected clients
metrics/report.go:74
↓ 2 callers
Method
ReportSummary
ReportSummary observes the summary value and reports to statsd
metrics/statsd_reporter.go:127
↓ 2 callers
Method
ResponseMID
ResponseMID reponds the message with mid to the user
agent/agent_remote.go:134
↓ 2 callers
Method
Route
Route gets the right server to use in the call
router/router.go:78
↓ 2 callers
Method
Send
(route string, data []byte)
cluster/cluster.go:45
↓ 2 callers
Method
SendHandshakeResponse
SendHandshakeResponse sends a handshake response
agent/agent.go:346
↓ 2 callers
Method
SendRequest
SendRequest sends a request to the server
client/protoclient.go:490
↓ 2 callers
Method
SendRequest
SendRequest sends a request to a server
agent/agent_remote.go:220
↓ 2 callers
Function
SetDebug
SetDebug toggles debug on/off
app.go:206
↓ 2 callers
Method
SetFrontendData
SetFrontendData sets frontend id and session id
session/session.go:274
↓ 2 callers
Method
SetHandshakeData
SetHandshakeData sets the handshake data received by the client.
session/session.go:658
↓ 2 callers
Method
SetLastAt
SetLastAt sets the last at to now
agent/agent.go:258
↓ 2 callers
Function
SetLogger
SetLogger logger setter 设置日志
app.go:226
↓ 2 callers
Method
SetServiceDiscovery
SetServiceDiscovery sets the sd client
router/router.go:59
↓ 2 callers
Function
SliceContainsString
SliceContainsString returns true if a slice contains the string
util/util.go:95
↓ 2 callers
Method
Started
Started returns true if worker was started
worker/worker.go:79
↓ 2 callers
Method
SyncServers
SyncServers gets all servers from etcd 从etcd获取左右的server对本地保存的server信息进行同步(增删)
cluster/etcd_service_discovery.go:431
↓ 2 callers
Method
Uint16
Uint16 returns the value associated with the key as a uint16.
session/session.go:526
← previous
next →
301–400 of 1,948, ranked by callers