You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/04/11 20:16:35 UTC
[GitHub] mitchell852 closed pull request #2121: fixed the package reference
for CacheGroups
mitchell852 closed pull request #2121: fixed the package reference for CacheGroups
URL: https://github.com/apache/incubator-trafficcontrol/pull/2121
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/traffic_monitor/towrap/towrap.go b/traffic_monitor/towrap/towrap.go
index e9d4e3e38..bad18a3bb 100644
--- a/traffic_monitor/towrap/towrap.go
+++ b/traffic_monitor/towrap/towrap.go
@@ -29,6 +29,7 @@ import (
"github.com/apache/incubator-trafficcontrol/lib/go-log"
"github.com/apache/incubator-trafficcontrol/lib/go-tc"
+ "github.com/apache/incubator-trafficcontrol/lib/go-tc/v13"
"github.com/apache/incubator-trafficcontrol/traffic_ops/client"
)
@@ -44,7 +45,7 @@ type ITrafficOpsSession interface {
Profiles() ([]tc.Profile, error)
Parameters(profileName string) ([]tc.Parameter, error)
DeliveryServices() ([]tc.DeliveryService, error)
- CacheGroups() ([]tc.CacheGroup, error)
+ CacheGroups() ([]v13.CacheGroup, error)
CRConfigHistory() []CRConfigStat
}
@@ -446,7 +447,7 @@ func (s TrafficOpsSessionThreadsafe) DeliveryServices() ([]tc.DeliveryService, e
return ss.DeliveryServices()
}
-func (s TrafficOpsSessionThreadsafe) CacheGroups() ([]tc.CacheGroup, error) {
+func (s TrafficOpsSessionThreadsafe) CacheGroups() ([]v13.CacheGroup, error) {
ss := s.get()
if ss == nil {
return nil, ErrNilSession
diff --git a/traffic_ops/client/cachegroup.go b/traffic_ops/client/cachegroup.go
index 895ef630f..3a97849ec 100644
--- a/traffic_ops/client/cachegroup.go
+++ b/traffic_ops/client/cachegroup.go
@@ -18,18 +18,18 @@ package client
import (
"encoding/json"
- tc "github.com/apache/incubator-trafficcontrol/lib/go-tc"
+ "github.com/apache/incubator-trafficcontrol/lib/go-tc/v13"
)
// CacheGroups gets the CacheGroups in an array of CacheGroup structs
// (note CacheGroup used to be called location)
// Deprecated: use GetCacheGroups.
-func (to *Session) CacheGroups() ([]tc.CacheGroup, error) {
+func (to *Session) CacheGroups() ([]v13.CacheGroup, error) {
cgs, _, err := to.GetCacheGroups()
return cgs, err
}
-func (to *Session) GetCacheGroups() ([]tc.CacheGroup, ReqInf, error) {
+func (to *Session) GetCacheGroups() ([]v13.CacheGroup, ReqInf, error) {
url := "/api/1.2/cachegroups.json"
resp, remoteAddr, err := to.request("GET", url, nil) // TODO change to getBytesWithTTL, return CacheHitStatus
reqInf := ReqInf{CacheHitStatus: CacheHitStatusMiss, RemoteAddr: remoteAddr}
@@ -38,7 +38,7 @@ func (to *Session) GetCacheGroups() ([]tc.CacheGroup, ReqInf, error) {
}
defer resp.Body.Close()
- var data tc.CacheGroupsResponse
+ var data v13.CacheGroupsResponse
if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
return nil, reqInf, err
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services