DapperMaticWebhookWorker
Namespace: MJCZone.DapperMatic.AspNetCore.Changes
Assembly: MJCZone.DapperMatic.AspNetCore
Summary
Sends webhooks their messages: for each datasource and webhook, the changes noted since the last one it took, in order, one message each; a failed one is tried again after a growing wait, and dropped after MaxAttempts. Servers sharing a datasource take turns, by a lease.
Inheritance
Base Class: BackgroundService
sealed public
Contents
Constructors (1) | Methods (8) | Properties (1) | Fields (2)
Constructors
DapperMaticWebhookWorker
Initializes a new instance of the DapperMaticWebhookWorker class.
DapperMaticWebhookWorker(
DapperMaticChangeLog log,
IDapperMaticDatasourceRepository datasources,
IDbConnectionFactory connections,
IHttpClientFactory http,
DapperMaticOptions} options,
DapperMaticStoredAccess stored,
DapperMaticWebhookWorker} logger)Parameters
- log (DapperMaticChangeLog) - Where the changes are noted.
- datasources (IDapperMaticDatasourceRepository) - The datasources.
- connections (IDbConnectionFactory) - Makes connections to them.
- http (IHttpClientFactory) - Makes the HTTP clients messages are sent with.
- options (DapperMaticOptions}) - The options.
- stored (DapperMaticStoredAccess) - The webhooks kept through the API, refreshed before each round; or null.
- logger (DapperMaticWebhookWorker}) - The logger.
Methods
| Method | Summary |
|---|---|
| RunOnceAsync | Sends every webhook what is due to it, once: what the worker does every PollInterval.... |
| StartAsync | |
| StopAsync | |
| Dispose | |
| GetType | |
| ToString | |
| Equals | |
| GetHashCode |
RunOnceAsync
Sends every webhook what is due to it, once: what the worker does every PollInterval.
Task RunOnceAsync(CancellationToken cancellationToken)Parameters
- cancellationToken (CancellationToken) - The cancellation token.
Returns
Type: Task
A task.
StartAsync
StartAsync()StopAsync
StopAsync()Dispose
Dispose()GetType
GetType()ToString
ToString()Equals
Equals()GetHashCode
GetHashCode()Properties
ExecuteTask
Type: object
Fields
ClientName
The HTTP client webhooks given in code or configuration are sent with.
Type: object
GuardedClientName
The HTTP client webhooks kept through the API are sent with: it refuses internal addresses.
Type: object