MCPcopy
hub / github.com/uber/aresdb / Start

Method Start

client/schema.go:97–111  ·  view source on GitHub ↗

Start starts the CachedSchemaHandler, if interval > 0, will start periodical refresh

(interval int)

Source from the content-addressed store, hash-verified

95
96// Start starts the CachedSchemaHandler, if interval > 0, will start periodical refresh
97func (cf *CachedSchemaHandler) Start(interval int) {
98 cf.FetchSchemas()
99
100 if interval <= 0 {
101 return
102 }
103
104 go func(refreshInterval int) {
105 ticks := time.Tick(time.Duration(refreshInterval) * time.Second)
106 for range ticks {
107 cf.FetchSchemas()
108 }
109 }(interval)
110 return
111}
112
113// TranslateEnum translates given enum value to its enumID
114func (cf *CachedSchemaHandler) TranslateEnum(tableName string, columnID int, value interface{}, caseInsensitive bool) (enumID int, err error) {

Callers 2

NewConnectorMethod · 0.95
NewKafkaPublisherFunction · 0.95

Calls 1

FetchSchemasMethod · 0.95

Tested by

no test coverage detected