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

Function getHash

controller/mutators/etcd/common.go:106–118  ·  view source on GitHub ↗
(etcdStore kv.TxnStore, key string)

Source from the content-addressed store, hash-verified

104}
105
106func getHash(etcdStore kv.TxnStore, key string) (string, error) {
107 entityList, _, err := readEntityList(etcdStore, key)
108 if err != nil {
109 return "", err
110 }
111 var latestUpdateAt int64
112 for _, entity := range entityList.Entities {
113 if entity.LastUpdatedAt > latestUpdateAt {
114 latestUpdateAt = entity.LastUpdatedAt
115 }
116 }
117 return fmt.Sprintf("%dcv%d", latestUpdateAt, entityList.LastUpdatedAt), nil
118}

Callers 2

GetHashMethod · 0.85
GetHashMethod · 0.85

Calls 1

readEntityListFunction · 0.85

Tested by

no test coverage detected