ocket8888 commented on a change in pull request #5247:
URL: https://github.com/apache/trafficcontrol/pull/5247#discussion_r517765804
##########
File path: lib/go-atscfg/astatsdotconfig.go
##########
@@ -19,23 +19,41 @@ package atscfg
* under the License.
*/
+import (
+ "github.com/apache/trafficcontrol/lib/go-tc"
+)
+
const AstatsSeparator = "="
const AstatsFileName = "astats.config"
const ContentTypeAstatsDotConfig = ContentTypeTextASCII
const LineCommentAstatsDotConfig = LineCommentHash
func MakeAStatsDotConfig(
- profileName string,
- paramData map[string]string, // GetProfileParamData(tx, profile.ID,
AstatsFileName)
- toToolName string, // tm.toolname global parameter (TODO: cache itself?)
- toURL string, // tm.url global parameter (TODO: cache itself?)
-) string {
- hdr := GenericHeaderComment(profileName, toToolName, toURL)
+ server *tc.ServerNullable,
Review comment:
Currently, rolling aliases are not being updated because that breaks the
API client package. So either this needs to be an API-version-specific
structure like `ServerV30` (or is it `ServerNullableV30`?) or we need to
revisit that decision.
##########
File path: lib/go-atscfg/atscfg.go
##########
@@ -22,16 +22,36 @@ package atscfg
import (
"encoding/json"
"errors"
+ "fmt"
"net"
"sort"
"strconv"
"strings"
- "time"
- "github.com/apache/trafficcontrol/lib/go-log"
"github.com/apache/trafficcontrol/lib/go-tc"
)
+// ATSConfigFile is all the information necessary to create an ATS config
file, including the file name, path, data, and metadata.
Review comment:
GoDoc should start with the name of the documented symbol
##########
File path: lib/go-atscfg/atscfg.go
##########
@@ -22,16 +22,36 @@ package atscfg
import (
"encoding/json"
"errors"
+ "fmt"
"net"
"sort"
"strconv"
"strings"
- "time"
- "github.com/apache/trafficcontrol/lib/go-log"
"github.com/apache/trafficcontrol/lib/go-tc"
)
+// ATSConfigFile is all the information necessary to create an ATS config
file, including the file name, path, data, and metadata.
+// This is provided as a convenience and unified structure for users. The
lib/go-atscfg library doesn't actually use or return this. See
ATSConfigFileData.
+type CfgFile struct {
+ Name string
+ Path string
+ Cfg
+}
+
+// ATSConfigFileData is the data and metadata for an ATS Config File.
Review comment:
Same as above RE: GoDoc
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]