Skip to content

Commit

Permalink
ref: remove all DDI code, it's done upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhop committed Aug 10, 2024
1 parent a73c169 commit fd98a85
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
7 changes: 0 additions & 7 deletions cmd/ns1_exporter/ns1_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ var (
"NS1 API request concurrency. Default (0) uses NS1 Go SDK sleep strategry. 60 may be good balance between performance and reduced risk of HTTP 429, see https://pkg.go.dev/gopkg.in/ns1/ns1-go.v2/rest and exporter documentation for more information.",
).Default("0").Int()

// TODO: allow enabling DDI at some poitn? do we need it for anything this project does?
// flagNS1EnableDDI = kingpin.Flag(
// "ns1.enable-ddi",
// "Whether or not to enable DDI in the NS1 API client",
// ).Bool()

flagNS1ExporterEnableRecordQPS = kingpin.Flag(
"ns1.exporter-enable-record-qps",
"Whether or not to enable retrieving record-level QPS stats from the NS1 API. Default is enabled.",
Expand Down Expand Up @@ -170,7 +164,6 @@ func Run(logger log.Logger) {
Token: token,
Concurrency: *flagNS1Concurrency,
UserAgent: fmt.Sprintf("ns1_exporter/%s", version.Version),
// EnableDDI: *flagNS1EnableDDI,
})
exporterWorker := exporter.NewWorker(logger, apiClient, *flagNS1ExporterEnableZoneQPS, *flagNS1ExporterEnableRecordQPS, *flagNS1ExporterZoneBlacklistRegex, *flagNS1ExporterZoneWhitelistRegex)
sdWorker := sd.NewWorker(logger, apiClient, *flagNS1SDZoneBlacklistRegex, *flagNS1SDZoneWhitelistRegex, *flagNS1SDRecordTypeRegex)
Expand Down
5 changes: 0 additions & 5 deletions pkg/ns1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ type APIConfig struct {
Endpoint string
TLSSkipVerify bool
UserAgent string
EnableDDI bool
}

// ZoneRecord is an internal struct that is essentially the same thing as a
Expand Down Expand Up @@ -80,10 +79,6 @@ func NewClient(config APIConfig) *api.Client {
httpClient.Transport = tr
}

if config.EnableDDI {
clientOpts = append(clientOpts, api.SetDDIAPI())
}

c := api.NewClient(httpClient, clientOpts...)

if config.Concurrency > 0 {
Expand Down

0 comments on commit fd98a85

Please sign in to comment.