_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c28200
train
// ValidateMessageType validates a given message type against the handler's one // and returns an error if it is a mismatch and a boolean indicating if the caller should // exit in the presence of this error or not.
{ "resource": "" }
c28201
train
// Init runs on service initialization
{ "resource": "" }
c28202
train
// LogError logs an error to an opentracing span
{ "resource": "" }
c28203
train
// BroadcastSessionBind sends the binding information to other servers that may br interested in this info
{ "resource": "" }
c28204
train
// Send publishes a message in a given topic
{ "resource": "" }
c28205
train
// SendPush sends a message to a user
{ "resource": "" }
c28206
train
// SendKick kicks an user
{ "resource": "" }
c28207
train
// Call calls a method remotelly
{ "resource": "" }
c28208
train
// Init inits nats rpc client
{ "resource": "" }
c28209
train
// NewRemote create new Remote instance
{ "resource": "" }
c28210
train
// Push pushes the message to the user
{ "resource": "" }
c28211
train
// ResponseMID reponds the message with mid to the user
{ "resource": "" }
c28212
train
// CodeFromError returns the code of error. // If error is nil, return empty string. // If error is not a pitaya error, returns unkown code
{ "resource": "" }
c28213
train
// 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 slow receivers. // The duration d must be greater than zero; if not, NewTimer will panic. // Stop the timer to release associated resources.
{ "resource": "" }
c28214
train
// NewCountTimer returns a new Timer containing a function that will be called // with a period specified by the duration argument. After count times, timer // will be stopped automatically, It adjusts the intervals for slow receivers. // The duration d must be greater than zero; if not, NewCountTimer will panic. // St...
{ "resource": "" }
c28215
train
// NewAfterTimer returns a new Timer containing a function that will be called // after duration that specified by the duration argument. // The duration d must be greater than zero; if not, NewAfterTimer will panic. // Stop the timer to release associated resources.
{ "resource": "" }
c28216
train
// NewCondTimer returns a new Timer containing a function that will be called // when condition satisfied that specified by the condition argument. // The duration d must be greater than zero; if not, NewCondTimer will panic. // Stop the timer to release associated resources.
{ "resource": "" }
c28217
train
// SetTimerPrecision set the ticker precision, and time precision can not less // than a Millisecond, and can not change after application running. The default // precision is time.Second
{ "resource": "" }
c28218
train
// NotifySessionData sets the session data
{ "resource": "" }
c28219
train
// Docs returns documentation
{ "resource": "" }
c28220
train
// NewTCPAcceptor creates a new instance of tcp acceptor
{ "resource": "" }
c28221
train
// ListenAndServe using tcp acceptor
{ "resource": "" }
c28222
train
// ListenAndServeTLS listens using tls
{ "resource": "" }
c28223
train
// NewWSAcceptor returns a new instance of WSAcceptor
{ "resource": "" }
c28224
train
// ListenAndServe listens and serve in the specified addr
{ "resource": "" }
c28225
train
// ListenAndServeTLS listens and serve in the specified addr using tls
{ "resource": "" }
c28226
train
// Stop stops the acceptor
{ "resource": "" }
c28227
train
// New returns a new client
{ "resource": "" }
c28228
train
// pendingRequestsReaper delete timedout requests
{ "resource": "" }
c28229
train
// Disconnect disconnects the client
{ "resource": "" }
c28230
train
// sendMsg sends the request to the server
{ "resource": "" }
c28231
train
// NewMockServiceDiscovery creates a new mock instance
{ "resource": "" }
c28232
train
// GetServersByType mocks base method
{ "resource": "" }
c28233
train
// GetServersByType indicates an expected call of GetServersByType
{ "resource": "" }
c28234
train
// GetServer mocks base method
{ "resource": "" }
c28235
train
// GetServer indicates an expected call of GetServer
{ "resource": "" }
c28236
train
// GetServers mocks base method
{ "resource": "" }
c28237
train
// AddListener mocks base method
{ "resource": "" }
c28238
train
// AddListener indicates an expected call of AddListener
{ "resource": "" }
c28239
train
// NewMockEncoder creates a new mock instance
{ "resource": "" }
c28240
train
// IsCompressionEnabled mocks base method
{ "resource": "" }
c28241
train
// IsCompressionEnabled indicates an expected call of IsCompressionEnabled
{ "resource": "" }
c28242
train
// SendPushToUser sends a push to a user
{ "resource": "" }
c28243
train
// RemoteFunc is a function that will be called remotely
{ "resource": "" }
c28244
train
// GetFreePort returns a free port
{ "resource": "" }
c28245
train
// GetMapKeys returns a string slice with the map keys
{ "resource": "" }
c28246
train
// WriteFile test helper
{ "resource": "" }
c28247
train
// ReadFile test helper
{ "resource": "" }
c28248
train
// StartProcess starts a process
{ "resource": "" }
c28249
train
// StartServer starts a server
{ "resource": "" }
c28250
train
// FixtureGoldenFileName returns the golden file name on fixtures path
{ "resource": "" }
c28251
train
// ShouldEventuallyReceive should asserts that eventually channel c receives a value
{ "resource": "" }
c28252
train
// CallLog makes ReliableRPC to metagame LogRemote
{ "resource": "" }
c28253
train
// NewMockSerializer creates a new mock instance
{ "resource": "" }
c28254
train
// GetName indicates an expected call of GetName
{ "resource": "" }
c28255
train
// Marshal mocks base method
{ "resource": "" }
c28256
train
// Unmarshal mocks base method
{ "resource": "" }
c28257
train
// Unmarshal indicates an expected call of Unmarshal
{ "resource": "" }
c28258
train
// HandlersDocs returns a map from route to input and output
{ "resource": "" }
c28259
train
// RemotesDocs returns a map from route to input and output
{ "resource": "" }
c28260
train
// New returns a new message instance
{ "resource": "" }
c28261
train
// String, implementation of fmt.Stringer interface
{ "resource": "" }
c28262
train
// SetDictionary set routes map which be used to compress route.
{ "resource": "" }
c28263
train
//String represents the Packet's in text mode.
{ "resource": "" }
c28264
train
// NewMockReporter creates a new mock instance
{ "resource": "" }
c28265
train
// ReportCount mocks base method
{ "resource": "" }
c28266
train
// ReportCount indicates an expected call of ReportCount
{ "resource": "" }
c28267
train
// ReportSummary mocks base method
{ "resource": "" }
c28268
train
// ReportSummary indicates an expected call of ReportSummary
{ "resource": "" }
c28269
train
// InjectSpan retrieves an opentrancing span from the current context and creates a new context // with it encoded in binary format inside the propagatable context content
{ "resource": "" }
c28270
train
// 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.
{ "resource": "" }
c28271
train
// FinishSpan finishes a span retrieved from the given context and logs the error if it exists
{ "resource": "" }
c28272
train
// Route gets the right server to use in the call
{ "resource": "" }
c28273
train
// NewAgent create new agent instance
{ "resource": "" }
c28274
train
// Push implementation for session.NetworkEntity interface
{ "resource": "" }
c28275
train
// ResponseMID implementation for session.NetworkEntity interface // Respond message to session
{ "resource": "" }
c28276
train
// Close closes the agent, cleans inner state and closes low-level connection. // Any blocked Read or Write operations will be unblocked and return errors.
{ "resource": "" }
c28277
train
// String, implementation for Stringer interface
{ "resource": "" }
c28278
train
// Kick sends a kick packet to a client
{ "resource": "" }
c28279
train
// SetStatus sets the agent status
{ "resource": "" }
c28280
train
// Handle handles the messages from and to a client
{ "resource": "" }
c28281
train
// SendHandshakeResponse sends a handshake response
{ "resource": "" }
c28282
train
// AnswerWithError answers with an error
{ "resource": "" }
c28283
train
// New returns a new session instance // a NetworkEntity is a low-level network instance
{ "resource": "" }
c28284
train
// GetSessionByUID return a session bound to an user id
{ "resource": "" }
c28285
train
// GetSessionByID return a session bound to a frontend server id
{ "resource": "" }
c28286
train
// OnSessionBind adds a method to be called when a session is bound // same function cannot be added twice!
{ "resource": "" }
c28287
train
// OnAfterSessionBind adds a method to be called when session is bound and after all sessionBind callbacks
{ "resource": "" }
c28288
train
// OnSessionClose adds a method that will be called when every session closes
{ "resource": "" }
c28289
train
// Push message to client
{ "resource": "" }
c28290
train
// ResponseMID responses message to client, mid is // request message ID
{ "resource": "" }
c28291
train
// GetData gets the data
{ "resource": "" }
c28292
train
// SetData sets the whole session data
{ "resource": "" }
c28293
train
// SetDataEncoded sets the whole session data from an encoded value
{ "resource": "" }
c28294
train
// SetFrontendData sets frontend id and session id
{ "resource": "" }
c28295
train
// Bind bind UID to current session
{ "resource": "" }
c28296
train
// OnClose adds the function it receives to the callbacks that will be called // when the session is closed
{ "resource": "" }
c28297
train
// Close terminates current session, session related data will not be released, // all related data should be cleared explicitly in Session closed callback
{ "resource": "" }
c28298
train
// Remove delete data associated with the key from session storage
{ "resource": "" }
c28299
train
// HasKey decides whether a key has associated value
{ "resource": "" }