File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -548,6 +548,8 @@ func routeTunnel(c *cli.Context) error {
548548 return errors .Wrap (err , "Failed to route tunnel" )
549549 }
550550
551+ logger .Infof (route .SuccessSummary ())
552+
551553 return nil
552554}
553555
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ type Connection struct {
4444type Route interface {
4545 json.Marshaler
4646 RecordType () string
47+ // SuccessSummary explains what will route to this tunnel when it's provisioned successfully
48+ SuccessSummary () string
4749}
4850
4951type DNSRoute struct {
@@ -71,6 +73,10 @@ func (dr *DNSRoute) RecordType() string {
7173 return "dns"
7274}
7375
76+ func (dr * DNSRoute ) SuccessSummary () string {
77+ return fmt .Sprintf ("%s will route to your tunnel" , dr .userHostname )
78+ }
79+
7480type LBRoute struct {
7581 lbName string
7682 lbPool string
@@ -100,6 +106,10 @@ func (lr *LBRoute) RecordType() string {
100106 return "lb"
101107}
102108
109+ func (lr * LBRoute ) SuccessSummary () string {
110+ return fmt .Sprintf ("Load balancer %s will route to this tunnel through pool %s" , lr .lbName , lr .lbPool )
111+ }
112+
103113type Client interface {
104114 CreateTunnel (name string , tunnelSecret []byte ) (* Tunnel , error )
105115 GetTunnel (tunnelID uuid.UUID ) (* Tunnel , error )
You can’t perform that action at this time.
0 commit comments