Skip to content

Commit 7e74a22

Browse files
author
Kate Osborn
committed
Add comment and constant
1 parent 103cef5 commit 7e74a22

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

cmd/gateway/initialize.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ import (
1313
"github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/file"
1414
)
1515

16+
const (
17+
collectDeployCtxTimeout = 10 * time.Second
18+
)
19+
1620
type copyFiles struct {
1721
destDirName string
1822
srcFileNames []string
@@ -39,7 +43,7 @@ func initialize(cfg initializeConfig) error {
3943
return nil
4044
}
4145

42-
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
46+
ctx, cancel := context.WithTimeout(context.Background(), collectDeployCtxTimeout)
4347
defer cancel()
4448

4549
depCtx, err := cfg.collector.Collect(ctx)

internal/mode/static/licensing/collector.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717

1818
// Collector collects licensing information for N+.
1919
type Collector interface {
20+
// Collect collects the licensing information for N+ and returns it in the deployment context.
2021
Collect(ctx context.Context) (dataplane.DeploymentContext, error)
2122
}
2223

0 commit comments

Comments
 (0)