diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-02-27 00:07:13 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-02-27 00:07:13 -0800 |
| commit | 555413d9fc4837302ef1c5b2b921b406c9de6777 (patch) | |
| tree | dfd0f67586df0320fd9a77288651475d2ccdcc6c /weed/server/queue_server.go | |
| parent | 430b5a49e2abd9e3751e8c5840a690541ddc66ca (diff) | |
| download | seaweedfs-555413d9fc4837302ef1c5b2b921b406c9de6777.tar.xz seaweedfs-555413d9fc4837302ef1c5b2b921b406c9de6777.zip | |
weed queue starts
Diffstat (limited to 'weed/server/queue_server.go')
| -rw-r--r-- | weed/server/queue_server.go | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/weed/server/queue_server.go b/weed/server/queue_server.go new file mode 100644 index 000000000..078c76a30 --- /dev/null +++ b/weed/server/queue_server.go @@ -0,0 +1,49 @@ +package weed_server + +import ( + "context" + + "google.golang.org/grpc" + + "github.com/chrislusf/seaweedfs/weed/pb/queue_pb" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/util" +) + +type QueueServerOption struct { + Filers []string + DefaultReplication string + MaxMB int + Port int +} + +type QueueServer struct { + option *QueueServerOption + grpcDialOption grpc.DialOption +} + +func (q *QueueServer) ConfigureTopic(context.Context, *queue_pb.ConfigureTopicRequest) (*queue_pb.ConfigureTopicResponse, error) { + panic("implement me") +} + +func (q *QueueServer) DeleteTopic(context.Context, *queue_pb.DeleteTopicRequest) (*queue_pb.DeleteTopicResponse, error) { + panic("implement me") +} + +func (q *QueueServer) StreamWrite(queue_pb.SeaweedQueue_StreamWriteServer) error { + panic("implement me") +} + +func (q *QueueServer) StreamRead(*queue_pb.ReadMessageRequest, queue_pb.SeaweedQueue_StreamReadServer) error { + panic("implement me") +} + +func NewQueueServer(option *QueueServerOption) (qs *QueueServer, err error) { + + qs = &QueueServer{ + option: option, + grpcDialOption: security.LoadClientTLS(util.GetViper(), "grpc.queue"), + } + + return qs, nil +} |
