MCPcopy Create free account
hub / github.com/DoNewsCode/core / put

Function put

config/remote/etcd/etcd_test.go:132–144  ·  view source on GitHub ↗
(r *ETCD, val string)

Source from the content-addressed store, hash-verified

130}
131
132func put(r *ETCD, val string) error {
133 client, err := clientv3.New(r.clientConfig)
134 if err != nil {
135 return err
136 }
137 defer client.Close()
138
139 _, err = client.Put(r.context(), r.key, val)
140 if err != nil {
141 return err
142 }
143 return nil
144}

Callers 2

TestRemoteFunction · 0.70
TestErrorFunction · 0.70

Calls 2

CloseMethod · 0.80
contextMethod · 0.80

Tested by

no test coverage detected