MCPcopy
hub / github.com/cloudflare/cloudflared / Hash

Method Hash

config/model.go:36–44  ·  view source on GitHub ↗

Hash returns the computed values to see if the forwarder values change

()

Source from the content-addressed store, hash-verified

34
35// Hash returns the computed values to see if the forwarder values change
36func (f *Forwarder) Hash() string {
37 h := sha256.New()
38 _, _ = io.WriteString(h, f.URL)
39 _, _ = io.WriteString(h, f.Listener)
40 _, _ = io.WriteString(h, f.TokenClientID)
41 _, _ = io.WriteString(h, f.TokenSecret)
42 _, _ = io.WriteString(h, f.Destination)
43 return fmt.Sprintf("%x", h.Sum(nil))
44}

Callers

nothing calls this directly

Calls 1

WriteStringMethod · 0.80

Tested by

no test coverage detected