Skip to content

Commit

Permalink
change flag style to help on-prem substitutions
Browse files Browse the repository at this point in the history
  • Loading branch information
ddowker committed Sep 14, 2024
1 parent 909bff0 commit 20d68a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions broker/client/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (r *Reader) Read(p []byte) (n int, err error) {

// If the frame preceding EOF provided a fragment URL, open it directly.
if !r.Request.MetadataOnly && r.Response.Status == pb.Status_OK && r.Response.FragmentUrl != "" {
if SkipSignedURLs {
if SkipSignedURLs > 0 {
fragURL := r.Response.Fragment.BackingStore.URL()
if fragURL.Scheme != "gs" {
return 0, fmt.Errorf("SkipSignedURL unsupported scheme: %s", fragURL.Scheme)
Expand Down Expand Up @@ -483,7 +483,7 @@ var (
// stores_test.go, which is in broker/fragment, imports broker/client so we cannot import broker/fragment here
// to avoid a cycle. Instead we will repeat a subset of store_gcs.go.

var SkipSignedURLs = false
var SkipSignedURLs = uint32(0)
var gcs = &gcsBackend{}

type gcsBackend struct {
Expand Down
2 changes: 1 addition & 1 deletion mainboilerplate/runconsumer/run_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ type BaseConfig struct {
Limit uint32 `long:"limit" env:"LIMIT" default:"32" description:"Maximum number of Shards this consumer process will allocate"`
MaxHotStandbys uint32 `long:"max-hot-standbys" env:"MAX_HOT_STANDBYS" default:"3" description:"Maximum effective hot standbys of any one shard, which upper-bounds its stated hot-standbys."`
WatchDelay time.Duration `long:"watch-delay" env:"WATCH_DELAY" default:"30ms" description:"Delay applied to the application of watched Etcd events. Larger values amortize the processing of fast-changing Etcd keys."`
SkipSignedURLs bool `long:"skip-signed-urls" env:"SKIP_SIGNED_URLS" description:"When a signed URL is received, use fragment info instead to retrieve data with auth header. This is useful when clients do not wish/require the signing."`
SkipSignedURLs uint32 `long:"skip-signed-urls" env:"SKIP_SIGNED_URLS" default:"1" description:"When a signed URL is received, use fragment info instead to retrieve data with auth header. This is useful when clients do not wish/require the signing."`
} `group:"Consumer" namespace:"consumer" env-namespace:"CONSUMER"`

Broker struct {
Expand Down

0 comments on commit 20d68a2

Please sign in to comment.