Documentation
¶
Index ¶
- Variables
- func HttpGet(ctx context.Context, url string, header map[string]string, data g.Map, ...) ([]byte, error)
- func HttpPost(ctx context.Context, url string, header map[string]string, ...) ([]byte, error)
- type RequestErrorHandler
- type StreamReader
- type WebSocketConn
- func (c *WebSocketConn) Close() (err error)
- func (c *WebSocketConn) ReadMessage(ctx context.Context) (int, []byte, error)
- func (c *WebSocketConn) WriteJSON(ctx context.Context, message interface{}) error
- func (c *WebSocketConn) WriteMessage(ctx context.Context, messageType int, message []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrTooManyEmptyStreamMessages = errors.New("stream has sent too many empty messages")
)
Functions ¶
Types ¶
type RequestErrorHandler ¶
type StreamReader ¶
type StreamReader struct {
// contains filtered or unexported fields
}
func SSEClient ¶
func SSEClient(ctx context.Context, url string, header map[string]string, data interface{}, proxyURL string, requestErrorHandler RequestErrorHandler) (stream *StreamReader, err error)
func (*StreamReader) Close ¶
func (stream *StreamReader) Close() error
func (*StreamReader) Recv ¶
func (stream *StreamReader) Recv() (response []byte, err error)
type WebSocketConn ¶
type WebSocketConn struct {
// contains filtered or unexported fields
}
func WebSocketClient ¶
func (*WebSocketConn) Close ¶
func (c *WebSocketConn) Close() (err error)
func (*WebSocketConn) ReadMessage ¶
func (*WebSocketConn) WriteJSON ¶
func (c *WebSocketConn) WriteJSON(ctx context.Context, message interface{}) error
func (*WebSocketConn) WriteMessage ¶
Click to show internal directories.
Click to hide internal directories.