syntax = "proto3";

package litrpc;

option go_package = "github.com/lightninglabs/lightning-terminal/litrpc";

// The Status server can be used to query the state of various LiT sub-servers.
service Status {
    rpc SubServerStatus (SubServerStatusReq) returns (SubServerStatusResp);
}

message SubServerStatusReq {
}

message SubServerStatusResp {
    // A map of sub-server names to their status.
    map<string, SubServerStatus> sub_servers = 1;
}

message SubServerStatus {
    // disabled is true if the sub-server is available in the LiT package but
    // has explicitly been disabled.
    bool disabled = 1;

    // running is true if the sub-server is currently running.
    bool running = 2;

    // 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;
}
