MCPcopy Index your code
hub / github.com/dearcode/candy / NewID

Method NewID

util/master.go:26–33  ·  view source on GitHub ↗

NewID 生成新ID.

()

Source from the content-addressed store, hash-verified

24
25// NewID 生成新ID.
26func (m *Master) NewID() (int64, error) {
27 resp, err := m.client.NewID(context.Background(), &meta.NewIDRequest{})
28 if err != nil {
29 return 0, errors.Trace(err)
30 }
31
32 return resp.ID, errors.Trace(resp.Header.Error())
33}

Callers

nothing calls this directly

Calls 2

NewIDMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected