Documentation ¶
Overview ¶
Package ws implements the WebSocket connector.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { // The message types are defined in RFC 6455, section 11.8. MsgType int Payload []byte }
Message represents a message from peer
type WebSocketSink ¶
type WebSocketSink struct {
// contains filtered or unexported fields
}
WebSocketSink connector
func NewWebSocketSink ¶
func NewWebSocketSink(ctx context.Context, url string) (*WebSocketSink, error)
NewWebSocketSink returns a new WebSocketSink instance
func NewWebSocketSinkWithDialer ¶
func NewWebSocketSinkWithDialer(ctx context.Context, url string, dialer *websocket.Dialer) (*WebSocketSink, error)
NewWebSocketSinkWithDialer returns a new WebSocketSink instance
func (*WebSocketSink) In ¶
func (wsock *WebSocketSink) In() chan<- interface{}
In returns an input channel for receiving data
type WebSocketSource ¶
type WebSocketSource struct {
// contains filtered or unexported fields
}
WebSocketSource connector
func NewWebSocketSource ¶
func NewWebSocketSource(ctx context.Context, url string) (*WebSocketSource, error)
NewWebSocketSource returns a new WebSocketSource instance
func NewWebSocketSourceWithDialer ¶
func NewWebSocketSourceWithDialer(ctx context.Context, url string, dialer *websocket.Dialer) (*WebSocketSource, error)
NewWebSocketSourceWithDialer returns a new WebSocketSource instance
func (*WebSocketSource) Out ¶
func (wsock *WebSocketSource) Out() <-chan interface{}
Out returns an output channel for sending data
func (*WebSocketSource) Via ¶
func (wsock *WebSocketSource) Via(_flow streams.Flow) streams.Flow
Via streams data through the given flow
Click to show internal directories.
Click to hide internal directories.