Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bucket-targets.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ type BucketTarget struct {
Edge bool `json:"edge"` // target is recipient of edge traffic
EdgeSyncBeforeExpiry bool `json:"edgeSyncBeforeExpiry"` // must replicate to edge before expiry
OfflineCount int64 `json:"offlineCount"`
InsecureTLS bool `json:"insecureTLS"`
}

// Credentials holds access and secret keys.
Expand Down Expand Up @@ -126,6 +127,7 @@ func (t *BucketTarget) Clone() BucketTarget {
Edge: t.Edge,
EdgeSyncBeforeExpiry: t.EdgeSyncBeforeExpiry,
OfflineCount: t.OfflineCount,
InsecureTLS: t.InsecureTLS,
}
}

Expand Down
35 changes: 30 additions & 5 deletions bucket-targets_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions remote-target-commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ const (
EdgeUpdateType
// EdgeExpiryUpdateType sets bucket target to sync before expiry
EdgeExpiryUpdateType
// InsecureTLSUpdateType update tls setting
InsecureTLSUpdateType
)

// GetTargetUpdateOps returns a slice of update operations being
Expand All @@ -184,6 +186,9 @@ func GetTargetUpdateOps(values url.Values) []TargetUpdateType {
if values.Get("proxy") == "true" {
ops = append(ops, ProxyUpdateType)
}
if values.Get("tls") == "true" {
ops = append(ops, InsecureTLSUpdateType)
}
if values.Get("healthcheck") == "true" {
ops = append(ops, HealthCheckDurationUpdateType)
}
Expand Down Expand Up @@ -227,6 +232,8 @@ func (adm *AdminClient) UpdateRemoteTarget(ctx context.Context, target *BucketTa
queryValues.Set("sync", "true")
case ProxyUpdateType:
queryValues.Set("proxy", "true")
case InsecureTLSUpdateType:
queryValues.Set("tls", "true")
case BandwidthLimitUpdateType:
queryValues.Set("bandwidth", "true")
case HealthCheckDurationUpdateType:
Expand Down
Loading