MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / SetDefaults

Method SetDefaults

plugins/destination/gcs/client/spec/spec.go:73–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71}
72
73func (s *Spec) SetDefaults() {
74 if s.BatchSize == nil {
75 if s.NoRotate {
76 s.BatchSize = int64ptr(0)
77 } else {
78 s.BatchSize = int64ptr(10000)
79 }
80 }
81 if s.BatchSizeBytes == nil {
82 if s.NoRotate {
83 s.BatchSizeBytes = int64ptr(0)
84 } else {
85 s.BatchSizeBytes = int64ptr(50 * 1024 * 1024) // 50 MiB
86 }
87 }
88 if s.BatchTimeout == nil {
89 if s.NoRotate {
90 d := configtype.NewDuration(0)
91 s.BatchTimeout = &d
92 } else {
93 d := configtype.NewDuration(30 * time.Second)
94 s.BatchTimeout = &d
95 }
96 }
97}
98
99func (s *Spec) Validate() error {
100 if len(s.Bucket) == 0 {

Callers 2

NewFunction · 0.45
ValidateMethod · 0.45

Calls 1

int64ptrFunction · 0.70

Tested by

no test coverage detected