constants

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// StatusStart status
	StatusStart int32
	// StatusHandshake status
	StatusHandshake
	// StatusWorking status
	StatusWorking
	// StatusClosed status
	StatusClosed
)
View Source
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"
)

Variables

View Source
var (
	ErrNoContextFound                 = errors.New("no context found")
	ErrNoBindingStorageModule         = errors.New("for sending remote pushes or using unique session module while using grpc you need to pass it a BindingStorage")
	ErrBindingNotFound                = errors.New("binding for this user was not found in etcd")
	ErrNotImplemented                 = errors.New("method not implemented")
	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")
	ErrFrontSessionCantPushToFront    = errors.New("frontend session can't push to front")
	ErrIllegalUID                     = errors.New("illegal uid")
	ErrMemberNotFound                 = errors.New("member not found in the group")
	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")
	ErrNoNatsConnectionString         = errors.New("you have to provide a nats url")
	ErrNoConnectionToServer           = errors.New("rpc client has no connection to the chosen server")
	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")
	ErrNotifyOnRequest                = errors.New("tried to notify a request route")
	ErrOnCloseBackend                 = errors.New("onclose callbacks are not allowed on backend servers")
	ErrRPCClientNotInitialized        = errors.New("RPC client is not running")
	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")
	ErrWrongValueType                 = errors.New("protobuf: convert on wrong type value")
	ErrInvalidCertificates            = errors.New("certificates must be exactly two")
	ErrTimeoutTerminatingBinaryModule = errors.New("timeout waiting to binary module to die")
	ErrFrontendTypeNotSpecified       = errors.New("for using SendPushToUsers from a backend server you have to specify a valid frontendType")
	ErrMetricNotKnown                 = errors.New("the provided metric does not exist")
)

Errors that could be occurred during message handling.

View Source
var PeerIDKey = "peer.id"

PeerIDKey is the key holding the peer id to be sent over the context

View Source
var PeerServiceKey = "peer.service"

PeerServiceKey is the key holding the peer service to be sent over the context

View Source
var PropagateCtxKey = propagateKey{}

PropagateCtxKey is the context key where the content that will be propagated through rpc calls is set

View Source
var RouteKey = "req-route"

RouteKey is the key holding the request route to be sent over the context

View Source
var SessionCtxKey = "session"

SessionCtxKey is the context key where the session will be set

View Source
var SpanPropagateCtxKey = "opentracing-span"

SpanPropagateCtxKey is the key holding the opentracing spans inside the propagate key

View Source
var StartTimeKey = "req-start-time"

StartTimeKey is the key holding the request start time (in ns) to be sent over the context

View Source
var VERSION = "0.1.0"

VERSION returns current pitaya version

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL