Documentation ¶
Index ¶
- func ResumingStream(connect func(int64) (*http.Response, error, bool), outputCh interface{}) (stream.Stream, error)
- func Stream(res *http.Response, outputCh interface{}) stream.Stream
- func ToJSON(v interface{}) (io.Reader, error)
- type Client
- func (c *Client) Delete(path string) error
- func (c *Client) Get(path string, out interface{}) error
- func (c *Client) Hijack(method, path string, header http.Header, in interface{}) (ReadWriteCloser, error)
- func (c *Client) Post(path string, in, out interface{}) error
- func (c *Client) Put(path string, in, out interface{}) error
- func (c *Client) RawReq(method, path string, header http.Header, in, out interface{}) (*http.Response, error)
- func (c *Client) RawReqWithHTTP(method, path string, header http.Header, in, out interface{}, ...) (*http.Response, error)
- func (c *Client) ResumingStream(method, path string, ch interface{}) (stream.Stream, error)
- func (c *Client) Send(method, path string, in, out interface{}) error
- func (c *Client) Stream(method, path string, in, out interface{}) (stream.Stream, error)
- func (c *Client) StreamWithHeader(method, path string, header http.Header, in, out interface{}) (stream.Stream, error)
- type DialFunc
- type ReadWriteCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResumingStream ¶
func Stream ¶
Stream manufactures a `pkg/stream.Stream`, starts a worker pumping events out of decoding, and returns that.
The 'outputCh' parameter must be a sendable channel. The "zero"-values of channel's content type will be created and used in the deserialization, then sent.
The return values from `httpclient.RawReq` are probably a useful starting point for the 'res' parameter.
Closing the returned `stream.Stream` shuts down the worker.
Types ¶
type Client ¶
type Client struct { ErrNotFound error URL string Key string Host string HTTP *http.Client HijackDial DialFunc }
func (*Client) RawReqWithHTTP ¶
func (*Client) ResumingStream ¶
type ReadWriteCloser ¶
type ReadWriteCloser interface { io.ReadWriteCloser CloseWrite() error }
Click to show internal directories.
Click to hide internal directories.