Documentation ¶
Index ¶
- Variables
- type Public
- func (p *Public) HandleConnect(ctx middleware.Context, msg *types.ConnectMessage) error
- func (p *Public) HandleDisconnect(ctx middleware.Context, msg *types.DisconnectMessage) error
- func (p *Public) HandleStatus(ctx middleware.Context, msg *types.StatusMessage) error
- func (p *Public) WithExpire(duration time.Duration) *Public
- func (p *Public) WithRedis(client *redis.Client, prefix string) (*Public, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var RequestBurst = 50
RequestBurst sets the burst of requests to the account server
View Source
var RequestInterval = 50 * time.Millisecond
RequestInterval sets how often the account server may be queried
Functions ¶
This section is empty.
Types ¶
type Public ¶
type Public struct {
// contains filtered or unexported fields
}
Public gateway information will be injected
func (*Public) HandleConnect ¶
func (p *Public) HandleConnect(ctx middleware.Context, msg *types.ConnectMessage) error
HandleConnect fetches public gateway information in the background when a ConnectMessage is received
func (*Public) HandleDisconnect ¶
func (p *Public) HandleDisconnect(ctx middleware.Context, msg *types.DisconnectMessage) error
HandleDisconnect cleans up
func (*Public) HandleStatus ¶
func (p *Public) HandleStatus(ctx middleware.Context, msg *types.StatusMessage) error
HandleStatus inserts metadata if set in info, but not present in message
func (*Public) WithExpire ¶
WithExpire adds an expiration to gateway information. Information is re-fetched if expired
Click to show internal directories.
Click to hide internal directories.