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

Method GetGtidForJob

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

Source from the content-addressed store, hash-verified

90 }, nil
91}
92func (sm *StoreManager) GetGtidForJob(jobName string) (string, error) {
93 key := fmt.Sprintf("dtle/%v/Gtid", jobName)
94 p, err := sm.consulStore.Get(key)
95 if err == store.ErrKeyNotFound {
96 return "", nil
97 } else if err != nil {
98 return "", err
99 }
100 // Get a non-existing KV
101 return string(p.Value), nil
102}
103
104func (sm *StoreManager) GetConfig(jobName string) (*MySQLDriverConfig, error) {
105 key := fmt.Sprintf("dtle/%v/Config", jobName)

Callers 3

GetJobPositionV2Function · 0.95
RunMethod · 0.80
GetGtidFromConsulFunction · 0.80

Calls 1

GetMethod · 0.80

Tested by

no test coverage detected