-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from lightninglabs/lit-subserver-status
Add support for litd subserver status RPC
- Loading branch information
Showing
5 changed files
with
63 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* eslint-disable */ | ||
export interface SubServerStatusReq {} | ||
|
||
export interface SubServerStatusResp { | ||
/** A map of sub-server names to their status. */ | ||
subServers: { [key: string]: SubServerStatus }; | ||
} | ||
|
||
export interface SubServerStatusResp_SubServersEntry { | ||
key: string; | ||
value: SubServerStatus | undefined; | ||
} | ||
|
||
export interface SubServerStatus { | ||
/** | ||
* disabled is true if the sub-server is available in the LiT package but | ||
* has explicitly been disabled. | ||
*/ | ||
disabled: boolean; | ||
/** running is true if the sub-server is currently running. */ | ||
running: boolean; | ||
/** | ||
* error describes an error that might have resulted in the sub-server not | ||
* starting up properly. | ||
*/ | ||
error: string; | ||
} | ||
|
||
/** The Status server can be used to query the state of various LiT sub-servers. */ | ||
export interface Status { | ||
subServerStatus( | ||
request?: DeepPartial<SubServerStatusReq> | ||
): Promise<SubServerStatusResp>; | ||
} | ||
|
||
type Builtin = | ||
| Date | ||
| Function | ||
| Uint8Array | ||
| string | ||
| number | ||
| boolean | ||
| undefined; | ||
|
||
type DeepPartial<T> = T extends Builtin | ||
? T | ||
: T extends Array<infer U> | ||
? Array<DeepPartial<U>> | ||
: T extends ReadonlyArray<infer U> | ||
? ReadonlyArray<DeepPartial<U>> | ||
: T extends {} | ||
? { [K in keyof T]?: DeepPartial<T[K]> } | ||
: Partial<T>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './lit/firewall'; | ||
export * from './lit/lit-autopilot'; | ||
export * from './lit/lit-sessions'; | ||
export * from './lit/lit-status'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters