Difference between revisions of "Meta Data Interface"

From collectd Wiki
Jump to: navigation, search
(Created initial page.)
m (See also: Add <code /> tags.)
Line 13: Line 13:
== See also ==
== See also ==
* [[value_list_t]]
* <code>[[value_list_t]]</code>
* [[notification_t]]
* <code>[[notification_t]]</code>

Revision as of 15:24, 15 July 2009

The meta data interface provides code with a simple and straight forward possibility to attach some information to an already existing struct. It is currently included in the value_list_t structure, will be added to the notification_t (which already has a similar data structure which will be replaced) and should ultimately be added to the global value cache.

A set of meta data is represented by an opaque data structure of type meta_data_t. A pointer to a newly allocated data structure can be obtained using meta_data_create. The pointer must be freed using meta_data_destroy.

The information stored within such a structure is organized in a key-value fashion, i. e. a string value is used to identify values. If the key already exists when adding a new value, the old value will be discarded. The use of a prefix to prevent name clashes is recommended.


All declarations are in the src/meta_data.h header file.

<c>#include "meta_data.h"</c>

See also