Documentation ¶
Index ¶
- Constants
- type BaseCommand
- type PublisherWebSocket
- func (p *PublisherWebSocket) OnClientCreated(client *websockethub.Client)
- func (p *PublisherWebSocket) OnConnect(client *websockethub.Client, request *http.Request)
- func (p *PublisherWebSocket) OnDisconnect(client *websockethub.Client, request *http.Request)
- func (p *PublisherWebSocket) ServeHTTP(c echo.Context) error
- type SubscriptionCommand
Constants ¶
View Source
const ( CommandSubscribe = "subscribe" CommandClientWasSubscribed = "client_subscribed" CommandUnsubscribe = "unsubscribe" CommandClientWasUnsubscribed = "client_unsubscribed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseCommand ¶
type BaseCommand struct {
Command string `json:"command"`
}
type PublisherWebSocket ¶
type PublisherWebSocket struct {
// contains filtered or unexported fields
}
func New ¶
func New(log *logger.Logger, hub *websockethub.Hub, msgTypes []string, publisher *publisher.Publisher) *PublisherWebSocket
func (*PublisherWebSocket) OnClientCreated ¶
func (p *PublisherWebSocket) OnClientCreated(client *websockethub.Client)
func (*PublisherWebSocket) OnConnect ¶
func (p *PublisherWebSocket) OnConnect(client *websockethub.Client, request *http.Request)
func (*PublisherWebSocket) OnDisconnect ¶
func (p *PublisherWebSocket) OnDisconnect(client *websockethub.Client, request *http.Request)
func (*PublisherWebSocket) ServeHTTP ¶
func (p *PublisherWebSocket) ServeHTTP(c echo.Context) error
ServeHTTP serves the websocket. Provide a chainID to filter for a certain chain, provide an empty chain id to get all chain events.
type SubscriptionCommand ¶
Click to show internal directories.
Click to hide internal directories.