platform/electron/data-service-client
Classes
Section titled “Classes”DataServiceClient
Section titled “DataServiceClient”Defined in: app/src/platform/electron/data-service-client.ts:19
Talks to the data service. The service starts with the first call, outside the start-up
path, and starts again with the next call if it ever stops. A service that keeps failing,
for example because profile.db cannot be opened, rests for a minute, during which calls
fail at once instead of starting it again and again.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DataServiceClient(
entry,databasePath,logger):DataServiceClient
Defined in: app/src/platform/electron/data-service-client.ts:34
Parameters
Section titled “Parameters”string
Path of the service’s bundled entry.
databasePath
Section titled “databasePath”string
Path of profile.db.
logger
Section titled “logger”Receives failures.
Returns
Section titled “Returns”Methods
Section titled “Methods”call()
Section titled “call()”call<
M>(method, …params):Promise<ReturnType<DataApi[M]>>
Defined in: app/src/platform/electron/data-service-client.ts:45
Calls a method of the profile database.
Type Parameters
Section titled “Type Parameters”M extends "history" | "bookmarks" | "addVisit" | "setTitle" | "deleteHistory" | "clearHistory" | "importHistory" | "bookmarkList" | "bookmarkUrls" | "addBookmark" | "updateBookmark" | "removeBookmark" | "removeBookmarkUrl" | "importBookmarks" | "addDownload" | "updateDownload" | "downloads" | "interruptDownloads" | "removeDownloads" | "findBrowsers" | "importBrowser"
Parameters
Section titled “Parameters”method
Section titled “method”M
The method.
params
Section titled “params”…Parameters<DataApi[M]>
Its arguments.
Returns
Section titled “Returns”Promise<ReturnType<DataApi[M]>>
dispose()
Section titled “dispose()”dispose():
void
Defined in: app/src/platform/electron/data-service-client.ts:69
Stops the service.
Returns
Section titled “Returns”void
Type Aliases
Section titled “Type Aliases”DataClient
Section titled “DataClient”DataClient =
Pick<DataServiceClient,"call"|"dispose">
Defined in: app/src/platform/electron/data-service-client.ts:11
The calls of the data service, as its users see them.