Skip to content

0.5.0

Latest
Compare
Choose a tag to compare
@octo octo released this 05 Jun 08:05
· 9 commits to master since this release
b6ba26f

Package collectd.org/config

  • New package to represent collectd configurations.
  • The Block type corresponds to oconfig_item_t, the Value type corresponds to oconfig_value_t.
  • Block.Unmarshal maps a config.Block hierarchy to a Go type.
  • Block.MarshalText produces a text output that could be parsed by collectd as a config file.
  • The Port type represents a port number in the configuration. It demonstrates how to override the default unmarshaling rules to implement specialized behavior, such as range checking.

Package collectd.org/plugin

  • Configuration callbacks, i.e. types implementing the Configurer interface, have been added. They are registered with RegisterConfig. Thanks to @alowde!
  • The new LogWriter type implements an io.Writer on top of collectd's logging infrastructure. This allows, for example, to create a log.Logger backed by collectd.