Categorygithub.com/fipso/pusher-ws-go
modulepackage
0.0.0-20210915174959-5accfd0d9a77
Repository: https://github.com/fipso/pusher-ws-go.git
Documentation: pkg.go.dev

# README

pusher-ws-go

GoDoc Go Report Card Travis CI Build Status Codecov

This package implements a Pusher websocket client. It is based on the official Pusher JavaScript client libary as well as go-pusher.

Installation

$ go get github.com/goguardian/pusher-ws-go

Features

  • Connect to app
    • Custom cluster
    • Insecure connection
  • Subscribe to channel
    • Auth for private and presence channels
    • Custom auth parameters
    • Custom auth headers
  • Unsubscribe from channel
  • Bind to events
    • Bind at app level
    • Bind at channel level
    • Bind global at app level
    • Bind global at channel level
  • Unbind events
  • Presence channel member data
  • Cancel subscribing
  • Handle pong timeout/reconnect

# Packages

No description provided by the author

# Functions

UnmarshalDataString is a convenience function to unmarshal double-encoded JSON data from a Pusher event.
WithSuccessTimeout returns a SubscribeOption that sets the time that a subscription request will wait for a success response from Pusher before timing out.

# Variables

ErrTimedOut is the error returned when there is a timeout waiting for a subscription confirmation from Pusher.

# Structs

An AuthError is returned when a non-200 status code is returned in a channel subscription authentication request.
Client represents a Pusher websocket client.
Event represents an event sent to or received from a Pusher connection.
EventError represents an error event received from Pusher.

# Interfaces

Channel represents a subscription to a Pusher channel.

# Type aliases

SubscribeOption is a configuration option for subscribing to a channel.