MCPcopy
hub / github.com/lonng/nano / customerRemoteServiceRoute

Function customerRemoteServiceRoute

examples/customerroute/main.go:181–186  ·  view source on GitHub ↗
(service string, session *session.Session, members []*clusterpb.MemberInfo)

Source from the content-addressed store, hash-verified

179}
180
181func customerRemoteServiceRoute(service string, session *session.Session, members []*clusterpb.MemberInfo) *clusterpb.MemberInfo {
182 count := int64(len(members))
183 var index = session.UID() % count
184 fmt.Printf("remote service:%s route to :%v \n", service, members[index])
185 return members[index]
186}

Callers

nothing calls this directly

Calls 1

UIDMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…