CDPotion.Domain.BackgroundService (cdpotion v0.1.4)
Summary
Types
description not provided :(
A key-value pair for additional event information to pass along.
The Background Service that will be associated with the commands/events. Every Background Service operates independently, but they share the same API.
Functions
Clears all stored data for the service.
Set the recording state for the service.
Enables event updates for the service.
Disables event updates for the service.
Types
background_service_event()
@type background_service_event() :: %{ eventMetadata: [event_metadata()], eventName: String.t(), instanceId: String.t(), origin: String.t(), service: service_name(), serviceWorkerRegistrationId: CDPotion.Domain.ServiceWorker.registration_id(), storageKey: String.t(), timestamp: CDPotion.Domain.Network.time_since_epoch() }
description not provided :(
event_metadata()
A key-value pair for additional event information to pass along.
service_name()
@type service_name() ::
:backgroundFetch
| :backgroundSync
| :pushMessaging
| :notifications
| :paymentHandler
| :periodicBackgroundSync
The Background Service that will be associated with the commands/events. Every Background Service operates independently, but they share the same API.
Functions
clear_events(service)
@spec clear_events(service_name()) :: {String.t(), map()}
Clears all stored data for the service.
Parameters:
- (Required)
service
: description not provided :(
set_recording(should_record, service)
@spec set_recording(boolean(), service_name()) :: {String.t(), map()}
Set the recording state for the service.
Parameters:
- (Required)
should_record
: description not provided :( - (Required)
service
: description not provided :(
start_observing(service)
@spec start_observing(service_name()) :: {String.t(), map()}
Enables event updates for the service.
Parameters:
- (Required)
service
: description not provided :(
stop_observing(service)
@spec stop_observing(service_name()) :: {String.t(), map()}
Disables event updates for the service.
Parameters:
- (Required)
service
: description not provided :(