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
↓ 171 callers
Method
Error
(args ...interface{})
logger/logger.go:37
↓ 98 callers
Method
Marshal
(interface{})
serialize/serializer.go:29
↓ 93 callers
Function
New
New returns a new session instance a NetworkEntity is a low-level network instance
session/session.go:115
↓ 83 callers
Method
Call
(ctx context.Context, rpcType protos.RPCType, route *route.Route, session *session.Session, msg *message.Messa
cluster/cluster.go:49
↓ 82 callers
Method
Errorf
(format string, args ...interface{})
logger/logger.go:38
↓ 68 callers
Method
UID
UID returns uid that bind to current session
session/session.go:234
↓ 67 callers
Method
Set
Set associates value with the key in session storage
session/session.go:377
↓ 66 callers
Method
Unmarshal
([]byte, interface{})
serialize/serializer.go:34
↓ 56 callers
Function
getConfig
(conf ...*viper.Viper)
cluster/etcd_service_discovery_test.go:61
↓ 53 callers
Function
ShouldEventuallyReceive
ShouldEventuallyReceive should asserts that eventually channel c receives a value
helpers/helpers.go:206
↓ 48 callers
Method
Close
()
session/session.go:43
↓ 44 callers
Method
Debugf
(format string, args ...interface{})
logger/logger.go:34
↓ 38 callers
Method
ReportGauge
(metric string, tags map[string]string, value float64)
metrics/reporter_interfaces.go:27
↓ 36 callers
Function
getServer
()
cluster/nats_rpc_common_test.go:33
↓ 35 callers
Method
ID
ID returns the session id
session/session.go:229
↓ 34 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
mocks/net.go:81
↓ 34 callers
Method
String
()
service/handler_test.go:61
↓ 33 callers
Function
Configure
Configure configures the app
app.go:119
↓ 32 callers
Function
NewAgent
NewAgent create new agent instance
agent/agent.go:98
↓ 32 callers
Function
NewMessagesEncoder
NewMessagesEncoder returns a new message encoder
conn/message/message_encoder.go:41
↓ 31 callers
Method
SendRequest
(ctx context.Context, serverID, route string, v interface{})
session/session.go:46
↓ 31 callers
Method
String
()
protos/msg.pb.go:62
↓ 30 callers
Function
NewRoute
NewRoute creates a new route
route/route.go:47
↓ 29 callers
Function
NewMockNetworkEntity
NewMockNetworkEntity creates a new mock instance
session/mocks/session.go:27
↓ 28 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
metrics/mocks/reporter.go:32
↓ 28 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
serialize/mocks/serializer.go:31
↓ 27 callers
Method
String
String, implementation for Stringer interface
agent/agent.go:237
↓ 27 callers
Method
Warnf
(format string, args ...interface{})
logger/logger.go:46
↓ 26 callers
Method
Int
Int returns the value associated with the key as a int.
session/session.go:407
↓ 25 callers
Method
RemoteAddr
()
session/session.go:45
↓ 25 callers
Method
Short
Short transforms the route into a string without the server type
route/route.go:60
↓ 25 callers
Method
String
()
examples/demo/protos/cluster.pb.go:107
↓ 25 callers
Function
initApp
()
app_test.go:109
↓ 23 callers
Function
ShouldEventuallyReturn
ShouldEventuallyReturn asserts that eventually the return of f should be v, timeouts: 0 - evaluation interval, 1 - timeout
helpers/helpers.go:276
↓ 23 callers
Function
WithName
WithName used to rename component name 构建一个闭包函数去修改组件名字
component/options.go:34
↓ 22 callers
Method
ConnectTo
(addr string)
client/pitayaclient.go:28
↓ 22 callers
Function
GetFreePort
GetFreePort returns a free port
helpers/helpers.go:24
↓ 22 callers
Method
GetInt
GetInt returns an int from the inner config
config/config.go:143
↓ 22 callers
Method
Infof
(format string, args ...interface{})
logger/logger.go:42
↓ 22 callers
Function
New
New returns a new client
client/client.go:105
↓ 21 callers
Method
Bind
Bind bind UID to current session
session/session.go:280
↓ 21 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
session/mocks/session.go:34
↓ 21 callers
Method
Encode
(message *Message)
conn/message/message_encoder.go:32
↓ 21 callers
Method
Fatal
(format ...interface{})
logger/logger.go:29
↓ 21 callers
Function
GetSessionFromCtx
GetSessionFromCtx retrieves a session from a given context 从ctx的保存的数据中获取session
app.go:554
↓ 21 callers
Function
NewNatsRPCServer
NewNatsRPCServer ctor
cluster/nats_rpc_server.go:64
↓ 21 callers
Method
Warn
(args ...interface{})
logger/logger.go:45
↓ 21 callers
Function
WithNameFunc
WithNameFunc override handler name by specific function 构建一个闭包修改组件的handler name such as: strings.ToUpper/strings.ToLower
component/options.go:42
↓ 21 callers
Function
heartbeatAndHandshakeMocks
(mockEncoder *codecmocks.MockPacketEncoder)
agent/agent_test.go:56
↓ 20 callers
Method
Disconnect
()
client/pitayaclient.go:30
↓ 20 callers
Function
Error
Error creates a new error with a code, message and metadata
app.go:548
↓ 20 callers
Function
GetTestNatsServer
GetTestNatsServer gets a test nats server
helpers/helpers.go:56
↓ 20 callers
Function
GroupAddMember
GroupAddMember adds UID to group
group.go:92
↓ 20 callers
Function
NewConfig
NewConfig creates a new config with a given viper config if given
config/config.go:37
↓ 20 callers
Function
NewPomeloPacketEncoder
NewPomeloPacketEncoder ctor
conn/codec/pomelo_packet_encoder.go:32
↓ 20 callers
Function
StartServer
StartServer starts a server
helpers/helpers.go:108
↓ 20 callers
Method
String
()
session/session_test.go:57
↓ 19 callers
Method
GetDuration
GetDuration returns a duration from the inner config
config/config.go:133
↓ 19 callers
Function
GroupCreate
GroupCreate creates a group
group.go:49
↓ 19 callers
Method
Shutdown
()
component/component.go:28
↓ 18 callers
Method
String
String mocks base method
mocks/net.go:51
↓ 17 callers
Function
NewNatsRPCClient
NewNatsRPCClient ctor
cluster/nats_rpc_client.go:58
↓ 17 callers
Function
NewTCPAcceptor
NewTCPAcceptor creates a new instance of tcp acceptor
acceptor/tcp_acceptor.go:42
↓ 16 callers
Function
FinishSpan
FinishSpan finishes a span retrieved from the given context and logs the error if it exists
tracing/span.go:110
↓ 15 callers
Method
Debug
(args ...interface{})
logger/logger.go:33
↓ 15 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
mocks/net.go:34
↓ 15 callers
Method
GetString
GetString returns a string from the inner config
config/config.go:138
↓ 15 callers
Function
NewRemoteService
NewRemoteService creates and return a new RemoteService
service/remote.go:64
↓ 15 callers
Function
NewSerializer
NewSerializer returns a new Serializer.
serialize/json/json.go:31
↓ 15 callers
Function
Register
Register register a component with options
component.go:39
↓ 15 callers
Function
ReportTimingFromCtx
ReportTimingFromCtx reports the latency from the context
metrics/report.go:35
↓ 15 callers
Method
String
String transforms the route into a string
route/route.go:52
↓ 14 callers
Method
Fatalf
(format string, args ...interface{})
logger/logger.go:30
↓ 14 callers
Function
GetConfig
GetConfig gets the pitaya config instance
app.go:236
↓ 14 callers
Function
GetTestEtcd
GetTestEtcd gets a test in memory etcd server
helpers/helpers.go:65
↓ 14 callers
Method
GroupCreate
(ctx context.Context, groupName string)
groups/group_service.go:14
↓ 14 callers
Method
Kick
(ctx context.Context)
session/session.go:44
↓ 14 callers
Function
New
New returns the router
router/router.go:52
↓ 14 callers
Function
NewServer
NewServer ctor
cluster/server.go:40
↓ 14 callers
Function
NewWSAcceptor
NewWSAcceptor returns a new instance of WSAcceptor
acceptor/ws_acceptor.go:45
↓ 14 callers
Method
Write
Write writes data to the connection. Write can be made to time out and return an Error with Timeout() == true after a fixed time limit; see SetDeadlin
acceptor/ws_acceptor.go:212
↓ 13 callers
Method
GroupAddMember
(ctx context.Context, groupName, uid string)
groups/group_service.go:11
↓ 13 callers
Method
Join
Join room
examples/demo/chat/main.go:69
↓ 13 callers
Function
ReadFile
ReadFile test helper
helpers/helpers.go:81
↓ 13 callers
Method
ReportSummary
(metric string, tags map[string]string, value float64)
metrics/reporter_interfaces.go:26
↓ 13 callers
Function
getEtcdSD
(t *testing.T, config *config.Config, server *Server, cli *clientv3.Client)
cluster/etcd_service_discovery_test.go:66
↓ 13 callers
Function
groupKey
(groupName string)
groups/etcd_group_service.go:67
↓ 12 callers
Function
AddAcceptor
AddAcceptor adds a new acceptor to app AddAcceptor添加一个接收器处理网络连接
app.go:192
↓ 12 callers
Method
GetMsg
()
protos/error.pb.go:61
↓ 12 callers
Method
GetServer
(id string)
cluster/service_discovery.go:30
↓ 12 callers
Function
GetSessionByUID
GetSessionByUID return a session bound to an user id
session/session.go:136
↓ 12 callers
Function
NewHandlerService
NewHandlerService creates and returns a new handler service
service/handler.go:84
↓ 12 callers
Method
Push
(route string, v interface{})
session/session.go:41
↓ 12 callers
Method
Read
(b []byte)
acceptorwrapper/rate_limiter.go:70
↓ 12 callers
Function
RegisterRemote
RegisterRemote register a remote component with options
component.go:44
↓ 12 callers
Function
setupNatsConn
(connectString string, appDieChan chan bool, options ...nats.Option)
cluster/nats_rpc_common.go:34
↓ 11 callers
Method
Get
Get returns an interface from the inner config
config/config.go:158
↓ 11 callers
Function
GroupBroadcast
GroupBroadcast pushes the message to all members inside group
group.go:64
↓ 11 callers
Function
SetSerializer
SetSerializer customize application serializer, which automatically Marshal and UnMarshal handler payload 设置序列化
app.go:262
↓ 11 callers
Function
Start
Start starts the app
app.go:349
next →
1–100 of 1,948, ranked by callers