etcd_path.go 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package comp
  2. import (
  3. "fmt"
  4. pb "git.wanbits.io/joe/franklin/protos"
  5. )
  6. /// see docs/ConfManagement.md
  7. var (
  8. PathRedis = func(c *pb.AppConf) string {
  9. return fmt.Sprintf("%s/conf/servers/redis", c.Namespace)
  10. }
  11. PathMq = func(c *pb.AppConf) string {
  12. return fmt.Sprintf("%s/conf/servers/mq", c.Namespace)
  13. }
  14. PathEvBus = func(c *pb.AppConf) string {
  15. return fmt.Sprintf("%s/conf/servers/evbus", c.Namespace)
  16. }
  17. PathLogin = func(c *pb.AppConf) string {
  18. return fmt.Sprintf("%s/conf/servers/login", c.Namespace)
  19. }
  20. PathKv = func(c *pb.AppConf) string {
  21. return fmt.Sprintf("%s/conf/servers/kv", c.Namespace)
  22. }
  23. PathLobbies = func(c *pb.AppConf) string {
  24. return fmt.Sprintf("%s/app/lobbies", c.Namespace)
  25. }
  26. PathAgents = func(c *pb.AppConf) string {
  27. return fmt.Sprintf("%s/app/agents", c.Namespace)
  28. }
  29. PathLogics = func(c *pb.AppConf) string {
  30. return fmt.Sprintf("%s/app/logics", c.Namespace)
  31. }
  32. PathManagers = func(c *pb.AppConf) string {
  33. return fmt.Sprintf("%s/app/managers", c.Namespace)
  34. }
  35. )