4 System Services
| (require rivet/system) | package: rivet |
The generated native host installs a system-adapter during startup. Headless tools and tests may parameterize current-system-adapter with a deterministic adapter. The default adapter fails closed instead of silently pretending that an operating-system action succeeded.
struct
(struct system-adapter ( name capabilities acquire-single-instance register-activation-handler show-notification set-tray-menu set-autostart autostart-enabled secure-store-set secure-store-ref secure-store-remove install-crash-hook)) name : symbol? capabilities : list? acquire-single-instance : procedure? register-activation-handler : procedure? show-notification : procedure? set-tray-menu : procedure? set-autostart : procedure? autostart-enabled : procedure? secure-store-set : procedure? secure-store-ref : procedure? secure-store-remove : procedure? install-crash-hook : procedure?
parameter
(current-system-adapter adapter) → void? adapter : system-adapter?
struct
(struct settings-store (path lock data) #:mutable) path : path? lock : semaphore? data : hash?
parameter
(current-rivet-log-sink sink) → void? sink : procedure?
parameter
(current-rivet-crash-reporter reporter) → void? reporter : procedure?
procedure
procedure
(acquire-single-instance! application-id activation) → any/c application-id : string? activation : any/c
procedure
(register-activation-handler! handler) → any/c
handler : procedure?
procedure
(show-system-notification! title body [ #:tag tag]) → any/c title : string? body : string? tag : (or/c #f string?) = #f
procedure
(set-tray-menu! items) → any/c
items : list?
procedure
(set-autostart! enabled?) → any/c
enabled? : boolean?
procedure
procedure
(secure-store-set! service account secret) → any/c
service : string? account : string? secret : bytes?
procedure
(secure-store-ref service account [default]) → any/c
service : string? account : string? default : any/c = #f
procedure
(secure-store-remove! service account) → any/c
service : string? account : string?
4.1 Settings and Diagnostics
procedure
(make-settings-store path) → settings-store?
path : path-string?
procedure
(settings-ref store key [default]) → any/c
store : settings-store? key : (or/c symbol? string?) default : any/c = #f
procedure
(settings-set! store key value) → any/c
store : settings-store? key : (or/c symbol? string?) value : any/c
procedure
(settings-remove! store key) → void?
store : settings-store? key : (or/c symbol? string?)
procedure
(settings-snapshot store) → hash?
store : settings-store?
procedure
level : (or/c 'debug 'info 'warning 'error 'critical) event : any/c fields : hash? = (hasheq)
procedure
(call-with-crash-reporting thunk [ #:context context]) → any/c thunk : (-> any/c) context : hash? = (hasheq)