Documentation ¶
Overview ¶
Package websocketutil contains methods for interacting with websocket connections.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IWebsocketUtil ¶
type IWebsocketUtil interface { OpenConnection(url string) (*websocket.Conn, error) CloseConnection(ws websocket.Conn) error }
IWebsocketUtil is the interface for the websocketutil.
type WebsocketUtil ¶
type WebsocketUtil struct {
// contains filtered or unexported fields
}
WebsocketUtil struct provides functionality around creating and maintaining websockets.
func NewWebsocketUtil ¶
func NewWebsocketUtil(logger log.T, dialerInput *websocket.Dialer) *WebsocketUtil
NewWebsocketUtil is the factory function for websocketutil.
func (*WebsocketUtil) CloseConnection ¶
func (u *WebsocketUtil) CloseConnection(ws *websocket.Conn) error
CloseConnection closes a websocket connection given the Conn object as input.
func (*WebsocketUtil) OpenConnection ¶
func (u *WebsocketUtil) OpenConnection(url string) (*websocket.Conn, error)
OpenConnection opens a websocket connection provided an input url.
Click to show internal directories.
Click to hide internal directories.