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

29 lines
690 B

  1. package agent
  2. import (
  3. "github.com/seaweedfs/seaweedfs/weed/pb"
  4. "github.com/seaweedfs/seaweedfs/weed/pb/mq_pb"
  5. "google.golang.org/grpc"
  6. )
  7. type MessageQueueAgentOptions struct {
  8. SeedBrokers []pb.ServerAddress
  9. }
  10. type MessageQueueAgent struct {
  11. mq_pb.UnimplementedSeaweedMessagingServer
  12. option *MessageQueueAgentOptions
  13. brokers []pb.ServerAddress
  14. grpcDialOption grpc.DialOption
  15. }
  16. func NewMessageQueueAgent(option *MessageQueueAgentOptions, grpcDialOption grpc.DialOption) *MessageQueueAgent {
  17. // check masters to list all brokers
  18. return &MessageQueueAgent{
  19. option: option,
  20. brokers: []pb.ServerAddress{},
  21. grpcDialOption: grpcDialOption,
  22. }
  23. }