You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

commandServer.go 1.3 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. package main
  2. import (
  3. //"context"
  4. //"io"
  5. "fmt"
  6. //"path/filepath"
  7. //"sync"
  8. "encoding/json"
  9. "strconv"
  10. "rabbitmq"
  11. //agentcaller "proto"
  12. //"github.com/pborman/uuid"
  13. //"github.com/streadway/amqp"
  14. //"google.golang.org/grpc"
  15. )
  16. func CoorEcWrite(command rabbitmq.EcWriteCommand) {
  17. }
  18. func CoorEcWriteHash(command rabbitmq.WriteHashCommand) {
  19. }
  20. func CoorEcRead(command rabbitmq.EcReadCommand) {
  21. }
  22. func CoorRepWrite(command rabbitmq.RepWriteCommand) {
  23. fmt.Println(command.BucketName)
  24. //返回消息
  25. res:= rabbitmq.WriteRes{
  26. Ips: []string{"localhost","localhost","localhost"},
  27. }
  28. c2,_:=json.Marshal(res)
  29. queueName := "clientQueue"+strconv.Itoa(command.UserId)
  30. rabbit := rabbitmq.NewRabbitMQSimple(queueName)
  31. fmt.Println(string(c2))
  32. rabbit.PublishSimple(c2)
  33. rabbit.Destroy()
  34. }
  35. func CoorRepWriteHash(command rabbitmq.WriteHashCommand) {
  36. fmt.Println(command.BucketName)
  37. //返回消息
  38. res:= rabbitmq.WriteHashRes{
  39. MetaCode: 0,
  40. }
  41. c2,_:=json.Marshal(res)
  42. queueName := "clientQueue"+strconv.Itoa(command.UserId)
  43. rabbit := rabbitmq.NewRabbitMQSimple(queueName)
  44. fmt.Println(string(c2))
  45. rabbit.PublishSimple(c2)
  46. rabbit.Destroy()
  47. }
  48. func CoorRepRead(command rabbitmq.RepReadCommand) {
  49. }

本项目旨在将云际存储公共基础设施化,使个人及企业可低门槛使用高效的云际存储服务(安装开箱即用云际存储客户端即可,无需关注其他组件的部署),同时支持用户灵活便捷定制云际存储的功能细节。

Contributors (1)