func (registry streamRegistry) GetStreamName(streamID MessageStreamID) string {
	switch streamID {
	case LogInternalStreamID:
		return LogInternalStream
	case WildcardStreamID:
		return WildcardStream
	case InvalidStreamID:
		return InvalidStream
	case TraceInternalStreamID:
		return TraceInternalStream
	default:
		registry.nameGuard.RLock()
		name, exists := registry.name[streamID]
		registry.nameGuard.RUnlock()
		if exists {
			return name  
		}
	}
	return ""
}
GetStreamName does a reverse lookup for a given MessageStreamID and returns
the corresponding name. If the MessageStreamID is not registered, an empty
string is returned.
package core
import (
	"hash/fnv"
	"sync"
	"github.com/sirupsen/logrus"
)
var (
	GeneratedRouterPrefix = "_GENERATED_"
)
type streamRegistry struct {
	routers     map[MessageStreamID]Router
	name        map[MessageStreamID]string
	nameGuard   *sync.RWMutex
	streamGuard *sync.RWMutex
	wildcard    []Producer
}
var StreamRegistry = streamRegistry{
	routers:     make(map[MessageStreamID]Router),
	streamGuard: new(sync.RWMutex),
	name:        make(map[MessageStreamID]string),
	nameGuard:   new(sync.RWMutex),
}
func GetStreamID(stream string) MessageStreamID {
	return StreamRegistry.GetStreamID(stream)
}
func (streamID MessageStreamID) GetName() string {
	return StreamRegistry.GetStreamName(streamID)
}
func (registry *streamRegistry) GetStreamID(stream string) MessageStreamID {
	hash := fnv.New64a()
	hash.Write([]byte(stream))
	streamID := MessageStreamID(hash.Sum64())
	registry.nameGuard.Lock()
	registry.name[streamID] = stream
	registry.nameGuard.Unlock()
	return streamID
}