Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIDocsGen ¶ added in v0.7.6
type APIDocsGen struct { Base // contains filtered or unexported fields }
APIDocsGen is a pitaya module that generates api docs for pitaya servers
func NewAPIDocsGen ¶ added in v0.7.6
func NewAPIDocsGen(basePath string, services []*component.Service) *APIDocsGen
NewAPIDocsGen creates a new APIDocsGen
func (*APIDocsGen) Init ¶ added in v0.7.6
func (a *APIDocsGen) Init() error
Init is called on init method
type Base ¶ added in v0.7.6
type Base struct{}
Base implements a default component for Component.
func (*Base) AfterInit ¶ added in v0.7.6
func (c *Base) AfterInit()
AfterInit was called after the component is initialized.
func (*Base) BeforeShutdown ¶ added in v0.7.6
func (c *Base) BeforeShutdown()
BeforeShutdown was called before the component to shutdown.
type Binary ¶
type Binary struct { Base // contains filtered or unexported fields }
Binary is a pitaya module that starts a binary as a child process and pipes its stdout
func (*Binary) GetExitChannel ¶
func (b *Binary) GetExitChannel() chan struct{}
GetExitChannel gets a channel that is closed when the binary dies
type ETCDBindingStorage ¶
type ETCDBindingStorage struct { Base // contains filtered or unexported fields }
ETCDBindingStorage module that uses etcd to keep in which frontend server each user is bound
func NewETCDBindingStorage ¶
func NewETCDBindingStorage(server *cluster.Server, conf *config.Config) *ETCDBindingStorage
NewETCDBindingStorage returns a new instance of BindingStorage
func (*ETCDBindingStorage) GetUserFrontendID ¶
func (b *ETCDBindingStorage) GetUserFrontendID(uid, frontendType string) (string, error)
GetUserFrontendID gets the id of the frontend server a user is connected to TODO: should we set context here? TODO: this could be way more optimized, using watcher and local caching
func (*ETCDBindingStorage) Init ¶
func (b *ETCDBindingStorage) Init() error
Init starts the binding storage module
func (*ETCDBindingStorage) PutBinding ¶
func (b *ETCDBindingStorage) PutBinding(uid string) error
PutBinding puts the binding info into etcd
func (*ETCDBindingStorage) Shutdown ¶
func (b *ETCDBindingStorage) Shutdown() error
Shutdown executes on shutdown and will clean etcd
type UniqueSession ¶
type UniqueSession struct { Base // contains filtered or unexported fields }
UniqueSession module watches for sessions using the same UID and kicks them
func NewUniqueSession ¶
func NewUniqueSession(server *cluster.Server, rpcServer cluster.RPCServer, rpcClient cluster.RPCClient) *UniqueSession
NewUniqueSession creates a new unique session module
func (*UniqueSession) OnUserBind ¶
func (u *UniqueSession) OnUserBind(uid, fid string)
OnUserBind method should be called when a user binds a session in remote servers