sstore-1 - API for Statistics Store
#include <rad/client/1/sstore.h> cc [ flag... ] file... -lsstore1_client [ library... ] interface Configuration unsigned long long max_result_size ; (rw) const char * door_path ; (rw) interface Data rc_err_t sstore_Data_read(rc_instance_t *inst, const char **ssids, int ssids_count, sstore_Range_t *range, sstore_Format_t *format, sstore_ReadResult_t **result, sstore_Error_t **error); rc_err_t sstore_Data_purge(rc_instance_t *inst, const char **ssids, int ssids_count, sstore_Range_t *range, sstore_Warning_t ***result, int *result_cnt, sstore_Error_t **error); interface Info rc_err_t sstore_Info_read(rc_instance_t *inst, const char **ssids, int ssids_count, sstore_Range_t *range, sstore_Format_t *format, sstore_ReadResult_t **result, sstore_Error_t **error); interface Namespace rc_err_t sstore_Namespace_read(rc_instance_t *inst, const char **ssids, int ssids_count, sstore_Range_t *range, sstore_Format_t *format, sstore_ReadResult_t **result, sstore_Error_t **error); interface Batch rc_err_t sstore_Batch_read(rc_instance_t *inst, const sstore__rad_dict_string_BatchRequest_t *requests, sstore_Format_t *format, sstore__rad_dict_string_BatchResult_t **result, sstore_Error_t **error); interface Collection boolean_t enabled ; (rw) const char ** ssids ; (rw) const char * name ; (ro) const char * owner ; (ro) const char * uuid ; (ro) rc_err_t sstore_Collection__rad_create(rc_instance_t *inst, boolean_t enabled, const char *name, const char *owner, const char **ssids, int ssids_count, rc_instance_t **result, sstore_Error_t **error); rc_err_t sstore_Collection__rad_update(rc_instance_t *inst, sstore_Collection_enabled_t *enabled, sstore_Collection_ssids_t *ssids); rc_err_t sstore_Collection__rad_delete(rc_instance_t *inst); Enumerated Types enum WarningCode typedef enum sstore_WarningCode { SWC_INVALID = 1, SWC_INTERNAL = 2, SWC_CONNECTION_ERROR = 3, SWC_UNAUTHORIZED = 4, SWC_NOENT = 5, SWC_NODATA_YET = 6, } sstore_WarningCode_t; enum ErrorCode typedef enum sstore_ErrorCode { SEC_INVALID_ARGUMENT = 3, SEC_TOO_BIG = 4, SEC_RETRY = 5, SEC_NOMEM = 6, SEC_CONNECTION_BROKEN = 7, SEC_UNAUTHORIZED = 8, SEC_INTERNAL = 9, } sstore_ErrorCode_t; enum Format typedef enum sstore_Format { SF_JSON = 1, SF_CSV = 2, } sstore_Format_t; enum PointType typedef enum sstore_PointType { SPT_VALUE_POINT = 0, SPT_RANGE_POINT = 1, } sstore_PointType_t; enum RangeType typedef enum sstore_RangeType { SRT_RANGE_BY_TIME = 0, SRT_RANGE_BY_POINTS = 1, } sstore_RangeType_t; enum RequestType typedef enum sstore_RequestType { SRT_DATA_READ = 0, SRT_INFO_READ = 1, SRT_NAMESPACE_READ = 2, } sstore_RequestType_t; enum ValueType typedef enum sstore_ValueType { SVT_UNKNOWN = 0, SVT_BOOLEAN = 1, SVT_DICTIONARY = 2, SVT_DICTIONARY_ARRAY = 3, SVT_NUMBER = 4, SVT_NUMBER_ARRAY = 5, SVT_REAL = 6, SVT_REAL_ARRAY = 7, SVT_STRING = 8, SVT_STRING_ARRAY = 9, SVT_PARTITION = 10, SVT_NO_DATA = 11, SVT_NO_DATA_YET = 12, } sstore_ValueType_t; Structured Types struct RangeByTime typedef struct sstore_RangeByTime sstore_RangeByTime_t; struct sstore_RangeByTime { unsigned long long srbt_start_ts; unsigned long long srbt_end_ts; unsigned long long srbt_step; }; void sstore_RangeByTime_free(sstore_RangeByTime_t *in); struct RangeByPoints typedef struct sstore_RangeByPoints sstore_RangeByPoints_t; struct sstore_RangeByPoints { unsigned long long srbp_start_ts; long long srbp_relative_points; }; void sstore_RangeByPoints_free(sstore_RangeByPoints_t *in); struct Range typedef struct sstore_Range sstore_Range_t; struct sstore_Range { sstore_RangeType_t sr_range_type; sstore_RangeByTime_t *sr_range_by_time; sstore_RangeByPoints_t *sr_range_by_points; boolean_t sr_show_unstable; boolean_t sr_show_unbrowsable; }; void sstore_Range_free(sstore_Range_t *in); struct ValueDictionary typedef struct sstore_ValueDictionary sstore_ValueDictionary_t; struct sstore_ValueDictionary { sstore__rad_dict_string_Value_t *svd_dict; }; void sstore_ValueDictionary_free(sstore_ValueDictionary_t *in); struct Value typedef struct sstore_Value sstore_Value_t; struct sstore_Value { sstore_ValueType_t sv_type; sstore__rad_dict_string_Value_t *sv_dictionary; sstore_ValueDictionary_t **sv_dictionary_array; int sv_dictionary_array_count; boolean_t sv_boolean_val; unsigned long long sv_number; unsigned long long *sv_number_array; int sv_number_array_count; double sv_real; double *sv_real_array; int sv_real_array_count; char *sv_string; char **sv_string_array; int sv_string_array_count; }; void sstore_Value_free(sstore_Value_t *in); struct Warning typedef struct sstore_Warning sstore_Warning_t; struct sstore_Warning { sstore_WarningCode_t sw_code; char *sw_ssid; char *sw_reason; }; void sstore_Warning_free(sstore_Warning_t *in); struct Error typedef struct sstore_Error sstore_Error_t; struct sstore_Error { sstore_ErrorCode_t se_code; char *se_action; char *se_reason; }; void sstore_Error_free(sstore_Error_t *in); struct ValuePoint typedef struct sstore_ValuePoint sstore_ValuePoint_t; struct sstore_ValuePoint { unsigned long long svp_ts; sstore_Value_t *svp_value; }; void sstore_ValuePoint_free(sstore_ValuePoint_t *in); struct RangePoint typedef struct sstore_RangePoint sstore_RangePoint_t; struct sstore_RangePoint { unsigned long long srp_start_ts; unsigned long long srp_end_ts; }; void sstore_RangePoint_free(sstore_RangePoint_t *in); struct Point typedef struct sstore_Point sstore_Point_t; struct sstore_Point { sstore_PointType_t sp_point_type; sstore_ValuePoint_t *sp_point_value; sstore_RangePoint_t *sp_point_range; }; void sstore_Point_free(sstore_Point_t *in); struct SSIDRecord typedef struct sstore_SSIDRecord sstore_SSIDRecord_t; struct sstore_SSIDRecord { char *sssidr_ssid; sstore_Point_t **sssidr_points; int sssidr_points_count; }; void sstore_SSIDRecord_free(sstore_SSIDRecord_t *in); struct ReadResult typedef struct sstore_ReadResult sstore_ReadResult_t; struct sstore_ReadResult { sstore_SSIDRecord_t **srr_records; int srr_records_count; char *srr_formatted_records; sstore_Warning_t **srr_warnings; int srr_warnings_count; }; void sstore_ReadResult_free(sstore_ReadResult_t *in); struct BatchRequest typedef struct sstore_BatchRequest sstore_BatchRequest_t; struct sstore_BatchRequest { sstore_RequestType_t sbr_req_type; char **sbr_ssids; int sbr_ssids_count; sstore_Range_t *sbr_range; }; void sstore_BatchRequest_free(sstore_BatchRequest_t *in); struct BatchResult typedef struct sstore_BatchResult sstore_BatchResult_t; struct sstore_BatchResult { sstore_ReadResult_t *sbr_data; sstore_Error_t *sbr_error; }; void sstore_BatchResult_free(sstore_BatchResult_t *in); Dictionaries Dictionary { string : BatchRequest } typedef struct base_rad_dict sstore__rad_dict_string_BatchRequest_t; Dictionary { string : BatchResult } typedef struct base_rad_dict sstore__rad_dict_string_BatchResult_t; Dictionary { string : Value } typedef struct base_rad_dict sstore__rad_dict_string_Value_t;
SSTORE-1(3rad) RAD Module Definitions SSTORE-1(3rad) NAME sstore - API for Statistics Store SYNOPSIS #include <rad/client/1/sstore.h> cc [ flag... ] file... -lsstore1_client [ library... ] interface Configuration unsigned long long max_result_size ; (rw) const char * door_path ; (rw) interface Data rc_err_t sstore_Data_read(rc_instance_t *inst, const char **ssids, int ssids_count, sstore_Range_t *range, sstore_Format_t *format, sstore_ReadResult_t **result, sstore_Error_t **error); rc_err_t sstore_Data_purge(rc_instance_t *inst, const char **ssids, int ssids_count, sstore_Range_t *range, sstore_Warning_t ***result, int *result_cnt, sstore_Error_t **error); interface Info rc_err_t sstore_Info_read(rc_instance_t *inst, const char **ssids, int ssids_count, sstore_Range_t *range, sstore_Format_t *format, sstore_ReadResult_t **result, sstore_Error_t **error); interface Namespace rc_err_t sstore_Namespace_read(rc_instance_t *inst, const char **ssids, int ssids_count, sstore_Range_t *range, sstore_Format_t *format, sstore_ReadResult_t **result, sstore_Error_t **error); interface Batch rc_err_t sstore_Batch_read(rc_instance_t *inst, const sstore__rad_dict_string_BatchRequest_t *requests, sstore_Format_t *format, sstore__rad_dict_string_BatchResult_t **result, sstore_Error_t **error); interface Collection boolean_t enabled ; (rw) const char ** ssids ; (rw) const char * name ; (ro) const char * owner ; (ro) const char * uuid ; (ro) rc_err_t sstore_Collection__rad_create(rc_instance_t *inst, boolean_t enabled, const char *name, const char *owner, const char **ssids, int ssids_count, rc_instance_t **result, sstore_Error_t **error); rc_err_t sstore_Collection__rad_update(rc_instance_t *inst, sstore_Collection_enabled_t *enabled, sstore_Collection_ssids_t *ssids); rc_err_t sstore_Collection__rad_delete(rc_instance_t *inst); Enumerated Types enum WarningCode typedef enum sstore_WarningCode { SWC_INVALID = 1, SWC_INTERNAL = 2, SWC_CONNECTION_ERROR = 3, SWC_UNAUTHORIZED = 4, SWC_NOENT = 5, SWC_NODATA_YET = 6, } sstore_WarningCode_t; enum ErrorCode typedef enum sstore_ErrorCode { SEC_INVALID_ARGUMENT = 3, SEC_TOO_BIG = 4, SEC_RETRY = 5, SEC_NOMEM = 6, SEC_CONNECTION_BROKEN = 7, SEC_UNAUTHORIZED = 8, SEC_INTERNAL = 9, } sstore_ErrorCode_t; enum Format typedef enum sstore_Format { SF_JSON = 1, SF_CSV = 2, } sstore_Format_t; enum PointType typedef enum sstore_PointType { SPT_VALUE_POINT = 0, SPT_RANGE_POINT = 1, } sstore_PointType_t; enum RangeType typedef enum sstore_RangeType { SRT_RANGE_BY_TIME = 0, SRT_RANGE_BY_POINTS = 1, } sstore_RangeType_t; enum RequestType typedef enum sstore_RequestType { SRT_DATA_READ = 0, SRT_INFO_READ = 1, SRT_NAMESPACE_READ = 2, } sstore_RequestType_t; enum ValueType typedef enum sstore_ValueType { SVT_UNKNOWN = 0, SVT_BOOLEAN = 1, SVT_DICTIONARY = 2, SVT_DICTIONARY_ARRAY = 3, SVT_NUMBER = 4, SVT_NUMBER_ARRAY = 5, SVT_REAL = 6, SVT_REAL_ARRAY = 7, SVT_STRING = 8, SVT_STRING_ARRAY = 9, SVT_PARTITION = 10, SVT_NO_DATA = 11, SVT_NO_DATA_YET = 12, } sstore_ValueType_t; Structured Types struct RangeByTime typedef struct sstore_RangeByTime sstore_RangeByTime_t; struct sstore_RangeByTime { unsigned long long srbt_start_ts; unsigned long long srbt_end_ts; unsigned long long srbt_step; }; void sstore_RangeByTime_free(sstore_RangeByTime_t *in); struct RangeByPoints typedef struct sstore_RangeByPoints sstore_RangeByPoints_t; struct sstore_RangeByPoints { unsigned long long srbp_start_ts; long long srbp_relative_points; }; void sstore_RangeByPoints_free(sstore_RangeByPoints_t *in); struct Range typedef struct sstore_Range sstore_Range_t; struct sstore_Range { sstore_RangeType_t sr_range_type; sstore_RangeByTime_t *sr_range_by_time; sstore_RangeByPoints_t *sr_range_by_points; boolean_t sr_show_unstable; boolean_t sr_show_unbrowsable; }; void sstore_Range_free(sstore_Range_t *in); struct ValueDictionary typedef struct sstore_ValueDictionary sstore_ValueDictionary_t; struct sstore_ValueDictionary { sstore__rad_dict_string_Value_t *svd_dict; }; void sstore_ValueDictionary_free(sstore_ValueDictionary_t *in); struct Value typedef struct sstore_Value sstore_Value_t; struct sstore_Value { sstore_ValueType_t sv_type; sstore__rad_dict_string_Value_t *sv_dictionary; sstore_ValueDictionary_t **sv_dictionary_array; int sv_dictionary_array_count; boolean_t sv_boolean_val; unsigned long long sv_number; unsigned long long *sv_number_array; int sv_number_array_count; double sv_real; double *sv_real_array; int sv_real_array_count; char *sv_string; char **sv_string_array; int sv_string_array_count; }; void sstore_Value_free(sstore_Value_t *in); struct Warning typedef struct sstore_Warning sstore_Warning_t; struct sstore_Warning { sstore_WarningCode_t sw_code; char *sw_ssid; char *sw_reason; }; void sstore_Warning_free(sstore_Warning_t *in); struct Error typedef struct sstore_Error sstore_Error_t; struct sstore_Error { sstore_ErrorCode_t se_code; char *se_action; char *se_reason; }; void sstore_Error_free(sstore_Error_t *in); struct ValuePoint typedef struct sstore_ValuePoint sstore_ValuePoint_t; struct sstore_ValuePoint { unsigned long long svp_ts; sstore_Value_t *svp_value; }; void sstore_ValuePoint_free(sstore_ValuePoint_t *in); struct RangePoint typedef struct sstore_RangePoint sstore_RangePoint_t; struct sstore_RangePoint { unsigned long long srp_start_ts; unsigned long long srp_end_ts; }; void sstore_RangePoint_free(sstore_RangePoint_t *in); struct Point typedef struct sstore_Point sstore_Point_t; struct sstore_Point { sstore_PointType_t sp_point_type; sstore_ValuePoint_t *sp_point_value; sstore_RangePoint_t *sp_point_range; }; void sstore_Point_free(sstore_Point_t *in); struct SSIDRecord typedef struct sstore_SSIDRecord sstore_SSIDRecord_t; struct sstore_SSIDRecord { char *sssidr_ssid; sstore_Point_t **sssidr_points; int sssidr_points_count; }; void sstore_SSIDRecord_free(sstore_SSIDRecord_t *in); struct ReadResult typedef struct sstore_ReadResult sstore_ReadResult_t; struct sstore_ReadResult { sstore_SSIDRecord_t **srr_records; int srr_records_count; char *srr_formatted_records; sstore_Warning_t **srr_warnings; int srr_warnings_count; }; void sstore_ReadResult_free(sstore_ReadResult_t *in); struct BatchRequest typedef struct sstore_BatchRequest sstore_BatchRequest_t; struct sstore_BatchRequest { sstore_RequestType_t sbr_req_type; char **sbr_ssids; int sbr_ssids_count; sstore_Range_t *sbr_range; }; void sstore_BatchRequest_free(sstore_BatchRequest_t *in); struct BatchResult typedef struct sstore_BatchResult sstore_BatchResult_t; struct sstore_BatchResult { sstore_ReadResult_t *sbr_data; sstore_Error_t *sbr_error; }; void sstore_BatchResult_free(sstore_BatchResult_t *in); Dictionaries Dictionary { string : BatchRequest } typedef struct base_rad_dict sstore__rad_dict_string_BatchRequest_t; Dictionary { string : BatchResult } typedef struct base_rad_dict sstore__rad_dict_string_BatchResult_t; Dictionary { string : Value } typedef struct base_rad_dict sstore__rad_dict_string_Value_t; DESCRIPTION API com.oracle.solaris.rad.sstore [1] The sstore RAD API exposes libsstore interfaces for reading data, info, or namespace for different SSIDs and enable or disable persistent recording of statistics and events. It also provides a batch interface to perform multiple read operations in a single request. The sstore RAD API provides the following interfaces: o Data provides access to historical and current stat/event data at different granularities. o Info provides access to historical and current metadata about different nodes in the sstore(7) namespace. o Namespace provides access to historical and current state of the sstore(7) namespace. o Batch is a higher level interface that provides a way to make multiple types of requests in a single batch. o Collection provides a way to create/read/update/delete an ssid-collection(4) in sstore(7). o Configuration provides access to the configurable properties of a RAD session. INTERFACES interface Configuration The Configuration interface provides access to the global configurable properties of a RAD session. Configuration Properties unsigned long long max_result_size (read-write) Limit on the maximum size of data to be requested from sstored via the read() method. The default value is 0, which means there is no limit on the size of the result. rc_err_t sstore_Configuration_get_max_result_size(rc_instance_t *inst, unsigned long long *result); Get property value. Arguments: inst -- RAD instance result -- Property value returned rc_err_t sstore_Configuration_set_max_result_size(rc_instance_t *inst, unsigned long long max_result_size); Set property value. Arguments: inst -- RAD instance max_result_size -- Property value written const char * door_path (read-write, nullable) Custom door path of the sstore daemon that the RAD module is interacting with. This is a private interface. The default value is the default door path of sstored. rc_err_t sstore_Configuration_get_door_path(rc_instance_t *inst, char **result); Get property value. Arguments: inst -- RAD instance result -- Property value returned rc_err_t sstore_Configuration_set_door_path(rc_instance_t *inst, const char *door_path); Set property value. Arguments: inst -- RAD instance door_path -- Property value written Configuration Retrieve rc_err_t sstore_Configuration__rad_get_name(adr_name_t **result, int n, ...); Obtain RAD name of a Configuration object. Arguments: result -- RAD name n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key rc_err_t sstore_Configuration__rad_lookup(rc_conn_t *c, boolean_t strict, rc_instance_t **result, int n, ...); Lookup a Configuration instance. Construct a RAD name for the interface based on the provided key-value pairs and perform a lookup. If successful, instance reference is returned in the result. Arguments: c -- RAD connection handle strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning result -- RAD instance n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key rc_err_t sstore_Configuration__rad_list(rc_conn_t *c, boolean_t strict, adr_pattern_scheme_t scheme, adr_name_t ***result, int *result_count, int n, ...); List RAD names of a available Configuration instances. Returns an array and array size of matching object names. Arguments: c -- RAD connection handle strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning scheme -- Apply glob (NS_GLOB) or regex (NS_REGEX) matching result -- Array of RAD names result_count -- Number of names in result array n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key interface Data Data is a singleton interface that provides access to the statistics and events recorded in the sstore(7). The Data interface exposes the following methods: o read() - provides access to the current or historical statistics and events recorded in the statistics store (see sstore(7)). o purge() - allows an authorized user to remove recorded statisitics and events from the statistics store repository (see sstore(7)). Data Methods rc_err_t sstore_Data_read(rc_instance_t *inst, const char **ssids, int ssids_count, sstore_Range_t *range, sstore_Format_t *format, sstore_ReadResult_t **result, sstore_Error_t **error); Retrieves the statistics and events associated with the given identifiers and range. Arguments: inst -- RAD instance ssids -- list of SSIDs ssids_count -- Number of items in ssids array range (nullable) Desired range for the data lookup. If the 'range' is NULL, it will read the most recently recorded data point for the given SSIDs format (nullable) Desired result data format. If 'format' is NULL, the data records will not be formatted. result -- data records and warnings associated with the given SSIDs and range. If a format is specified, then the data records will be formatted accordingly. error Failed to read data. Cause: o INVALID_ARGUMENT - some of the arguments were invalid o TOO_BIG - result size is larger than the maximum requested result size o RETRY - sstored(8) is busy. Try again later o NOMEM - Insufficient memory. o CONNECTION_ERROR - Unable to connect to sstored(8) o UNAUTHORIZED - Client is not authorized. o INTERNAL - An internal error occurred rc_err_t sstore_Data_purge(rc_instance_t *inst, const char **ssids, int ssids_count, sstore_Range_t *range, sstore_Warning_t ***result, int *result_cnt, sstore_Error_t **error); Purges stat/event data for the given SSIDs and range Arguments: inst -- RAD instance ssids -- list of SSIDs ssids_count -- Number of items in ssids array range (nullable) Desired range for which the stat/event data needs to be purged. If the 'range' is NULL, it will purge all the stat/event data for the given SSIDs. result -- list of warnings, each representing the cause of failure to purge data for an SSID. result_cnt -- Number of items in result array error Failed to purge data. Cause: o INVALID_ARGUMENT - some of the arguments were invalid o RETRY - sstored(8) is busy. Try again later o NOMEM - Insufficient memory. o CONNECTION_ERROR - Unable to connect to sstored(8) o UNAUTHORIZED - Client is not authorized. o INTERNAL - An internal error occurred Data Retrieve rc_err_t sstore_Data__rad_get_name(adr_name_t **result, int n, ...); Obtain RAD name of a Data object. Arguments: result -- RAD name n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key rc_err_t sstore_Data__rad_lookup(rc_conn_t *c, boolean_t strict, rc_instance_t **result, int n, ...); Lookup a Data instance. Construct a RAD name for the interface based on the provided key-value pairs and perform a lookup. If successful, instance reference is returned in the result. Arguments: c -- RAD connection handle strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning result -- RAD instance n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key rc_err_t sstore_Data__rad_list(rc_conn_t *c, boolean_t strict, adr_pattern_scheme_t scheme, adr_name_t ***result, int *result_count, int n, ...); List RAD names of a available Data instances. Returns an array and array size of matching object names. Arguments: c -- RAD connection handle strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning scheme -- Apply glob (NS_GLOB) or regex (NS_REGEX) matching result -- Array of RAD names result_count -- Number of names in result array n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key interface Info Info is a singleton interface that provides access to the metadata about the nodes in the sstore(7) namespace. Info interface exposes the following method: o read() - provides access to the current or historical metadata about the nodes in the sstore(7) namespace. Info Methods rc_err_t sstore_Info_read(rc_instance_t *inst, const char **ssids, int ssids_count, sstore_Range_t *range, sstore_Format_t *format, sstore_ReadResult_t **result, sstore_Error_t **error); Retrieves the metadata associated with the given identifiers and range. Arguments: inst -- RAD instance ssids -- list of SSIDs ssids_count -- Number of items in ssids array range (nullable) Desired range for the info lookup. If the 'range' is NULL, it will read the most recently recorded metadata for the given SSIDs. format (nullable) Desired result data format. If 'format' is NULL, the info records will not be formatted. result -- info records and warnings associated with the given SSIDs and range. If a format is specified, the info records will be formatted accordingly. error Failed to read info. Cause: o INVALID_ARGUMENT - some of the arguments were invalid o TOO_BIG - result size is larger than the maximum requested result size o RETRY - sstored(8) is busy. Try again later o NOMEM - Insufficient memory. o CONNECTION_ERROR - Unable to connect to sstored(8) o UNAUTHORIZED - Client is not authorized. o INTERNAL - An internal error occurred Info Retrieve rc_err_t sstore_Info__rad_get_name(adr_name_t **result, int n, ...); Obtain RAD name of a Info object. Arguments: result -- RAD name n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key rc_err_t sstore_Info__rad_lookup(rc_conn_t *c, boolean_t strict, rc_instance_t **result, int n, ...); Lookup a Info instance. Construct a RAD name for the interface based on the provided key-value pairs and perform a lookup. If successful, instance reference is returned in the result. Arguments: c -- RAD connection handle strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning result -- RAD instance n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key rc_err_t sstore_Info__rad_list(rc_conn_t *c, boolean_t strict, adr_pattern_scheme_t scheme, adr_name_t ***result, int *result_count, int n, ...); List RAD names of a available Info instances. Returns an array and array size of matching object names. Arguments: c -- RAD connection handle strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning scheme -- Apply glob (NS_GLOB) or regex (NS_REGEX) matching result -- Array of RAD names result_count -- Number of names in result array n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key interface Namespace Namespace is a singleton interface that provides access to the information about the existence of the nodes in the sstore(7) namespace. Namespace interface exposes the following method: o read() - provides access to the information about the existence of nodes in the current or historical sstore(7) namespace. Namespace Methods rc_err_t sstore_Namespace_read(rc_instance_t *inst, const char **ssids, int ssids_count, sstore_Range_t *range, sstore_Format_t *format, sstore_ReadResult_t **result, sstore_Error_t **error); Retrieves the existence information for the given set of SSIDs and range. Arguments: inst -- RAD instance ssids -- list of SSIDs ssids_count -- Number of items in ssids array range (nullable) Desired range for the namespace lookup. If the 'range' is NULL, it will read the most recently recorded namespace transition for the given SSIDs. format (nullable) Desired result data format. If 'format' is NULL, the namespace records will not be formatted. result -- namespace records and warnings associated with the given SSIDs and range. If a format is specified, the namespace records will be formatted accordingly. error Failed to read namespace. Cause: o INVALID_ARGUMENT - some of the arguments were invalid o TOO_BIG - result size is larger than the maximum requested result size o RETRY - sstored(8) is busy. Try again later o NOMEM - Insufficient memory. o CONNECTION_ERROR - Unable to connect to sstored(8) o UNAUTHORIZED - Client is not authorized. o INTERNAL - An internal error occurred Namespace Retrieve rc_err_t sstore_Namespace__rad_get_name(adr_name_t **result, int n, ...); Obtain RAD name of a Namespace object. Arguments: result -- RAD name n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key rc_err_t sstore_Namespace__rad_lookup(rc_conn_t *c, boolean_t strict, rc_instance_t **result, int n, ...); Lookup a Namespace instance. Construct a RAD name for the interface based on the provided key-value pairs and perform a lookup. If successful, instance reference is returned in the result. Arguments: c -- RAD connection handle strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning result -- RAD instance n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key rc_err_t sstore_Namespace__rad_list(rc_conn_t *c, boolean_t strict, adr_pattern_scheme_t scheme, adr_name_t ***result, int *result_count, int n, ...); List RAD names of a available Namespace instances. Returns an array and array size of matching object names. Arguments: c -- RAD connection handle strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning scheme -- Apply glob (NS_GLOB) or regex (NS_REGEX) matching result -- Array of RAD names result_count -- Number of names in result array n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key interface Batch Batch is a singleton interface which allows batching multiple types of read requests into a single request. This is a recommended interface for high performance consumers. Batch interface exposes the following method: o read() - provides access to the current or historical statistics and events, metadata or existence info about the nodes in the sstore(7) namespace. Batch Methods rc_err_t sstore_Batch_read(rc_instance_t *inst, const sstore__rad_dict_string_BatchRequest_t *requests, sstore_Format_t *format, sstore__rad_dict_string_BatchResult_t **result, sstore_Error_t **error); Retrieves results for multiple read requests. Arguments: inst -- RAD instance requests -- dictionary with a unique tag as the key and a BatchRequest as the value. The tags will be used to identify the result of the BatchRequest in the returned dictionary. format (nullable) Desired result data format. If 'format' is NULL, the results for individual read requests will not be formatted. result -- dictionary with the tag as the key and a BatchResult as the value. The tag is passed in 'requests'. error Failed to batch requests. Cause: o INVALID_ARGUMENT - some of the arguments were invalid o TOO_BIG - result size is larger than the maximum requested result size o RETRY - sstored(8) is busy. Try again later o NOMEM - Insufficient memory. o CONNECTION_ERROR - Unable to connect to sstored(8) o INTERNAL - An internal error occurred Batch Retrieve rc_err_t sstore_Batch__rad_get_name(adr_name_t **result, int n, ...); Obtain RAD name of a Batch object. Arguments: result -- RAD name n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key rc_err_t sstore_Batch__rad_lookup(rc_conn_t *c, boolean_t strict, rc_instance_t **result, int n, ...); Lookup a Batch instance. Construct a RAD name for the interface based on the provided key-value pairs and perform a lookup. If successful, instance reference is returned in the result. Arguments: c -- RAD connection handle strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning result -- RAD instance n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key rc_err_t sstore_Batch__rad_list(rc_conn_t *c, boolean_t strict, adr_pattern_scheme_t scheme, adr_name_t ***result, int *result_count, int n, ...); List RAD names of a available Batch instances. Returns an array and array size of matching object names. Arguments: c -- RAD connection handle strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning scheme -- Apply glob (NS_GLOB) or regex (NS_REGEX) matching result -- Array of RAD names result_count -- Number of names in result array n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key interface Collection Collection is a dynamic interface that provides access to sstore collections (see ssid-collection(4)) in statistics store (see sstore(7)). The Collection interfaces defines the properties and CRUD methods for a Collection instance and allows a client to lookup or list a Collection instance using the following keys: 1. uuid (primary) - UUID of the collection 2. owner - username of the owner of the collection 3. name - user-defined name of the collection Collection Properties boolean_t enabled (read-write) -- If true, the collection is persistently recorded. rc_err_t sstore_Collection_get_enabled(rc_instance_t *inst, boolean_t *result); Get property value. Arguments: inst -- RAD instance result -- Property value returned rc_err_t sstore_Collection_set_enabled(rc_instance_t *inst, boolean_t enabled); Set property value. Arguments: inst -- RAD instance enabled -- Property value written const char ** ssids (read-write) -- list of SSIDs in the collection. rc_err_t sstore_Collection_get_ssids(rc_instance_t *inst, char ***result, int *result_cnt); Get property value. Arguments: inst -- RAD instance result -- Property value returned result_cnt -- Number of items in result array rc_err_t sstore_Collection_set_ssids(rc_instance_t *inst, const char **ssids, int ssids_count); Set property value. Arguments: inst -- RAD instance ssids -- Property value written ssids_count -- Number of items in ssids array const char * name (read-only, nullable) -- user defined name of the collection. rc_err_t sstore_Collection_get_name(rc_instance_t *inst, char **result); Get property value. Arguments: inst -- RAD instance result -- Property value returned const char * owner (read-only) -- username of the owner of the collection. rc_err_t sstore_Collection_get_owner(rc_instance_t *inst, char **result); Get property value. Arguments: inst -- RAD instance result -- Property value returned const char * uuid (read-only) -- UUID of the collection. rc_err_t sstore_Collection_get_uuid(rc_instance_t *inst, char **result); Get property value. Arguments: inst -- RAD instance result -- Property value returned Collection Create rc_err_t sstore_Collection__rad_create(rc_instance_t *inst, boolean_t enabled, const char *name, const char *owner, const char **ssids, int ssids_count, rc_instance_t **result, sstore_Error_t **error); Creates a sstore collection with the given custom name, owner, SSIDs and state. A UUID will be generated for the new collection. Arguments: inst -- RAD instance enabled -- whether the new collection is persistently recorded. name (nullable) Name of the collection. If 'name' is NULL, the new collection will not have a user-defined name. owner (nullable) Username of the owner of the collection. If 'owner' is NULL, the username of the client will be used as the owner of the collection. ssids (nullable) List of SSIDs to be part the collection. If ssids is NULL, the new collection will have no SSIDs. ssids_count -- Number of items in ssids array result -- New Collection instance error Failed to create a collection. Cause: o INVALID_ARGUMENT - some of the arguments were invalid o RETRY - sstored(8) is busy. Try again later o NOMEM - Insufficient memory. o CONNECTION_ERROR - Unable to connect to sstored(8) o UNAUTHORIZED - Client is not authorized. o INTERNAL - An internal error occurred Collection Retrieve rc_err_t sstore_Collection__rad_get_name(adr_name_t **result, int n, ...); Obtain RAD name of a Collection object. Arguments: result -- RAD name n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key rc_err_t sstore_Collection__rad_lookup(rc_conn_t *c, boolean_t strict, rc_instance_t **result, int n, ...); Lookup a Collection instance. Construct a RAD name for the interface based on the provided key-value pairs and perform a lookup. If successful, instance reference is returned in the result. Arguments: c -- RAD connection handle strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning result -- RAD instance n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key rc_err_t sstore_Collection__rad_list(rc_conn_t *c, boolean_t strict, adr_pattern_scheme_t scheme, adr_name_t ***result, int *result_count, int n, ...); List RAD names of a available Collection instances. Returns an array and array size of matching object names. Arguments: c -- RAD connection handle strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning scheme -- Apply glob (NS_GLOB) or regex (NS_REGEX) matching result -- Array of RAD names result_count -- Number of names in result array n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key Collection Update rc_err_t sstore_Collection__rad_update(rc_instance_t *inst, sstore_Collection_enabled_t *enabled, sstore_Collection_ssids_t *ssids); Update the list of SSIDs and/or whether the collection is persistently recorded. Arguments: inst -- RAD instance enabled (nullable) -- Structure containing the input value for the property "enabled": typedef struct sstore_Collection_enabled sstore_Collection_enabled_t; struct sstore_Collection_enabled { boolean_t sce_enabled; }; void sstore_Collection_enabled_free(sstore_Collection_enabled_t *in) ssids (nullable) -- Structure containing the input value for the property "ssids": typedef struct sstore_Collection_ssids sstore_Collection_ssids_t; struct sstore_Collection_ssids { char * * scs_ssids; int scs_ssids_count; }; void sstore_Collection_ssids_free(sstore_Collection_ssids_t *in) Collection Delete rc_err_t sstore_Collection__rad_delete(rc_instance_t *inst); Deletes the collection. Arguments: inst -- RAD instance ENUMERATED TYPES enum WarningCode -- Describes the type of failure to execute a request for one of the SSIDs. typedef enum sstore_WarningCode { SWC_INVALID = 1, SWC_INTERNAL = 2, SWC_CONNECTION_ERROR = 3, SWC_UNAUTHORIZED = 4, SWC_NOENT = 5, SWC_NODATA_YET = 6, } sstore_WarningCode_t; SWC_INVALID (1) -- SSID is not valid for the requested operation. SWC_INTERNAL (2) -- An internal error occurred while processing the request for the given SSID. SWC_CONNECTION_ERROR (3) -- Unable to connect to the remote sstored(8). SWC_UNAUTHORIZED (4) -- Client is not authorized to perform the requested operation on the given SSID. SWC_NOENT (5) -- Unable to resolve the stat store identifier SWC_NODATA_YET (6) -- No Data has been recorded yet for the given time range enum ErrorCode -- Describes the failure type for a failed request. typedef enum sstore_ErrorCode { SEC_INVALID_ARGUMENT = 3, SEC_TOO_BIG = 4, SEC_RETRY = 5, SEC_NOMEM = 6, SEC_CONNECTION_BROKEN = 7, SEC_UNAUTHORIZED = 8, SEC_INTERNAL = 9, } sstore_ErrorCode_t; SEC_INVALID_ARGUMENT (3) -- Some of the arguments were invalid. SEC_TOO_BIG (4) -- Result size is larger than the maximum requested result size. SEC_RETRY (5) -- sstored(8) is busy. Try again later. SEC_NOMEM (6) -- Insufficient memory. SEC_CONNECTION_BROKEN (7) -- Unable to connect to sstored(8). SEC_UNAUTHORIZED (8) -- Client is not authorized. SEC_INTERNAL (9) -- An internal error occurred. enum Format typedef enum sstore_Format { SF_JSON = 1, SF_CSV = 2, } sstore_Format_t; Describes the export format for the data returned from the read() method. The data exported in a specific format will allow a client to import it to another sstore(7), when the support for data import is added. SF_JSON (1) sstore JSON export format. See sstore.json(5) for more information. The existing implementation for RAD's ADR to JSON conversion for the REST clients for stucts such as Value, which can store multi-typed values, is very inefficient due to the lack of support for union type data structure. The JSON format can be used also be used as workaround for that limitation until the union support is provided. SF_CSV (2) sstore CSV export format. See sstore.csv(5) for more information. enum PointType -- Describes the type of point. typedef enum sstore_PointType { SPT_VALUE_POINT = 0, SPT_RANGE_POINT = 1, } sstore_PointType_t; SPT_VALUE_POINT (0) -- Represents a value at a given timestamp. SPT_RANGE_POINT (1) -- Represents an absolute time range. enum RangeType -- Describes the type of range. typedef enum sstore_RangeType { SRT_RANGE_BY_TIME = 0, SRT_RANGE_BY_POINTS = 1, } sstore_RangeType_t; SRT_RANGE_BY_TIME (0) -- Represents an absolute or relative time range. SRT_RANGE_BY_POINTS (1) -- Represents a range of points before/after a given timestamps. enum RequestType -- Describes the type of request. typedef enum sstore_RequestType { SRT_DATA_READ = 0, SRT_INFO_READ = 1, SRT_NAMESPACE_READ = 2, } sstore_RequestType_t; SRT_DATA_READ (0) -- Read Data for the given SSIDs and range. SRT_INFO_READ (1) -- Read Info for the given SSIDs and range. SRT_NAMESPACE_READ (2) -- Read Namespace for the given SSIDs and range. enum ValueType -- Describes the data type of a Value. typedef enum sstore_ValueType { SVT_UNKNOWN = 0, SVT_BOOLEAN = 1, SVT_DICTIONARY = 2, SVT_DICTIONARY_ARRAY = 3, SVT_NUMBER = 4, SVT_NUMBER_ARRAY = 5, SVT_REAL = 6, SVT_REAL_ARRAY = 7, SVT_STRING = 8, SVT_STRING_ARRAY = 9, SVT_PARTITION = 10, SVT_NO_DATA = 11, SVT_NO_DATA_YET = 12, } sstore_ValueType_t; SVT_UNKNOWN (0) SVT_BOOLEAN (1) SVT_DICTIONARY (2) SVT_DICTIONARY_ARRAY (3) SVT_NUMBER (4) SVT_NUMBER_ARRAY (5) SVT_REAL (6) SVT_REAL_ARRAY (7) SVT_STRING (8) SVT_STRING_ARRAY (9) SVT_PARTITION (10) SVT_NO_DATA (11) SVT_NO_DATA_YET (12) STRUCTURED TYPES struct RangeByTime typedef struct sstore_RangeByTime sstore_RangeByTime_t; struct sstore_RangeByTime { unsigned long long srbt_start_ts; unsigned long long srbt_end_ts; unsigned long long srbt_step; }; void sstore_RangeByTime_free(sstore_RangeByTime_t *in); Represents an absolute or relative timerange. Use the value 0xffffffffffffffff to set start_ts or end_ts to NOW. To specify a relative time range, set 'start_ts' to NOW and 'end_ts' to the number of seconds before NOW. Fields: srbt_start_ts -- start of an absolute time range in microseconds since epoch. Set to NOW for a relative time range. srbt_end_ts -- end of an absolute time range in microseconds since epoch or number of seconds relative to NOW in a relative time range. srbt_step -- granularity (in seconds) between data points. struct RangeByPoints typedef struct sstore_RangeByPoints sstore_RangeByPoints_t; struct sstore_RangeByPoints { unsigned long long srbp_start_ts; long long srbp_relative_points; }; void sstore_RangeByPoints_free(sstore_RangeByPoints_t *in); Represents a range of data points relative to a timestamp. Use the value 0xffffffffffffffff to set start_ts to NOW. Fields: srbp_start_ts -- timestamp, in microseconds since epoch, relative to which the data points need to be read. srbp_relative_points -- Number of points to be read relative to 'start_ts'. Positive values mean points after 'start_ts', while negative values mean points before 'start_ts'. struct Range -- Represents a time range or a range of points. typedef struct sstore_Range sstore_Range_t; struct sstore_Range { sstore_RangeType_t sr_range_type; sstore_RangeByTime_t *sr_range_by_time; sstore_RangeByPoints_t *sr_range_by_points; boolean_t sr_show_unstable; boolean_t sr_show_unbrowsable; }; void sstore_Range_free(sstore_Range_t *in); Fields: sr_range_type -- describes the type of the range. sr_range_by_time -- absolute or relative time range. sr_range_by_points -- range based on data points relative to a timestamp. sr_show_unstable -- describes whether unstable namespace nodes need to be included while expanding wildcards in an SSID. sr_show_unbrowsable -- describes whether unbrowsable namespace nodes need to be included while expanding wildcards in an SSID. struct ValueDictionary -- Represents a value of type dictionary. typedef struct sstore_ValueDictionary sstore_ValueDictionary_t; struct sstore_ValueDictionary { sstore__rad_dict_string_Value_t *svd_dict; }; void sstore_ValueDictionary_free(sstore_ValueDictionary_t *in); Fields: svd_dict struct Value typedef struct sstore_Value sstore_Value_t; struct sstore_Value { sstore_ValueType_t sv_type; sstore__rad_dict_string_Value_t *sv_dictionary; sstore_ValueDictionary_t **sv_dictionary_array; int sv_dictionary_array_count; boolean_t sv_boolean_val; unsigned long long sv_number; unsigned long long *sv_number_array; int sv_number_array_count; double sv_real; double *sv_real_array; int sv_real_array_count; char *sv_string; char **sv_string_array; int sv_string_array_count; }; void sstore_Value_free(sstore_Value_t *in); Represents a multi-typed value. Note: Value can be more efficiently represented as a union, but due to the lack of support for union type data structure in RAD, it has to be represented as a struct until the support for union type data structure is provided. Fields: sv_type -- describes the data type of the value. sv_dictionary sv_dictionary_array sv_dictionary_array_count sv_boolean_val sv_number sv_number_array sv_number_array_count sv_real sv_real_array sv_real_array_count sv_string sv_string_array sv_string_array_count struct Warning -- Describes the cause of failure to execute a request for one of the SSIDs. typedef struct sstore_Warning sstore_Warning_t; struct sstore_Warning { sstore_WarningCode_t sw_code; char *sw_ssid; char *sw_reason; }; void sstore_Warning_free(sstore_Warning_t *in); Fields: sw_code -- describes the type of failure. sw_ssid -- SSID associated with the failure. sw_reason -- human readable reason for the failure. struct Error -- Describes the cause of failure for a request. typedef struct sstore_Error sstore_Error_t; struct sstore_Error { sstore_ErrorCode_t se_code; char *se_action; char *se_reason; }; void sstore_Error_free(sstore_Error_t *in); Fields: se_code -- describes the type of failure. se_action -- human readable description of action that failed. se_reason -- human readable reason for the failure. struct ValuePoint typedef struct sstore_ValuePoint sstore_ValuePoint_t; struct sstore_ValuePoint { unsigned long long svp_ts; sstore_Value_t *svp_value; }; void sstore_ValuePoint_free(sstore_ValuePoint_t *in); A point representing a value at a timestamp. Represent a Data/Info value for an SSID. Fields: svp_ts -- timestamp in microseconds since epoch svp_value -- value struct RangePoint typedef struct sstore_RangePoint sstore_RangePoint_t; struct sstore_RangePoint { unsigned long long srp_start_ts; unsigned long long srp_end_ts; }; void sstore_RangePoint_free(sstore_RangePoint_t *in); A point representing an absolute time range. Represent the Namespace existence information for an SSID. Fields: srp_start_ts -- start of the range in microseconds since epoch srp_end_ts -- end of the range in microseconds since epoch struct Point -- Represents a value at a given timestamp or a time range typedef struct sstore_Point sstore_Point_t; struct sstore_Point { sstore_PointType_t sp_point_type; sstore_ValuePoint_t *sp_point_value; sstore_RangePoint_t *sp_point_range; }; void sstore_Point_free(sstore_Point_t *in); Fields: sp_point_type -- describes the type of point sp_point_value -- point representing a value at a timestamp. sp_point_range -- point representing a time range. struct SSIDRecord -- A list of points associated with an SSID. typedef struct sstore_SSIDRecord sstore_SSIDRecord_t; struct sstore_SSIDRecord { char *sssidr_ssid; sstore_Point_t **sssidr_points; int sssidr_points_count; }; void sstore_SSIDRecord_free(sstore_SSIDRecord_t *in); Fields: sssidr_ssid -- SSID sssidr_points -- list of points sssidr_points_count struct ReadResult -- Represents the result of a read request typedef struct sstore_ReadResult sstore_ReadResult_t; struct sstore_ReadResult { sstore_SSIDRecord_t **srr_records; int srr_records_count; char *srr_formatted_records; sstore_Warning_t **srr_warnings; int srr_warnings_count; }; void sstore_ReadResult_free(sstore_ReadResult_t *in); Fields: srr_records -- list of records, each representing the result of a successful read request for an SSID. It is set if 'format' was not specified in the read request. srr_records_count srr_formatted_records -- result of the read request in the format specified in the arguments to the request. It is set if 'format' was specified in the read request. srr_warnings -- list of failures, each associated with an SSID for which the request execution failed. srr_warnings_count struct BatchRequest -- Represents a batch request typedef struct sstore_BatchRequest sstore_BatchRequest_t; struct sstore_BatchRequest { sstore_RequestType_t sbr_req_type; char **sbr_ssids; int sbr_ssids_count; sstore_Range_t *sbr_range; }; void sstore_BatchRequest_free(sstore_BatchRequest_t *in); Fields: sbr_req_type -- type of request sbr_ssids -- list of SSIDS sbr_ssids_count sbr_range -- desired range struct BatchResult -- Represents the result of a batch request typedef struct sstore_BatchResult sstore_BatchResult_t; struct sstore_BatchResult { sstore_ReadResult_t *sbr_data; sstore_Error_t *sbr_error; }; void sstore_BatchResult_free(sstore_BatchResult_t *in); Fields: sbr_data -- data associated with the batch request sbr_error -- error associated with the batch request DICTIONARIES Dictionary { string : BatchRequest } Dictionary with a key type of string and a value type of BatchRequest. typedef struct base_rad_dict sstore__rad_dict_string_BatchRequest_t; rc_err_t sstore__rad_dict_string_BatchRequest_get(sstore__rad_dict_string_BatchRequest_t *dict, const char *key, sstore_BatchRequest_t **result); Get the value for given key. Arguments: dict -- Dictionary key -- Key value result -- Value returned rc_err_t sstore__rad_dict_string_BatchRequest_put(sstore__rad_dict_string_BatchRequest_t *dict, const char *key, sstore_BatchRequest_t *value, sstore_BatchRequest_t **result); Put a key-value pair into the dictionary. Returns a previous value stored with the same key if one exists. Arguments: dict -- Dictionary key -- Key value value -- Value written result -- Original value for the key rc_err_t sstore__rad_dict_string_BatchRequest_contains(sstore__rad_dict_string_BatchRequest_t *dict, const char *key); Check whether a key exists in the dictionary. Returns RCE_OK when key exists, RCE_CLIENT_NOTFOUND otherwise. Arguments: dict -- Dictionary key -- Key value rc_err_t sstore__rad_dict_string_BatchRequest_remove(sstore__rad_dict_string_BatchRequest_t *dict, const char *key, sstore_BatchRequest_t **result); Remove key-value pair from the dictionary. Returns RCE_OK when key was sucessfully removed, RCE_CLIENT_NOTFOUND otherwise. Arguments: dict -- Dictionary key -- Key value result -- Original value for the key rc_err_t sstore__rad_dict_string_BatchRequest_keys(sstore__rad_dict_string_BatchRequest_t *dict, char ***result, int *count); Get list of keys from the dictionary. Memory associated with the result array should be freed by the user. Arguments: dict -- Dictionary result -- Array of dictionary keys count -- Number of items in result array rc_err_t sstore__rad_dict_string_BatchRequest_values(sstore__rad_dict_string_BatchRequest_t *dict, sstore_BatchRequest_t ***result, int *count); Get list of values from the dictionary. Memory associated with the result array should be freed by the user. Arguments: dict -- Dictionary result -- Array of dictionary values count -- Number of items in result array unsigned int sstore__rad_dict_string_BatchRequest_size(sstore__rad_dict_string_BatchRequest_t *dict); Get number of key-value pairs in the dictionary. Arguments: dict -- Dictionary sstore__rad_dict_string_BatchRequest_t * sstore__rad_dict_string_BatchRequest_create(const rc_instance_t *inst); Create a new, empty dictionary. Returns a pointer to the dictionary, or NULL on error. Arguments: inst -- RAD instance void sstore__rad_dict_string_BatchRequest_free(sstore__rad_dict_string_BatchRequest_t *dict); Destroy the dictionary and release the allocated memory. Arguments: dict -- Dictionary rc_err_t sstore__rad_dict_string_BatchRequest_map(sstore__rad_dict_string_BatchRequest_t *dict, rc_err_t(*func)(const char *, sstore_BatchRequest_t *, void *), void *arg); Invoke a function with each key-value pair in the dictionary. Arguments: dict -- Dictionary func -- Function to invoke The arguments are: key, value, user-data. arg -- User data: custom parameter to invoke the function with Dictionary { string : BatchResult } Dictionary with a key type of string and a value type of BatchResult. typedef struct base_rad_dict sstore__rad_dict_string_BatchResult_t; rc_err_t sstore__rad_dict_string_BatchResult_get(sstore__rad_dict_string_BatchResult_t *dict, const char *key, sstore_BatchResult_t **result); Get the value for given key. Arguments: dict -- Dictionary key -- Key value result -- Value returned rc_err_t sstore__rad_dict_string_BatchResult_put(sstore__rad_dict_string_BatchResult_t *dict, const char *key, sstore_BatchResult_t *value, sstore_BatchResult_t **result); Put a key-value pair into the dictionary. Returns a previous value stored with the same key if one exists. Arguments: dict -- Dictionary key -- Key value value -- Value written result -- Original value for the key rc_err_t sstore__rad_dict_string_BatchResult_contains(sstore__rad_dict_string_BatchResult_t *dict, const char *key); Check whether a key exists in the dictionary. Returns RCE_OK when key exists, RCE_CLIENT_NOTFOUND otherwise. Arguments: dict -- Dictionary key -- Key value rc_err_t sstore__rad_dict_string_BatchResult_remove(sstore__rad_dict_string_BatchResult_t *dict, const char *key, sstore_BatchResult_t **result); Remove key-value pair from the dictionary. Returns RCE_OK when key was sucessfully removed, RCE_CLIENT_NOTFOUND otherwise. Arguments: dict -- Dictionary key -- Key value result -- Original value for the key rc_err_t sstore__rad_dict_string_BatchResult_keys(sstore__rad_dict_string_BatchResult_t *dict, char ***result, int *count); Get list of keys from the dictionary. Memory associated with the result array should be freed by the user. Arguments: dict -- Dictionary result -- Array of dictionary keys count -- Number of items in result array rc_err_t sstore__rad_dict_string_BatchResult_values(sstore__rad_dict_string_BatchResult_t *dict, sstore_BatchResult_t ***result, int *count); Get list of values from the dictionary. Memory associated with the result array should be freed by the user. Arguments: dict -- Dictionary result -- Array of dictionary values count -- Number of items in result array unsigned int sstore__rad_dict_string_BatchResult_size(sstore__rad_dict_string_BatchResult_t *dict); Get number of key-value pairs in the dictionary. Arguments: dict -- Dictionary sstore__rad_dict_string_BatchResult_t * sstore__rad_dict_string_BatchResult_create(const rc_instance_t *inst); Create a new, empty dictionary. Returns a pointer to the dictionary, or NULL on error. Arguments: inst -- RAD instance void sstore__rad_dict_string_BatchResult_free(sstore__rad_dict_string_BatchResult_t *dict); Destroy the dictionary and release the allocated memory. Arguments: dict -- Dictionary rc_err_t sstore__rad_dict_string_BatchResult_map(sstore__rad_dict_string_BatchResult_t *dict, rc_err_t(*func)(const char *, sstore_BatchResult_t *, void *), void *arg); Invoke a function with each key-value pair in the dictionary. Arguments: dict -- Dictionary func -- Function to invoke The arguments are: key, value, user-data. arg -- User data: custom parameter to invoke the function with Dictionary { string : Value } Dictionary with a key type of string and a value type of Value. typedef struct base_rad_dict sstore__rad_dict_string_Value_t; rc_err_t sstore__rad_dict_string_Value_get(sstore__rad_dict_string_Value_t *dict, const char *key, sstore_Value_t **result); Get the value for given key. Arguments: dict -- Dictionary key -- Key value result -- Value returned rc_err_t sstore__rad_dict_string_Value_put(sstore__rad_dict_string_Value_t *dict, const char *key, sstore_Value_t *value, sstore_Value_t **result); Put a key-value pair into the dictionary. Returns a previous value stored with the same key if one exists. Arguments: dict -- Dictionary key -- Key value value -- Value written result -- Original value for the key rc_err_t sstore__rad_dict_string_Value_contains(sstore__rad_dict_string_Value_t *dict, const char *key); Check whether a key exists in the dictionary. Returns RCE_OK when key exists, RCE_CLIENT_NOTFOUND otherwise. Arguments: dict -- Dictionary key -- Key value rc_err_t sstore__rad_dict_string_Value_remove(sstore__rad_dict_string_Value_t *dict, const char *key, sstore_Value_t **result); Remove key-value pair from the dictionary. Returns RCE_OK when key was sucessfully removed, RCE_CLIENT_NOTFOUND otherwise. Arguments: dict -- Dictionary key -- Key value result -- Original value for the key rc_err_t sstore__rad_dict_string_Value_keys(sstore__rad_dict_string_Value_t *dict, char ***result, int *count); Get list of keys from the dictionary. Memory associated with the result array should be freed by the user. Arguments: dict -- Dictionary result -- Array of dictionary keys count -- Number of items in result array rc_err_t sstore__rad_dict_string_Value_values(sstore__rad_dict_string_Value_t *dict, sstore_Value_t ***result, int *count); Get list of values from the dictionary. Memory associated with the result array should be freed by the user. Arguments: dict -- Dictionary result -- Array of dictionary values count -- Number of items in result array unsigned int sstore__rad_dict_string_Value_size(sstore__rad_dict_string_Value_t *dict); Get number of key-value pairs in the dictionary. Arguments: dict -- Dictionary sstore__rad_dict_string_Value_t * sstore__rad_dict_string_Value_create(const rc_instance_t *inst); Create a new, empty dictionary. Returns a pointer to the dictionary, or NULL on error. Arguments: inst -- RAD instance void sstore__rad_dict_string_Value_free(sstore__rad_dict_string_Value_t *dict); Destroy the dictionary and release the allocated memory. Arguments: dict -- Dictionary rc_err_t sstore__rad_dict_string_Value_map(sstore__rad_dict_string_Value_t *dict, rc_err_t(*func)(const char *, sstore_Value_t *, void *), void *arg); Invoke a function with each key-value pair in the dictionary. Arguments: dict -- Dictionary func -- Function to invoke The arguments are: key, value, user-data. arg -- User data: custom parameter to invoke the function with VERSION 1.0 ATTRIBUTES See attributes(7) for descriptions of the following attributes: +--------------------+-----------------------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------------------------------+ |Availability | system/management/rad/module/rad-sstore | +--------------------+-----------------------------------------+ |Interface Stability | Private | +--------------------+-----------------------------------------+ SEE ALSO rad(8) NOTES 1. Accessing Python documentation for this module: $ pydoc rad.bindings.com.oracle.solaris.rad.sstore_1 Solaris 11.4 2017-02-01 SSTORE-1(3rad)