MCPcopy
hub / github.com/grpc/grpc-go / FromEndpoint

Function FromEndpoint

internal/hierarchy/hierarchy.go:52–55  ·  view source on GitHub ↗

FromEndpoint returns the hierarchical path of endpoint.

(endpoint resolver.Endpoint)

Source from the content-addressed store, hash-verified

50
51// FromEndpoint returns the hierarchical path of endpoint.
52func FromEndpoint(endpoint resolver.Endpoint) []string {
53 path, _ := endpoint.Attributes.Value(pathKey).(pathValue)
54 return path
55}
56
57// SetInEndpoint overrides the hierarchical path in endpoint with path.
58func SetInEndpoint(endpoint resolver.Endpoint, path []string) resolver.Endpoint {

Callers 3

TestFromEndpointFunction · 0.92
TestSetInEndpointFunction · 0.92
GroupFunction · 0.70

Calls 1

ValueMethod · 0.45

Tested by 2

TestFromEndpointFunction · 0.74
TestSetInEndpointFunction · 0.74