grpc/ttnctx/context.go
func ServiceInfoFromMetadata(md metadata.MD) (serviceName, serviceVersion, netAddress string, err error) {
	serviceNameL, ok := md["service-name"]
	if ok && len(serviceNameL) > 0 {
		serviceName = serviceNameL[0]
	}
	serviceVersionL, ok := md["service-version"]
	if ok && len(serviceVersionL) > 0 {
		serviceVersion = serviceVersionL[0]
	}
	netAddressL, ok := md["net-address"]
	if ok && len(netAddressL) > 0 {
		netAddress = netAddressL[0]
	}
	return
}
func ServiceInfoFromMetadata(md metadata.MD) (serviceName, serviceVersion, netAddress string, err error) {
	serviceNameL, ok := md["service-name"]
	if ok && len(serviceNameL) > 0 {
		serviceName = serviceNameL[0]
	}
	serviceVersionL, ok := md["service-version"]
	if ok && len(serviceVersionL) > 0 {
		serviceVersion = serviceVersionL[0]
	}
	netAddressL, ok := md["net-address"]
	if ok && len(netAddressL) > 0 {
		netAddress = netAddressL[0]
	}
	return
}
// ServiceInfoFromMetadata gets the service information from the metadata or returns empty strings