mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-05 15:10:59 +00:00
Engine improvements
Add back events tests Fill out SMTP comms handler Add getcommunicationrelayers gRPC command
This commit is contained in:
@@ -195,6 +195,24 @@ func (s *RPCServer) GetRPCEndpoints(ctx context.Context, r *gctrpc.GetRPCEndpoin
|
||||
return &resp, nil
|
||||
}
|
||||
|
||||
// GetCommunicationRelayers returns the status of the engines communication relayers
|
||||
func (s *RPCServer) GetCommunicationRelayers(ctx context.Context, r *gctrpc.GetCommunicationRelayersRequest) (*gctrpc.GetCommunicationRelayersResponse, error) {
|
||||
relayers, err := Bot.CommsManager.GetStatus()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var resp gctrpc.GetCommunicationRelayersResponse
|
||||
resp.CommunicationRelayers = make(map[string]*gctrpc.CommunicationRelayer)
|
||||
for k, v := range relayers {
|
||||
resp.CommunicationRelayers[k] = &gctrpc.CommunicationRelayer{
|
||||
Enabled: v.Enabled,
|
||||
Connected: v.Connected,
|
||||
}
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
||||
|
||||
// GetExchanges returns a list of exchanges
|
||||
// Param is whether or not you wish to list enabled exchanges
|
||||
func (s *RPCServer) GetExchanges(ctx context.Context, r *gctrpc.GetExchangesRequest) (*gctrpc.GetExchangesResponse, error) {
|
||||
|
||||
Reference in New Issue
Block a user