Documentation ¶
Index ¶
Constants ¶
const ( // StatusStart status StatusStart int32 // StatusHandshake status StatusHandshake // StatusWorking status StatusWorking // StatusClosed status StatusClosed )
const ( // SessionPushRoute is the route used for updating session SessionPushRoute = "sys.pushsession" // SessionBindRoute is the route used for binding session SessionBindRoute = "sys.bindsession" // KickRoute is the route used for kicking an user KickRoute = "sys.kick" )
const ( IPVersionKey = "ipversion" IPv4 = "ipv4" IPv6 = "ipv6" )
IP constants
Variables ¶
var ( ErrBindingNotFound = errors.New("binding for this user was not found in etcd") ErrBrokenPipe = errors.New("broken low-level pipe") ErrBufferExceed = errors.New("session send buffer exceed") ErrChangeDictionaryWhileRunning = errors.New("you shouldn't change the dictionary while the app is already running") ErrChangeRouteWhileRunning = errors.New("you shouldn't change routes while app is already running") ErrCloseClosedGroup = errors.New("close closed group") ErrCloseClosedSession = errors.New("close closed session") ErrClosedGroup = errors.New("group closed") ErrEmptyUID = errors.New("empty uid") ErrEtcdGrantLeaseTimeout = errors.New("timed out waiting for etcd lease grant") ErrEtcdLeaseNotFound = errors.New("etcd lease not found in group") ErrFrontSessionCantPushToFront = errors.New("frontend session can't push to front") ErrFrontendTypeNotSpecified = errors.New("for using SendPushToUsers from a backend server you have to specify a valid frontendType") ErrGroupAlreadyExists = errors.New("group already exists") ErrGroupNotFound = errors.New("group not found") ErrIllegalUID = errors.New("illegal uid") ErrInvalidCertificates = errors.New("certificates must be exactly two") ErrInvalidSpanCarrier = errors.New("tracing: invalid span carrier") ErrKickingUsers = errors.New("failed to kick users, check array with failed uids") ErrMemberAlreadyExists = errors.New("member already exists in group") ErrMemberNotFound = errors.New("member not found in the group") ErrMemoryTTLNotFound = errors.New("memory group TTL not found") ErrMetricNotKnown = errors.New("the provided metric does not exist") ErrNatsMessagesBufferSizeZero = errors.New("pitaya.buffer.cluster.rpc.server.nats.messages cant be zero") ErrNatsNoRequestTimeout = errors.New("pitaya.cluster.rpc.client.nats.requesttimeout cant be empty") ErrNatsPushBufferSizeZero = errors.New("pitaya.buffer.cluster.rpc.server.nats.push cant be zero") ErrNilCondition = errors.New("pitaya/timer: nil condition") ErrNoBindingStorageModule = errors.New("for sending remote pushes or using unique session module while using grpc you need to pass it a BindingStorage") ErrNoConnectionToServer = errors.New("rpc client has no connection to the chosen server") ErrNoContextFound = errors.New("no context found") ErrNoNatsConnectionString = errors.New("you have to provide a nats url") ErrNoServerTypeChosenForRPC = errors.New("no server type chosen for sending RPC, send a full route in the format server.service.component") ErrNoServerWithID = errors.New("can't find any server with the provided ID") ErrNoServersAvailableOfType = errors.New("no servers available of this type") ErrNoUIDBind = errors.New("you have to bind an UID to the session to do that") ErrNonsenseRPC = errors.New("you are making a rpc that may be processed locally, either specify a different server type or specify a server id") ErrNotImplemented = errors.New("method not implemented") ErrNotifyOnRequest = errors.New("tried to notify a request route") ErrOnCloseBackend = errors.New("onclose callbacks are not allowed on backend servers") ErrProtodescriptor = errors.New("failed to get protobuf message descriptor") ErrPushingToUsers = errors.New("failed to push message to users, check array with failed uids") ErrRPCClientNotInitialized = errors.New("RPC client is not running") ErrRPCJobAlreadyRegistered = errors.New("rpc job was already registered") ErrRPCLocal = errors.New("RPC must be to a different server type") ErrRPCServerNotInitialized = errors.New("RPC server is not running") ErrReplyShouldBeNotNull = errors.New("reply must not be null") ErrReplyShouldBePtr = errors.New("reply must be a pointer") ErrRequestOnNotify = errors.New("tried to request a notify route") ErrRouterNotInitialized = errors.New("router is not initialized") ErrServerNotFound = errors.New("server not found") ErrServiceDiscoveryNotInitialized = errors.New("service discovery client is not initialized") ErrSessionAlreadyBound = errors.New("session is already bound to an uid") ErrSessionDuplication = errors.New("session exists in the current group") ErrSessionNotFound = errors.New("session not found") ErrSessionOnNotify = errors.New("current session working on notify mode") ErrTimeoutTerminatingBinaryModule = errors.New("timeout waiting to binary module to die") ErrWrongValueType = errors.New("protobuf: convert on wrong type value") ErrRateLimitExceeded = errors.New("rate limit exceeded") ErrReceivedMsgSmallerThanExpected = errors.New("received less data than expected, EOF?") ErrReceivedMsgBiggerThanExpected = errors.New("received more data than expected") )
Errors that can occur during message handling.
var GRPCExternalHostKey = "grpc-external-host"
GRPCExternalHostKey is the key for grpc external host on server metadata
var GRPCExternalPortKey = "grpc-external-port"
GRPCExternalPortKey is the key for grpc external port on server metadata
var GRPCHostKey = "grpcHost"
GRPCHostKey is the key for grpc host on server metadata
var GRPCPortKey = "grpcPort"
GRPCPortKey is the key for grpc port on server metadata
var IOBufferBytesSize = 4096
IOBufferBytesSize will be used when reading messages from clients
var LoggerCtxKey = "default-logger"
LoggerCtxKey is the context key where the default logger will be set
var MetricTagsKey = "metric-tags"
MetricTagsKey is the key holding request tags to be sent over the context to be reported
var PeerIDKey = "peer.id"
PeerIDKey is the key holding the peer id to be sent over the context
var PeerServiceKey = "peer.service"
PeerServiceKey is the key holding the peer service to be sent over the context
var PropagateCtxKey = propagateKey{}
PropagateCtxKey is the context key where the content that will be propagated through rpc calls is set
var RegionKey = "region"
RegionKey is the key to save the region server is on
var RequestIDKey = "request.id"
RequestIDKey is the key holding the request id to be sent over the context
var RouteKey = "req-route"
RouteKey is the key holding the request route to be sent over the context
var SessionCtxKey = "session"
SessionCtxKey is the context key where the session will be set
var SpanPropagateCtxKey = "opentracing-span"
SpanPropagateCtxKey is the key holding the opentracing spans inside the propagate key
var StartTimeKey = "req-start-time"
StartTimeKey is the key holding the request start time (in ns) to be sent over the context
var VERSION = "0.1.0"
VERSION returns current pitaya version
Functions ¶
This section is empty.
Types ¶
This section is empty.