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

Method SetDefaults

plugins/destination/test/client/spec.go:58–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56var JSONSchema string
57
58func (s *Spec) SetDefaults() {
59 if s.BatchSize == nil {
60 s.BatchSize = ptr(int64(10000))
61 }
62 if s.BatchSizeBytes == nil {
63 s.BatchSizeBytes = ptr(int64(50 * 1024 * 1024)) // 50 MiB
64 }
65 if s.BatchTimeout == nil {
66 s.BatchTimeout = ptr(configtype.NewDuration(30 * time.Second))
67 }
68}
69
70func (s *Spec) Validate() error {
71 if s.BatchWriter && s.StreamBatchWriter {

Callers 2

NewFunction · 0.95
TestConnectionFunction · 0.95

Calls 1

ptrFunction · 0.70

Tested by 1

TestConnectionFunction · 0.76