1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-07 01:50:23 +08:00

TUN-3295: Show route command results

This commit is contained in:
Igor Postelnik
2020-09-17 15:19:47 -05:00
parent 20623255dd
commit 85d0afd3b0
5 changed files with 179 additions and 24 deletions

View File

@@ -270,17 +270,13 @@ func (sc *subcommandContext) cleanupConnections(tunnelIDs []uuid.UUID) error {
return nil
}
func (sc *subcommandContext) route(tunnelID uuid.UUID, r tunnelstore.Route) error {
func (sc *subcommandContext) route(tunnelID uuid.UUID, r tunnelstore.Route) (tunnelstore.RouteResult, error) {
client, err := sc.client()
if err != nil {
return err
return nil, err
}
if err := client.RouteTunnel(tunnelID, r); err != nil {
return err
}
return nil
return client.RouteTunnel(tunnelID, r)
}
func (sc *subcommandContext) tunnelActive(name string) (*tunnelstore.Tunnel, bool, error) {