Documentation ¶
Index ¶
- Constants
- func GetProgramDir() string
- func HumanFriendlyTraffic(bytes uint64) string
- func Must(err error)
- func Must2(_ interface{}, err error)
- func NewBufioReadWriter(rw io.ReadWriter) *bufio.ReadWriter
- func ReadByte(r io.Reader) (byte, error)
- func RegisterOptionHandler(h OptionHandler)
- func SHA224String(password string) string
- type Address
- type AddressType
- type Error
- type Notifier
- type OptionHandler
- type RewindConn
- type RewindReadWriteCloser
- type RewindReader
- type Runnable
Constants ¶
View Source
const ( KiB = 1024 MiB = KiB * 1024 GiB = MiB * 1024 )
View Source
const (
Version = "v0.4.5"
)
Variables ¶
This section is empty.
Functions ¶
func GetProgramDir ¶ added in v0.1.0
func GetProgramDir() string
func HumanFriendlyTraffic ¶
func NewBufioReadWriter ¶ added in v0.3.0
func NewBufioReadWriter(rw io.ReadWriter) *bufio.ReadWriter
func RegisterOptionHandler ¶ added in v0.0.15
func RegisterOptionHandler(h OptionHandler)
func SHA224String ¶
Types ¶
type AddressType ¶ added in v0.1.4
type AddressType byte
const ( IPv4 AddressType = 1 DomainName AddressType = 3 IPv6 AddressType = 4 )
type Notifier ¶ added in v0.3.0
type Notifier struct {
// contains filtered or unexported fields
}
Notifier is a utility for notifying changes. The change producer may notify changes multiple time, and the consumer may get notified asynchronously.
type OptionHandler ¶ added in v0.0.15
func PopOptionHandler ¶ added in v0.0.15
func PopOptionHandler() (OptionHandler, error)
type RewindConn ¶ added in v0.4.0
type RewindConn struct { R *RewindReader net.Conn }
func NewRewindConn ¶ added in v0.4.0
func NewRewindConn(conn net.Conn) *RewindConn
type RewindReadWriteCloser ¶ added in v0.3.0
type RewindReadWriteCloser struct { *RewindReader // contains filtered or unexported fields }
func NewRewindReadWriteCloser ¶ added in v0.3.0
func NewRewindReadWriteCloser(rwc io.ReadWriteCloser) *RewindReadWriteCloser
func (*RewindReadWriteCloser) Close ¶ added in v0.3.0
func (rwc *RewindReadWriteCloser) Close() error
type RewindReader ¶ added in v0.3.0
type RewindReader struct { io.Reader io.ByteReader // contains filtered or unexported fields }
func NewRewindReader ¶ added in v0.3.0
func NewRewindReader(r io.Reader) *RewindReader
func (*RewindReader) ReadByte ¶ added in v0.3.0
func (r *RewindReader) ReadByte() (byte, error)
func (*RewindReader) Rewind ¶ added in v0.3.0
func (r *RewindReader) Rewind()
func (*RewindReader) SetBufferSize ¶ added in v0.3.0
func (r *RewindReader) SetBufferSize(size int)
func (*RewindReader) StopBuffering ¶ added in v0.3.0
func (r *RewindReader) StopBuffering()
Click to show internal directories.
Click to hide internal directories.