PMSEARCHSETUP - Online Linux Manual PageSection : 3
Updated : PCP
Source : Performance Co-Pilot
NAMEpmSearchSetup, pmSearchSetSlots, pmSearchSetEventLoop, pmSearchSetConfiguration, pmSearchSetMetricRegistry, pmSearchClose − fast, scalable and fulltext capable search services
C SYNOPSIS#include <pcp/pmwebapi.h> int pmSearchSetup(pmSearchModule *module, void *arg); int pmSearchSetSlots(pmSearchModule *module, void *slots);
int pmSearchSetEventLoop(pmSearchModule *module, void *events);
int pmSearchSetConfiguration(pmSearchModule *module, struct dict *config);
int pmSearchSetMetricRegistry(pmSearchModule *module, struct mmv_registry *registry); int pmSearchClose(pmSearchModule *module); cc ... −lpcp_web
DESCRIPTIONThe pmSearchSetup and related API functions prepare an application for accessing the fast and scalable metric, instance and instance domain, fulltext capable, searching functionality of the Performance Co-Pilot (PCP). This functionality is provided trough asynchronous APIs, which function in event-driven fashion. The interface described here prepare a given search module which associates callback routines with certain asynchronous events that occur as part of servicing search requests. As a general pattern, all interfaces in these APIs that need to invoke callbacks provided by the calling program will take an opaque (void * pointer) arg parameter. This pointer will be passed through unchanged and is typically used to access a data structure maintaining state within the calling program. Where asynchronous setup is required by pmSearchSetup its completion will be indicated throught use of the on_setup callback, which is part of the passed in pmSearchModule structure. This structure also provides for custom diagnostics handling, through the on_info callback. These are self-explanatory, see <pcp/pmwebapi.h> for exact calling conventions. The callbacks registered by pmSearchSetup to handle events are as follows: pmSearchTextResultCallBack on_text_result Callback is called once for each item of search result that matches a given query passed by pmSearchTextInDom(3), pmSearchTextQuery(3), pmSearchTextSuggest(3). pmSearchMetricsCallBack on_metrics Callback is called for results of a call to pmSearchInfo(3). pmSearchDoneCallBack on_done On completion of all asynchronous interfaces that return success (zero return code), this callback will be called. It provides a status code indicating overall success (zero) or failure (negative PMAPI code) of the operation. The helper functions pmSearchSetSlots (redis), pmSearchSetEventLoop (libuv), pmSearchSetConfiguration (configuration file) and pmSearchSetMetricRegistry (MMV instrumentation) interfaces provide a mechanism for passing in state for each of the associated subsystems. Finally, a call to pmSearchClose is used to end services available from a search module previously enstablished through pmSearchSetup. Within PCP, the pmproxy(1) and pmsearch(1) utilities are the primary users of the interfaces, providing REST API and command line search services respectively.
DIAGNOSTICSWhere these functions return a status code, this is always zero on success. On failure a negative PMAPI error code is returned.
SEE ALSOpmproxy(1), pmlogger(1), pmsearch(1), redis-server(1), mmv_stats_registry(3), pmSearchInfo(3), pmSearchTextInDom(3), pmSearchTextQuery(3), pmSearchTextSuggest(3), PMAPI(3) and PMWEBAPI(3). 0
Johanes Gumabo
Data Size : 12,302 byte
man-p___mSearchClose.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 4 / 171,094
Visitor ID : :
Visitor IP : 3.147.66.224 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.