Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AfterFunc ¶
AfterFunc runs after each read. num means the number of calling Read, starts from 1.
type BeforeFunc ¶
BeforeFunc runs before each Read. num means the number of calling Read, starts from 1.
type CallbackReader ¶
type CallbackReader struct {
// contains filtered or unexported fields
}
CallbackReader is counter for io.Reader
func (*CallbackReader) OnAfter ¶
func (cr *CallbackReader) OnAfter(fn AfterFunc)
OnAfter registers callback function running after the last read.
func (*CallbackReader) OnBefore ¶
func (cr *CallbackReader) OnBefore(fn BeforeFunc)
OnBefore registers callback function running before the first read.
Click to show internal directories.
Click to hide internal directories.