LTTng control library C API
Loading...
Searching...
No Matches
“Notify” trigger action API
Collaboration diagram for “Notify” trigger action API:

Modules

 Notification channel API
 

Functions

struct lttng_action * lttng_action_notify_create (void)
 Creates a “notify” trigger action.
 
enum lttng_action_status lttng_action_notify_get_rate_policy (const struct lttng_action *action, const struct lttng_rate_policy **policy)
 Sets *policy to the rate policy of the “notify” trigger action action.
 
enum lttng_action_status lttng_action_notify_set_rate_policy (struct lttng_action *action, const struct lttng_rate_policy *policy)
 Sets the rate policy of the “notify” trigger action action to policy.
 

Detailed Description

A “notify” trigger action sends a notification to any notification channel subscribed to the satisfied condition when its containing trigger fires.

A “notify” trigger action has the type LTTNG_ACTION_TYPE_NOTIFY.

Create a “notify” trigger action with lttng_action_notify_create().

Set and get the rate policy of a “notify” trigger action with lttng_action_notify_set_rate_policy() and lttng_action_notify_get_rate_policy().

Function Documentation

◆ lttng_action_notify_create()

struct lttng_action * lttng_action_notify_create ( void  )
extern

Creates a “notify” trigger action.

The initial rate policy of the returned trigger action is “every time”. Set a new rate policy with lttng_action_notify_set_rate_policy().

Returns

Trigger action with the type LTTNG_ACTION_TYPE_NOTIFY on success, or NULL on error.

Destroy the returned trigger action with lttng_action_destroy().

◆ lttng_action_notify_get_rate_policy()

enum lttng_action_status lttng_action_notify_get_rate_policy ( const struct lttng_action *  action,
const struct lttng_rate_policy **  policy 
)
extern

Sets *policy to the rate policy of the “notify” trigger action action.

Parameters
[in]action“Notify” trigger action of which to get the rate policy.
[out]policy

On success, this function sets *policy to the rate policy of action.

action owns *policy.

*policy remains valid until the next function call with action.

Return values
LTTNG_ACTION_STATUS_OKSuccess.
LTTNG_ACTION_STATUS_INVALIDUnsatisfied precondition.
Precondition
See also
lttng_action_notify_set_rate_policy() – Set the rate policy of a “notify” trigger action.

◆ lttng_action_notify_set_rate_policy()

enum lttng_action_status lttng_action_notify_set_rate_policy ( struct lttng_action *  action,
const struct lttng_rate_policy policy 
)
extern

Sets the rate policy of the “notify” trigger action action to policy.

Parameters
[in]action“Notify” trigger action of which to set the rate policy.
[in]policyRate policy of action (copied).
Return values
LTTNG_ACTION_STATUS_OKSuccess.
LTTNG_ACTION_STATUS_INVALIDUnsatisfied precondition.
LTTNG_ACTION_STATUS_ERRORMemory error.
Precondition
See also
lttng_action_notify_get_rate_policy() – Get the rate policy of a “notify” trigger action.