Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BufferIsFullErr = errors.New("buffer is full")
View Source
var EndOfBuffer = errors.New("buffer already closed")
Functions ¶
func GetGitAuth ¶
func GetGitAuth() (transport.AuthMethod, error)
Types ¶
type WheelBuffer ¶
type WheelBuffer struct {
// contains filtered or unexported fields
}
WheelBuffer is like a ring buffer except that a Write can overwrite unread messages. It's concurrency safe
func NewWheelBuffer ¶
func NewWheelBuffer(n int) *WheelBuffer
func (*WheelBuffer) Close ¶
func (rb *WheelBuffer) Close()
func (*WheelBuffer) ReadString ¶
func (rb *WheelBuffer) ReadString() (string, error)
func (*WheelBuffer) WriteString ¶
func (rb *WheelBuffer) WriteString(str string) (retPrev string, retErr error)
WriteString never blocks. It overwrites the head if the buffer is full, and returns the previous head
Click to show internal directories.
Click to hide internal directories.