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 ¶
Message represents a WebSocket message container. Message types are defined in RFC 6455, section 11.8.
type WebSocketSink ¶
type WebSocketSink struct {
// contains filtered or unexported fields
}
WebSocketSink represents a WebSocket sink connector.
func NewWebSocketSink ¶
func NewWebSocketSink(ctx context.Context, url string) (*WebSocketSink, error)
NewWebSocketSink creates and returns a new WebSocketSink using the default dialer.
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<- any
In returns an input channel for receiving data.
type WebSocketSource ¶
type WebSocketSource struct {
// contains filtered or unexported fields
}
WebSocketSource represents a WebSocket source connector.
func NewWebSocketSource ¶
func NewWebSocketSource(ctx context.Context, url string) (*WebSocketSource, error)
NewWebSocketSource creates and returns a new WebSocketSource using the default dialer.
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 any
Out returns an output channel for sending data.