Skip to content

Commit

Permalink
feat: Add generic ResponseRetryFunc functions
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurpitman committed Aug 21, 2024
1 parent 362618c commit c60b6ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/client/dtclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ type SettingsModificationInfo struct {
NonModifiablePaths []interface{} `json:"nonModifiablePaths"`
}

var retryIfNotStatusNotFound = func(resp *http.Response) bool { return resp.StatusCode != http.StatusNotFound }

Check failure on line 56 in pkg/client/dtclient/client.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] pkg/client/dtclient/client.go#L56

var `retryIfNotStatusNotFound` is unused (unused)
Raw output
pkg/client/dtclient/client.go:56:5: var `retryIfNotStatusNotFound` is unused (unused)
var retryIfNotStatusNotFound = func(resp *http.Response) bool { return resp.StatusCode != http.StatusNotFound }
    ^
var retryIfNotStatusBadRequest = func(resp *http.Response) bool { return resp.StatusCode != http.StatusBadRequest }

Check failure on line 57 in pkg/client/dtclient/client.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] pkg/client/dtclient/client.go#L57

var `retryIfNotStatusBadRequest` is unused (unused)
Raw output
pkg/client/dtclient/client.go:57:5: var `retryIfNotStatusBadRequest` is unused (unused)
var retryIfNotStatusBadRequest = func(resp *http.Response) bool { return resp.StatusCode != http.StatusBadRequest }
    ^

type UpsertSettingsOptions struct {
OverrideRetry *RetrySetting
InsertAfter string
Expand Down

0 comments on commit c60b6ec

Please sign in to comment.