Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FollowedFile ¶
func FollowFile ¶
func FollowFile(path string) (file *FollowedFile, err error)
func (FollowedFile) Close ¶
func (f FollowedFile) Close() error
type NopFlusher ¶
type NopFlusher struct{}
type WriteFlusher ¶
type WriteFlusher struct {
// contains filtered or unexported fields
}
WriteFlusher wraps the Write and Flush operation ensuring that every write is a flush. In addition, the Close method can be called to intercept Read/Write calls if the targets lifecycle has already ended.
func NewWriteFlusher ¶
func NewWriteFlusher(w io.Writer) *WriteFlusher
NewWriteFlusher returns a new WriteFlusher.
func (*WriteFlusher) Close ¶
func (wf *WriteFlusher) Close() error
Close closes the write flusher, disallowing any further writes to the target. After the flusher is closed, all calls to write or flush will result in an error.
func (*WriteFlusher) Flushed ¶
func (wf *WriteFlusher) Flushed() bool
Flushed returns the state of flushed. If it's flushed, return true, or else it return false.
Notes ¶
Bugs ¶
Remove this method. Its use is inherently racy. Seems to be used to detect whether or a response code has been issued or not. Another hook should be used instead.