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

Method Set

cli/internal/otel/table_duration.go:19–28  ·  view source on GitHub ↗
(table string, duration time.Duration)

Source from the content-addressed store, hash-verified

17}
18
19func (td *TableDurations) Set(table string, duration time.Duration) {
20 d, ok := td.data.Get(table)
21 if !ok || duration > d {
22 // if not ok, add the duration
23 // if duration is greater than existing, update it
24 // else do nothing (keep the existing duration)
25
26 td.data.Add(table, duration)
27 }
28}
29
30func (td *TableDurations) GetAll() map[string]time.Duration {
31 return td.data.GetAll()

Callers

nothing calls this directly

Calls 2

AddMethod · 0.65
GetMethod · 0.45

Tested by

no test coverage detected