mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-08 15:11:07 +00:00
Engine improvements
Add back events tests Fill out SMTP comms handler Add getcommunicationrelayers gRPC command
This commit is contained in:
@@ -183,6 +183,32 @@ func getRPCEndpoints(_ *cli.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
var getCommunicationRelayersCommand = cli.Command{
|
||||
Name: "getcommsrelayers",
|
||||
Usage: "gets GoCryptoTrader communication relayers",
|
||||
Action: getCommunicationRelayers,
|
||||
}
|
||||
|
||||
func getCommunicationRelayers(_ *cli.Context) error {
|
||||
conn, err := setupClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer conn.Close()
|
||||
|
||||
client := gctrpc.NewGoCryptoTraderClient(conn)
|
||||
result, err := client.GetCommunicationRelayers(context.Background(),
|
||||
&gctrpc.GetCommunicationRelayersRequest{},
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
jsonOutput(result)
|
||||
return nil
|
||||
}
|
||||
|
||||
var getExchangesCommand = cli.Command{
|
||||
Name: "getexchanges",
|
||||
Usage: "gets a list of enabled or available exchanges",
|
||||
|
||||
@@ -89,6 +89,7 @@ func main() {
|
||||
enableSubsystemCommand,
|
||||
disableSubsystemCommand,
|
||||
getRPCEndpointsCommand,
|
||||
getCommunicationRelayersCommand,
|
||||
getExchangesCommand,
|
||||
enableExchangeCommand,
|
||||
disableExchangeCommand,
|
||||
|
||||
Reference in New Issue
Block a user