Documentation ¶
Index ¶
- Variables
- type Client
- type ID
- type Options
- type Streamer
- func (s *Streamer) Broadcast(event string, data string) error
- func (s *Streamer) BroadcastJson(event string, data interface{}) error
- func (s *Streamer) ConnectionCount() int
- func (s *Streamer) Dispatcher(client *Client, rw http.ResponseWriter, r *http.Request)
- func (s *Streamer) Multicast(event string, data string, users []string) error
- func (s *Streamer) MulticastJson(event string, data interface{}, users []string) error
- func (s *Streamer) NewClient(userKey string) (*Client, error)
- func (s *Streamer) ServeHTTP(rw http.ResponseWriter, r *http.Request)
- func (s *Streamer) SetHTTPHeaders(rw http.ResponseWriter)
- func (s *Streamer) Start()
- func (s *Streamer) Stop()
- func (s *Streamer) Unicast(event string, data string, clientID ID) error
- func (s *Streamer) UnicastJson(event string, data interface{}, clientID ID) error
- type UserAuthenticator
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrStreamerStopped = errors.New("this streamer stopped")
)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetConnectionID ¶
func (*Client) GetUserKey ¶
type Options ¶
type Options struct { NoXAccelBuffering bool SendChanBufferSize uint UserAuthenticator UserAuthenticator }
func NewDefaultOptions ¶
func NewDefaultOptions() Options
type Streamer ¶
type Streamer struct {
// contains filtered or unexported fields
}
Streamer SSE Streamer
func NewStreamer ¶
func (*Streamer) BroadcastJson ¶
func (*Streamer) ConnectionCount ¶
func (*Streamer) Dispatcher ¶
func (*Streamer) MulticastJson ¶
func (*Streamer) SetHTTPHeaders ¶
func (s *Streamer) SetHTTPHeaders(rw http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.