mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
protos: add Subserver custom_status to protos
This commit is contained in:
parent
3d4c66cada
commit
4a46e41f97
14 changed files with 93 additions and 28 deletions
4
app/src/types/generated/lit-status_pb.d.ts
generated
vendored
4
app/src/types/generated/lit-status_pb.d.ts
generated
vendored
|
|
@ -48,6 +48,9 @@ export class SubServerStatus extends jspb.Message {
|
|||
getError(): string;
|
||||
setError(value: string): void;
|
||||
|
||||
getCustomStatus(): string;
|
||||
setCustomStatus(value: string): void;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): SubServerStatus.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: SubServerStatus): SubServerStatus.AsObject;
|
||||
|
|
@ -63,6 +66,7 @@ export namespace SubServerStatus {
|
|||
disabled: boolean,
|
||||
running: boolean,
|
||||
error: string,
|
||||
customStatus: string,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
29
app/src/types/generated/lit-status_pb.js
generated
29
app/src/types/generated/lit-status_pb.js
generated
|
|
@ -326,7 +326,8 @@ proto.litrpc.SubServerStatus.toObject = function(includeInstance, msg) {
|
|||
var f, obj = {
|
||||
disabled: jspb.Message.getFieldWithDefault(msg, 1, false),
|
||||
running: jspb.Message.getFieldWithDefault(msg, 2, false),
|
||||
error: jspb.Message.getFieldWithDefault(msg, 3, "")
|
||||
error: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
||||
customStatus: jspb.Message.getFieldWithDefault(msg, 4, "")
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
|
|
@ -375,6 +376,10 @@ proto.litrpc.SubServerStatus.deserializeBinaryFromReader = function(msg, reader)
|
|||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setError(value);
|
||||
break;
|
||||
case 4:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setCustomStatus(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
|
|
@ -425,6 +430,13 @@ proto.litrpc.SubServerStatus.serializeBinaryToWriter = function(message, writer)
|
|||
f
|
||||
);
|
||||
}
|
||||
f = message.getCustomStatus();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
4,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -477,4 +489,19 @@ proto.litrpc.SubServerStatus.prototype.setError = function(value) {
|
|||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string custom_status = 4;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.litrpc.SubServerStatus.prototype.getCustomStatus = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
||||
};
|
||||
|
||||
|
||||
/** @param {string} value */
|
||||
proto.litrpc.SubServerStatus.prototype.setCustomStatus = function(value) {
|
||||
jspb.Message.setProto3StringField(this, 4, value);
|
||||
};
|
||||
|
||||
|
||||
goog.object.extend(exports, proto.litrpc);
|
||||
|
|
|
|||
|
|
@ -1071,6 +1071,7 @@ export const litSubServerStatus: STATUS.SubServerStatusResp.AsObject = {
|
|||
disabled: false,
|
||||
running: true,
|
||||
error: '',
|
||||
customStatus: '',
|
||||
},
|
||||
],
|
||||
[
|
||||
|
|
@ -1079,6 +1080,7 @@ export const litSubServerStatus: STATUS.SubServerStatusResp.AsObject = {
|
|||
disabled: false,
|
||||
running: true,
|
||||
error: '',
|
||||
customStatus: '',
|
||||
},
|
||||
],
|
||||
[
|
||||
|
|
@ -1087,6 +1089,7 @@ export const litSubServerStatus: STATUS.SubServerStatusResp.AsObject = {
|
|||
disabled: false,
|
||||
running: true,
|
||||
error: '',
|
||||
customStatus: '',
|
||||
},
|
||||
],
|
||||
[
|
||||
|
|
@ -1095,6 +1098,7 @@ export const litSubServerStatus: STATUS.SubServerStatusResp.AsObject = {
|
|||
disabled: false,
|
||||
running: true,
|
||||
error: '',
|
||||
customStatus: '',
|
||||
},
|
||||
],
|
||||
[
|
||||
|
|
@ -1103,6 +1107,7 @@ export const litSubServerStatus: STATUS.SubServerStatusResp.AsObject = {
|
|||
disabled: false,
|
||||
running: true,
|
||||
error: '',
|
||||
customStatus: '',
|
||||
},
|
||||
],
|
||||
[
|
||||
|
|
@ -1111,6 +1116,7 @@ export const litSubServerStatus: STATUS.SubServerStatusResp.AsObject = {
|
|||
disabled: false,
|
||||
running: true,
|
||||
error: '',
|
||||
customStatus: '',
|
||||
},
|
||||
],
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v3.6.1
|
||||
// source: autopilotserver.proto
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v3.6.1
|
||||
// source: firewall.proto
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v3.6.1
|
||||
// source: lit-accounts.proto
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v3.6.1
|
||||
// source: lit-autopilot.proto
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v3.6.1
|
||||
// source: lit-sessions.proto
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v3.6.1
|
||||
// source: lit-status.proto
|
||||
|
||||
|
|
@ -119,6 +119,10 @@ type SubServerStatus struct {
|
|||
// error describes an error that might have resulted in the sub-server not
|
||||
// starting up properly.
|
||||
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
|
||||
// custom_status details a custom state that the sub-server has entered,
|
||||
// which is unique to the sub-server, and which is not the standard
|
||||
// disabled, running or errored state.
|
||||
CustomStatus string `protobuf:"bytes,4,opt,name=custom_status,json=customStatus,proto3" json:"custom_status,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SubServerStatus) Reset() {
|
||||
|
|
@ -174,6 +178,13 @@ func (x *SubServerStatus) GetError() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (x *SubServerStatus) GetCustomStatus() string {
|
||||
if x != nil {
|
||||
return x.CustomStatus
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_lit_status_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_lit_status_proto_rawDesc = []byte{
|
||||
|
|
@ -191,23 +202,25 @@ var file_lit_status_proto_rawDesc = []byte{
|
|||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x69, 0x74,
|
||||
0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5d,
|
||||
0x0a, 0x0f, 0x53, 0x75, 0x62, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07,
|
||||
0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x32, 0x54, 0x0a,
|
||||
0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4a, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x53, 0x65,
|
||||
0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, 0x6c, 0x69, 0x74,
|
||||
0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6c, 0x69, 0x74, 0x72, 0x70, 0x63, 0x2e,
|
||||
0x53, 0x75, 0x62, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
|
||||
0x65, 0x73, 0x70, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f,
|
||||
0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x2d, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e,
|
||||
0x61, 0x6c, 0x2f, 0x6c, 0x69, 0x74, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x82,
|
||||
0x01, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x07, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f,
|
||||
0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x23,
|
||||
0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x32, 0x54, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4a, 0x0a,
|
||||
0x0f, 0x53, 0x75, 0x62, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x12, 0x1a, 0x2e, 0x6c, 0x69, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x53, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6c,
|
||||
0x69, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74,
|
||||
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e,
|
||||
0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x2d,
|
||||
0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x2f, 0x6c, 0x69, 0x74, 0x72, 0x70, 0x63, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -28,4 +28,9 @@ message SubServerStatus {
|
|||
// error describes an error that might have resulted in the sub-server not
|
||||
// starting up properly.
|
||||
string error = 3;
|
||||
|
||||
// custom_status details a custom state that the sub-server has entered,
|
||||
// which is unique to the sub-server, and which is not the standard
|
||||
// disabled, running or errored state.
|
||||
string custom_status = 4;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,10 @@
|
|||
"error": {
|
||||
"type": "string",
|
||||
"description": "error describes an error that might have resulted in the sub-server not\nstarting up properly."
|
||||
},
|
||||
"custom_status": {
|
||||
"type": "string",
|
||||
"description": "custom_status details a custom state that the sub-server has entered,\nwhich is unique to the sub-server, and which is not the standard\ndisabled, running or errored state."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v3.6.1
|
||||
// source: proxy.proto
|
||||
|
||||
|
|
|
|||
|
|
@ -28,4 +28,9 @@ message SubServerStatus {
|
|||
// error describes an error that might have resulted in the sub-server not
|
||||
// starting up properly.
|
||||
string error = 3;
|
||||
|
||||
// custom_status details a custom state that the sub-server has entered,
|
||||
// which is unique to the sub-server, and which is not the standard
|
||||
// disabled, running or errored state.
|
||||
string custom_status = 4;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,9 +73,10 @@ func (s *Manager) SubServerStatus(_ context.Context,
|
|||
resp := make(map[string]*litrpc.SubServerStatus, len(s.subServers))
|
||||
for server, status := range s.subServers {
|
||||
resp[server] = &litrpc.SubServerStatus{
|
||||
Disabled: status.Disabled,
|
||||
Running: status.Running,
|
||||
Error: status.Err,
|
||||
Disabled: status.Disabled,
|
||||
Running: status.Running,
|
||||
Error: status.Err,
|
||||
CustomStatus: status.customStatus,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue