Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEventDelivery ¶
func IsEventPublish ¶
func IsMetaMessage ¶
Types ¶
type Advise ¶
type Advise struct {
Reconnect Reconnect `json:"reconnect,omitempty"`
Interval time.Duration `json:"interval,omitempty"`
Timeout time.Duration `json:"timeout,omitempty"`
MultipleClients bool `json:"multiple-clients,omitempty"`
Hosts []string `json:"hosts,omitempty"`
}
func (*Advise) MarshalJSON ¶
func (*Advise) UnmarshalJSON ¶
type EventMessage ¶
type EventMessage = int
EventMessage are published in event messages sent from a faye client to a faye server and are delivered in event messages sent from a faye server to a faye client.
const ( // EventPublish EventMessage = iota EventDelivery )
type Extensions ¶
func (*Extensions) ApplyInExtensions ¶
func (e *Extensions) ApplyInExtensions(m *Message)
func (*Extensions) ApplyOutExtensions ¶
func (e *Extensions) ApplyOutExtensions(m *Message)
type Message ¶
type Message struct {
Channel string `json:"channel,omitempty"`
Version string `json:"version,omitempty"`
SupportedConnectionTypes []string `json:"supportedConnectionTypes,omitempty"`
ConnectionType string `json:"connectionType,omitempty"`
MinimumVersion string `json:"minimumVersion,omitempty"`
Successful bool `json:"successful,omitempty"`
Ext interface{} `json:"ext,omitempty"`
Id string `json:"id,omitempty"`
ClientId string `json:"clientId,omitempty"`
Advice *Advise `json:"advice,omitempty"`
Data Data `json:"data,omitempty"`
Timestamp uint64 `json:"timestamp,omitempty"`
AuthSuccessful bool `json:"authSuccessful,omitempty"`
Error string `json:"error,omitempty"`
Subscription string `json:"subscription,omitempty"`
}
type MetaMessage ¶
type MetaMessage = string
MetaMessage are channels commencing with the /meta/ segment ans, are the channels used by the faye protocol itself.
const ( MetaSubscribe MetaMessage = "/meta/subscribe" MetaConnect MetaMessage = "/meta/connect" MetaDisconnect MetaMessage = "/meta/disconnect" MetaUnsubscribe MetaMessage = "/meta/unsubscribe" MetaHandshake MetaMessage = "/meta/handshake" )
type Reconnect ¶
type Reconnect string
const ( //ReconnectRetry indicates that a client MAY attempt to reconnect with a /meta/connect message, //after the interval (as defined by interval advice field or client-default backoff), and with the same credentials. ReconnectRetry Reconnect = "retry" //ReconnectHandshake indicates that the server has terminated any prior connection status and the client MUST reconnect // with a /meta/handshake message. //A client MUST NOT automatically retry when a reconnect advice handshake has been received. ReconnectHandshake Reconnect = "handshake" //ReconnectNone indicates a hard failure for the connect attempt. //A client MUST respect reconnect advice none and MUST NOT automatically retry or handshake. ReconnectNone Reconnect = "none" )
Click to show internal directories.
Click to hide internal directories.