You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ne...@apache.org on 2017/01/25 17:30:23 UTC

[12/20] incubator-trafficcontrol git commit: Remove TM2 unused func

Remove TM2 unused func


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/6760764c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/6760764c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/6760764c

Branch: refs/heads/master
Commit: 6760764cadd9ad5f2a8226371533a739ec731dbc
Parents: f3e45f7
Author: Robert Butts <ro...@gmail.com>
Authored: Mon Jan 23 13:49:23 2017 -0700
Committer: Dave Neuman <ne...@apache.org>
Committed: Wed Jan 25 10:29:46 2017 -0700

----------------------------------------------------------------------
 .../experimental/traffic_monitor/cache/cache.go | 20 --------------------
 1 file changed, 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/6760764c/traffic_monitor/experimental/traffic_monitor/cache/cache.go
----------------------------------------------------------------------
diff --git a/traffic_monitor/experimental/traffic_monitor/cache/cache.go b/traffic_monitor/experimental/traffic_monitor/cache/cache.go
index a850102..a0b6b60 100644
--- a/traffic_monitor/experimental/traffic_monitor/cache/cache.go
+++ b/traffic_monitor/experimental/traffic_monitor/cache/cache.go
@@ -280,26 +280,6 @@ func StatsMarshall(statResultHistory ResultStatHistory, statInfo ResultInfoHisto
 	return json.Marshal(stats)
 }
 
-func getHealthPollingURL(cache enum.CacheName, monitorConfig to.TrafficMonitorConfigMap) (string, error) {
-	srv, ok := monitorConfig.TrafficServer[string(cache)]
-	if !ok {
-		return "", fmt.Errorf("server not found in monitor config from Traffic Ops")
-	}
-	url := monitorConfig.Profile[srv.Profile].Parameters.HealthPollingURL
-	if url == "" {
-		return "", fmt.Errorf("health polling URL not found in monitor config from Traffic Ops")
-	}
-
-	// TODO abstract replacer, remove duplication with manager/monitorconfig.go
-	url = strings.NewReplacer(
-		"${hostname}", srv.IP,
-		"${interface_name}", srv.InterfaceName,
-		"application=system", "application=plugin.remap",
-		"application=", "application=plugin.remap",
-	).Replace(url)
-	return url, nil
-}
-
 // Handle handles results fetched from a cache, parsing the raw Reader data and passing it along to a chan for further processing.
 func (handler Handler) Handle(id string, r io.Reader, reqTime time.Duration, reqErr error, pollID uint64, pollFinished chan<- uint64) {
 	log.Debugf("poll %v %v handle start\n", pollID, time.Now())