MCPcopy Create free account
hub / github.com/corosync/corosync / cmap_notify_fn

Function cmap_notify_fn

tools/corosync-cmapctl.c:468–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466}
467
468static void cmap_notify_fn(
469 cmap_handle_t cmap_handle,
470 cmap_track_handle_t cmap_track_handle,
471 int32_t event,
472 const char *key_name,
473 struct cmap_notify_value new_val,
474 struct cmap_notify_value old_val,
475 void *user_data)
476{
477 switch (event) {
478 case CMAP_TRACK_ADD:
479 printf("create> ");
480 print_key(cmap_handle, key_name, new_val.len, new_val.data, new_val.type);
481 break;
482 case CMAP_TRACK_DELETE:
483 printf("delete> ");
484 print_key(cmap_handle, key_name, old_val.len, old_val.data, old_val.type);
485 break;
486 case CMAP_TRACK_MODIFY:
487 printf("modify> ");
488 print_key(cmap_handle, key_name, new_val.len, new_val.data, new_val.type);
489 break;
490 default:
491 printf("unknown change> ");
492 break;
493 }
494
495}
496
497static void add_track(cmap_handle_t handle, const char *key_name, int prefix)
498{

Callers

nothing calls this directly

Calls 1

print_keyFunction · 0.85

Tested by

no test coverage detected