MCPcopy Create free account
hub / github.com/actiontech/dtle / GetConfig

Method GetConfig

driver/common/store.go:104–118  ·  view source on GitHub ↗
(jobName string)

Source from the content-addressed store, hash-verified

102}
103
104func (sm *StoreManager) GetConfig(jobName string) (*MySQLDriverConfig, error) {
105 key := fmt.Sprintf("dtle/%v/Config", jobName)
106
107 kv, err := sm.consulStore.Get(key)
108 if err != nil {
109 return nil, err
110 }
111
112 config := &MySQLDriverConfig{}
113 err = json.Unmarshal(kv.Value, config)
114 if err != nil {
115 return nil, err
116 }
117 return config, nil
118}
119
120func (sm *StoreManager) GetNatsIfExist(jobName string) (string, bool, error) {
121 natsKey := fmt.Sprintf("dtle/%v/NatsAddr", jobName)

Callers 2

RunMethod · 0.80
RunMethod · 0.80

Calls 2

GetMethod · 0.80
UnmarshalMethod · 0.65

Tested by

no test coverage detected