Documentation ¶
Index ¶
- Constants
- Variables
- func ParseSize(s string) (bytes uint64, err error)
- func SizeStr(bytes uint64) (s string, err error)
- type ByteSize
- func (b ByteSize) Bytes() uint64
- func (b ByteSize) EBytes() float64
- func (b ByteSize) GBytes() float64
- func (b ByteSize) HR() string
- func (b ByteSize) HumanReadable() (s string)
- func (b ByteSize) KBytes() float64
- func (b ByteSize) MBytes() float64
- func (b *ByteSize) MustParse(str string) *ByteSize
- func (b ByteSize) PBytes() float64
- func (b *ByteSize) Parse(str string) (err error)
- func (b ByteSize) String() (s string)
- func (b ByteSize) TBytes() float64
- type BytesBuilder
- func (s *BytesBuilder) Bytes() []byte
- func (s *BytesBuilder) String() string
- func (s *BytesBuilder) Write(data []byte) (err error)
- func (s *BytesBuilder) WriteLn(data []byte) (err error)
- func (s *BytesBuilder) WriteStr(format string, values ...interface{}) (err error)
- func (s *BytesBuilder) WriteStrLn(format string, values ...interface{}) (err error)
- type CircularBuffer
- func (b *CircularBuffer) Bytes() []byte
- func (b *CircularBuffer) Close() error
- func (b *CircularBuffer) NewHistoryReader() io.ReadCloser
- func (b *CircularBuffer) NewReader() io.ReadCloser
- func (b *CircularBuffer) Reset()
- func (b *CircularBuffer) ResetReader(r io.ReadCloser)
- func (b *CircularBuffer) SetReaderDeadline(r io.ReadCloser, deadline time.Time)
- func (b *CircularBuffer) TouchTime() time.Time
- func (b *CircularBuffer) Write(p []byte) (n int, err error)
- func (b *CircularBuffer) Writer() *IOWriter
- type CircularReader
- type IOWriter
- type Pool
Constants ¶
Variables ¶
View Source
var ErrBits = errors.New("unit with capital unit prefix and lower case unit (b) - bits, not bytes ")
Functions ¶
Types ¶
type BytesBuilder ¶
type BytesBuilder struct {
// contains filtered or unexported fields
}
func NewBytesBuilder ¶
func NewBytesBuilder() *BytesBuilder
func (*BytesBuilder) Bytes ¶
func (s *BytesBuilder) Bytes() []byte
func (*BytesBuilder) String ¶
func (s *BytesBuilder) String() string
func (*BytesBuilder) Write ¶
func (s *BytesBuilder) Write(data []byte) (err error)
func (*BytesBuilder) WriteLn ¶
func (s *BytesBuilder) WriteLn(data []byte) (err error)
func (*BytesBuilder) WriteStr ¶
func (s *BytesBuilder) WriteStr(format string, values ...interface{}) (err error)
func (*BytesBuilder) WriteStrLn ¶
func (s *BytesBuilder) WriteStrLn(format string, values ...interface{}) (err error)
type CircularBuffer ¶
type CircularBuffer struct {
// contains filtered or unexported fields
}
func NewCircularBuffer ¶
func NewCircularBuffer(size int) *CircularBuffer
func (*CircularBuffer) Bytes ¶
func (b *CircularBuffer) Bytes() []byte
func (*CircularBuffer) Close ¶
func (b *CircularBuffer) Close() error
func (*CircularBuffer) NewHistoryReader ¶
func (b *CircularBuffer) NewHistoryReader() io.ReadCloser
func (*CircularBuffer) NewReader ¶
func (b *CircularBuffer) NewReader() io.ReadCloser
func (*CircularBuffer) Reset ¶
func (b *CircularBuffer) Reset()
func (*CircularBuffer) ResetReader ¶
func (b *CircularBuffer) ResetReader(r io.ReadCloser)
func (*CircularBuffer) SetReaderDeadline ¶
func (b *CircularBuffer) SetReaderDeadline(r io.ReadCloser, deadline time.Time)
func (*CircularBuffer) TouchTime ¶
func (b *CircularBuffer) TouchTime() time.Time
func (*CircularBuffer) Writer ¶
func (b *CircularBuffer) Writer() *IOWriter
type CircularReader ¶
type CircularReader struct {
// contains filtered or unexported fields
}
func (*CircularReader) Close ¶
func (r *CircularReader) Close() error
type IOWriter ¶
type IOWriter struct {
// contains filtered or unexported fields
}
func NewIOWriter ¶
func (*IOWriter) WriteStrLn ¶
Click to show internal directories.
Click to hide internal directories.