Documentation ¶
Index ¶
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) Flush(timeout int, plugins []string, identifiers []string) error
- func (c *Conn) GetValue(name string) (map[string]float64, error)
- func (c *Conn) ListValues() (map[string]time.Time, error)
- func (c *Conn) PutNotif(opts map[string]string, message string) error
- func (c *Conn) PutValue(name string, opts map[string]string, t *time.Time, values ...interface{}) error
- func (c *Conn) SendCommand(command string) ([]string, error)
- type Error
- type IOError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func New ¶
func New(rw io.ReadWriteCloser) *Conn
New creates a collectd connection. Usually you will want to use DialUnix instead.
func (*Conn) Close ¶
Close closes the underlying io.ReadWriteCloser. If using DialUnix, this must be called to properly close the socket. If using New, it is optional.
func (*Conn) Flush ¶
Flush flushes cached data older than timeout seconds. Use -1 to specify no timeout. By specifying plugins and identifiers the flushing can be limited to those.
func (*Conn) GetValue ¶
GetValue returns the values for an identifier. The map maps names to values.
func (*Conn) ListValues ¶
ListValues returns all values known to collectd. The map maps identifier to time of last update.
func (*Conn) PutValue ¶
func (c *Conn) PutValue(name string, opts map[string]string, t *time.Time, values ...interface{}) error
PutValue submits values to collectd. Each value can be a number or the string "U" to mean undefined. If t is nil, collectd will determine the current timestamp. opts is a key=value map of options.