Documentation ¶
Index ¶
- type Reader
- type Stream
- func (s *Stream) AddHeader(k, v string)
- func (s *Stream) Append(header def.ReadHeader) map[string]string
- func (s *Stream) Close() error
- func (s *Stream) Code() int
- func (s *Stream) ContentType() string
- func (s *Stream) Read(p []byte) (n int, err error)
- func (s *Stream) Register() []reflect.Type
- func (s *Stream) Return() io.Reader
- func (s *Stream) SetContentType(conTyp string)
- func (s *Stream) SetRateLimit(bytesPerSec float64)
- func (s *Stream) Strings() string
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func NewReaderWithContext ¶
NewReaderWithContext returns a reader that implements io.Reader with rate limiting.
func (*Reader) SetRateLimit ¶
SetRateLimit sets rate limit (bytes/sec) to the reader.
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func (*Stream) ContentType ¶
func (*Stream) SetContentType ¶
func (*Stream) SetRateLimit ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func NewWriterWithContext ¶
NewWriterWithContext returns a writer that implements io.Writer with rate limiting.
func (*Writer) SetRateLimit ¶
SetRateLimit sets rate limit (bytes/sec) to the writer.
Click to show internal directories.
Click to hide internal directories.