Engine improvements

Add back events tests
Fill out SMTP comms handler
Add getcommunicationrelayers gRPC command
This commit is contained in:
Adrian Gallagher
2019-06-14 18:00:42 +10:00
parent 6b2cfe7905
commit b901c4b670
14 changed files with 978 additions and 741 deletions

View File

@@ -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",

View File

@@ -89,6 +89,7 @@ func main() {
enableSubsystemCommand,
disableSubsystemCommand,
getRPCEndpointsCommand,
getCommunicationRelayersCommand,
getExchangesCommand,
enableExchangeCommand,
disableExchangeCommand,