ocket8888 commented on code in PR #6769:
URL: https://github.com/apache/trafficcontrol/pull/6769#discussion_r855539665


##########
traffic_monitor/config/config.go:
##########
@@ -97,37 +97,79 @@ func (t *PollingProtocol) UnmarshalJSON(b []byte) error {
        return nil
 }
 
-// Config is the configuration for the application. It includes myriad data, 
such as polling intervals and log locations.
+// Config is the configuration for the application. It includes myriad data,
+// such as polling intervals and log locations.
 type Config struct {
-       MonitorConfigPollingInterval time.Duration   `json:"-"`
-       HTTPTimeout                  time.Duration   `json:"-"`
-       PeerOptimistic               bool            `json:"peer_optimistic"`
-       PeerOptimisticQuorumMin      int             
`json:"peer_optimistic_quorum_min"`
-       DistributedPolling           bool            
`json:"distributed_polling"`
-       StatPolling                  bool            `json:"stat_polling"`
-       MaxEvents                    uint64          `json:"max_events"`
-       HealthFlushInterval          time.Duration   `json:"-"`
-       StatFlushInterval            time.Duration   `json:"-"`
-       StatBufferInterval           time.Duration   `json:"-"`
-       LogLocationError             string          `json:"log_location_error"`
-       LogLocationWarning           string          
`json:"log_location_warning"`
-       LogLocationInfo              string          `json:"log_location_info"`
-       LogLocationDebug             string          `json:"log_location_debug"`
-       LogLocationEvent             string          `json:"log_location_event"`
-       LogLocationAccess            string          
`json:"log_location_access"`
-       ServeReadTimeout             time.Duration   `json:"-"`
-       ServeWriteTimeout            time.Duration   `json:"-"`
-       StaticFileDir                string          `json:"static_file_dir"`
-       CRConfigHistoryCount         uint64          
`json:"crconfig_history_count"`
-       TrafficOpsMinRetryInterval   time.Duration   `json:"-"`
-       TrafficOpsMaxRetryInterval   time.Duration   `json:"-"`
-       CRConfigBackupFile           string          
`json:"crconfig_backup_file"`
-       TMConfigBackupFile           string          
`json:"tmconfig_backup_file"`
-       TrafficOpsDiskRetryMax       uint64          
`json:"traffic_ops_disk_retry_max"`
-       CachePollingProtocol         PollingProtocol 
`json:"cache_polling_protocol"`
-       HTTPPollingFormat            string          
`json:"http_polling_format"`
+       // Sets the Internet Protocol version used for polling cache servers.
+       CachePollingProtocol PollingProtocol `json:"cache_polling_protocol"`
+       // A path to a file where CDN Snapshot backups are written.
+       CRConfigBackupFile string `json:"crconfig_backup_file"`
+       // The number of historical CDN Snapshots to store.
+       CRConfigHistoryCount uint64 `json:"crconfig_history_count"`
+       // Controls whether Distributed Polling is enabled.
+       DistributedPolling bool `json:"distributed_polling"`
+       // Defines an interval on which Traffic Monitor will flush its collected
+       // health data such that it is made available through the API.
+       HealthFlushInterval time.Duration `json:"-"`
+       // A MIME-Type that will be sent in the Accept HTTP header in requests 
to
+       // cache servers for health and stats data.
+       HTTPPollingFormat string `json:"http_polling_format"`
+       // Sets the timeout duration for all HTTP operations - peer-polling and
+       // health data polling.
+       HTTPTimeout time.Duration `json:"-"`
+       // A "lib/go-log"-compliant string defining the logging of Access-level
+       // logs.
+       LogLocationAccess string `json:"log_location_access"`
+       // A "lib/go-log"-compliant string defining the logging of Debug-level 
logs.
+       LogLocationDebug string `json:"log_location_debug"`
+       // A "lib/go-log"-compliant string defining the logging of Error-level 
logs.
+       LogLocationError string `json:"log_location_error"`
+       // A "lib/go-log"-compliant string defining the logging of Event-level 
logs.
+       LogLocationEvent string `json:"log_location_event"`
+       // A "lib/go-log"-compliant string defining the logging of Info-level 
logs.
+       LogLocationInfo string `json:"log_location_info"`
+       // A "lib/go-log"-compliant string defining the logging of Warning-level
+       // logs.
+       LogLocationWarning string `json:"log_location_warning"`
+       // The maximum number of events to keep in TM's buffer to be served via 
its
+       // API.
+       MaxEvents uint64 `json:"max_events"`
+       // The interval on which to poll for this TM's CDN's "monitoring 
config".
+       MonitorConfigPollingInterval time.Duration `json:"-"`
+       // This appears to do nothing.
+       //
+       // Deprecated: This serves no purpose and will be removed in the future.
+       PeerOptimistic bool `json:"peer_optimistic"`

Review Comment:
   That's true. I don't mind taking it out at all, but the reason I deprecated 
it instead was just so that there were no changes to the logic/behavior of 
Traffic Monitor whatsoever. All I did was sort lines (which I guess technically 
affects structure packing) and add comments. I'll change things if you want, I 
just want to be clear that that's what you're asking.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to