StripeKit 0.1.1
Stripe integration toolkit for C++
Loading...
Searching...
No Matches
stripekit::webhooks::ProcessEventOptions Struct Reference

Tuning for process_event_once(). More...

#include <Webhooks.h>

Public Attributes

std::chrono::system_clock::time_point now = std::chrono::system_clock::now()
 Current time, used for signature checks and claim timing.
std::chrono::seconds tolerance = std::chrono::minutes(5)
 How far the signature's timestamp may be from now.
std::chrono::minutes stale_inflight_timeout = defaultStaleInflightTimeout
 How long before a claim left behind by a crashed process is reclaimed.
Logger * logger = nullptr
 Where to report store and handler failures.

Detailed Description

Tuning for process_event_once().

The defaults suit most applications.

Definition at line 62 of file Webhooks.h.

Member Data Documentation

◆ now

std::chrono::system_clock::time_point stripekit::webhooks::ProcessEventOptions::now = std::chrono::system_clock::now()

Current time, used for signature checks and claim timing.

Override in tests.

Definition at line 64 of file Webhooks.h.

◆ tolerance

std::chrono::seconds stripekit::webhooks::ProcessEventOptions::tolerance = std::chrono::minutes(5)

How far the signature's timestamp may be from now.

Definition at line 67 of file Webhooks.h.

◆ stale_inflight_timeout

std::chrono::minutes stripekit::webhooks::ProcessEventOptions::stale_inflight_timeout = defaultStaleInflightTimeout

How long before a claim left behind by a crashed process is reclaimed.

Set this comfortably longer than the handler's worst-case runtime, or a slow handler risks a second delivery being let through while it is still working.

Definition at line 76 of file Webhooks.h.

◆ logger

Logger* stripekit::webhooks::ProcessEventOptions::logger = nullptr

Where to report store and handler failures.

No logging when null.

Definition at line 79 of file Webhooks.h.


The documentation for this struct was generated from the following file: