Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddFanAction ¶
type AddFanAction struct {
// contains filtered or unexported fields
}
type FanConn ¶
type FanConn interface {
WriteMessage(int, []byte) error
NextReader() (int, io.Reader, error)
Close() error
}
A websocket that we only write messages to
type FanOutAction ¶
type FanOutAction struct {
// contains filtered or unexported fields
}
type RemoveFanAction ¶ added in v0.8.5
type RemoveFanAction struct {
// contains filtered or unexported fields
}
type Room ¶
type Room struct {
// contains filtered or unexported fields
}
A room where messages from a source are broadcast to all the followers.
func (*Room) AddFan ¶
func (r *Room) AddFan(ctx context.Context, conn FanConn)
Add a fan that consumes messages from the source. Calling AddFan() after Close() will error.
func (*Room) Close ¶
func (r *Room) Close()
Only close the room when we know AddFan can't be called.
func (*Room) ConsumeSource ¶
func (r *Room) ConsumeSource(ctx context.Context) error
Receive messages from the source websocket and put them through the state loop.
type SailServer ¶
type SailServer struct {
// contains filtered or unexported fields
}
func ProvideSailServer ¶
func ProvideSailServer(assetServer assets.Server) SailServer
type SourceConn ¶
type SourceConn interface {
ReadMessage() (int, []byte, error)
Close() error
}
A websocket that we only read messages from
Click to show internal directories.
Click to hide internal directories.