MCPcopy
hub / github.com/gofiber/fiber / serviceKey

Method serviceKey

state.go:241–244  ·  view source on GitHub ↗

serviceKey returns a key for a service in the State. A key is composed of the State's servicePrefix (hashed) and the hash of the service string. This way we can avoid collisions and have a unique key for each service.

(key string)

Source from the content-addressed store, hash-verified

239// A key is composed of the State's servicePrefix (hashed) and the hash of the service string.
240// This way we can avoid collisions and have a unique key for each service.
241func (s *State) serviceKey(key string) string {
242 // hash the service string to avoid collisions
243 return s.servicePrefix + hex.EncodeToString([]byte(key))
244}
245
246// setService sets a service in the State.
247func (s *State) setService(srv Service) {

Callers 4

setServiceMethod · 0.95
deleteServiceMethod · 0.95
GetServiceFunction · 0.80
TestState_ServiceFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestState_ServiceFunction · 0.64