Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPrintWriter ¶ added in v0.5.5
func NewRateLimitWriter ¶
func NewRateLimitWriter(ctx context.Context, rawWriter io.WriteCloser, rateBytes int64) io.WriteCloser
Types ¶
type BytesCounterWriter ¶
type BytesCounterWriter struct {
// contains filtered or unexported fields
}
func NewBytesCounterWriter ¶
func NewBytesCounterWriter(rawWriter io.Writer) *BytesCounterWriter
func (*BytesCounterWriter) Close ¶
func (this *BytesCounterWriter) Close() error
func (*BytesCounterWriter) RawWriter ¶
func (this *BytesCounterWriter) RawWriter() io.Writer
func (*BytesCounterWriter) TotalBytes ¶
func (this *BytesCounterWriter) TotalBytes() int64
type PrintWriter ¶ added in v0.5.5
type PrintWriter struct {
// contains filtered or unexported fields
}
type RateLimitWriter ¶
type RateLimitWriter struct {
// contains filtered or unexported fields
}
RateLimitWriter 限速写入
func (*RateLimitWriter) Close ¶
func (this *RateLimitWriter) Close() error
type TeeWriterCloser ¶
type TeeWriterCloser struct {
// contains filtered or unexported fields
}
func NewTeeWriterCloser ¶
func NewTeeWriterCloser(primaryW io.WriteCloser, secondaryW io.WriteCloser) *TeeWriterCloser
func (*TeeWriterCloser) Close ¶
func (this *TeeWriterCloser) Close() error
func (*TeeWriterCloser) OnFail ¶
func (this *TeeWriterCloser) OnFail(onFail func(err error))
Click to show internal directories.
Click to hide internal directories.