Update godoc for packages tcp, toml, uuid
parent
218fc3890d
commit
bb93f8c593
|
@ -1,3 +1,4 @@
|
|||
// Package tcp provides a simple multiplexer over TCP.
|
||||
package tcp // import "github.com/influxdata/influxdb/tcp"
|
||||
|
||||
import (
|
||||
|
@ -53,7 +54,7 @@ func (rc *replayConn) Read(b []byte) (int, error) {
|
|||
return 1, nil
|
||||
}
|
||||
|
||||
// NewMux returns a new instance of Mux for ln.
|
||||
// NewMux returns a new instance of Mux.
|
||||
func NewMux() *Mux {
|
||||
return &Mux{
|
||||
m: make(map[byte]*listener),
|
||||
|
@ -62,7 +63,7 @@ func NewMux() *Mux {
|
|||
}
|
||||
}
|
||||
|
||||
// Serve handles connections from ln and multiplexes then across registered listener.
|
||||
// Serve handles connections from ln and multiplexes then across registered listeners.
|
||||
func (mux *Mux) Serve(ln net.Listener) error {
|
||||
mux.mu.Lock()
|
||||
mux.ln = ln
|
||||
|
@ -174,7 +175,7 @@ func (mux *Mux) Listen(header byte) net.Listener {
|
|||
// first byte of the connection as a short first Read().
|
||||
//
|
||||
// This can be used to pass to an HTTP server, so long as there are no conflicts
|
||||
// with registsered listener bytes and the first character of the HTTP request:
|
||||
// with registered listener bytes and the first character of the HTTP request:
|
||||
// 71 ('G') for GET, etc.
|
||||
func (mux *Mux) DefaultListener() net.Listener {
|
||||
if mux.defaultListener == nil {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// Package toml adds support to marshal and unmarshal types not in the official TOML spec.
|
||||
package toml // import "github.com/influxdata/influxdb/toml"
|
||||
|
||||
import (
|
||||
|
@ -12,6 +13,7 @@ const maxInt = int64(^uint(0) >> 1)
|
|||
// Duration is a TOML wrapper type for time.Duration.
|
||||
type Duration time.Duration
|
||||
|
||||
// String returns the string representation of the duration.
|
||||
func (d Duration) String() string {
|
||||
return time.Duration(d).String()
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
//
|
||||
// http://tools.ietf.org/html/rfc4122
|
||||
|
||||
// Package uuid provides functions to create time-based UUIDs.
|
||||
package uuid // import "github.com/influxdata/influxdb/uuid"
|
||||
|
||||
import (
|
||||
|
|
Loading…
Reference in New Issue