func (s *APIServer) upsertReverseTunnel(w http.ResponseWriter, r *http.Request, p httprouter.Params) (interface{}, error) {
	var req upsertReverseTunnelReq
	if err := httplib.ReadJSON(r, &req); err != nil {
		return nil, trace.Wrap(err)
	}
	if err := s.a.UpsertReverseTunnel(req.ReverseTunnel, req.TTL); err != nil {
		return nil, trace.Wrap(err)
	}
	return message("ok"), nil
}
// upsertReverseTunnel is called by admin to create a reverse tunnel to remote proxy
upsertReverseTunnel is called by admin to create a reverse tunnel to remote proxy
// upsertReverseTunnel is called by admin to create a reverse tunnel to remote proxy
func (s *APIServer) upsertReverseTunnel(w http.ResponseWriter, r *http.Request, p httprouter.Params) (interface{}, error) {
	var req upsertReverseTunnelReq
	if err := httplib.ReadJSON(r, &req); err != nil {
		return nil, trace.Wrap(err)
	}
	if err := s.a.UpsertReverseTunnel(req.ReverseTunnel, req.TTL); err != nil {
		return nil, trace.Wrap(err)
	}
	return message("ok"), nil
}
func ( s * APIServer ) upsertReverseTunnel ( w http . ResponseWriter , r * http . Request , p httprouter . Params ) ( interface { } , error ) { var req upsertReverseTunnelReq if err := httplib . ReadJSON ( r , & req ) ; err != nil { return nil , trace . Wrap ( err ) } if err := s . a . UpsertReverseTunnel ( req . ReverseTunnel , req . TTL ) ; err != nil { return nil , trace . Wrap ( err ) } return message ( " " ) , nil }
upsertReverseTunnel is called by admin to create a reverse tunnel to remote proxy
upsertReverseTunnel is called by admin to create a reverse tunnel to remote proxy