19 lines
303 B
Go
19 lines
303 B
Go
package service
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// 每个服务都有自己的服务topic
|
|
func Topic(s IService) string {
|
|
return fmt.Sprintf("%v-%v.topic", s.Type(), s.Name())
|
|
}
|
|
|
|
func GroupTopic(s IService) string {
|
|
return s.Type() + ".topic"
|
|
}
|
|
|
|
func GroupQueue(s IService) string {
|
|
return s.Type() + ".group"
|
|
}
|