Documentation ¶
Index ¶
- type ResponseModel
- type Server
- func (s *Server) Listen()
- func (s *Server) Publish(ctx context.Context, in *pb.PublishRequest) (*empty.Empty, error)
- func (s *Server) PublishREST(ctx *fasthttp.RequestCtx)
- func (s *Server) Queue(ctx context.Context, in *pb.QueueRequest) (*empty.Empty, error)
- func (s *Server) QueueREST(ctx *fasthttp.RequestCtx)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResponseModel ¶
type ResponseModel struct {
Message string `json:"message"`
}
ResponseModel is returned by our service when an error occurs.
type Server ¶
type Server struct { pb.UnimplementedJobDispatcherServiceServer pb.UnimplementedPublisherServiceServer // contains filtered or unexported fields }
Server contains all that is needed to respond to incoming requests, like a database. Other services like a mail
func NewServer ¶
func NewServer(messager messaging.Messager, wrapper messaging.Wrapper, exporter metrics.Exporter, mainAPI string) *Server
NewServer initializes the service with the given Database, and sets up appropriate routes.
func (*Server) PublishREST ¶
func (s *Server) PublishREST(ctx *fasthttp.RequestCtx)
PublishREST push message to subscribers.
func (*Server) QueueREST ¶
func (s *Server) QueueREST(ctx *fasthttp.RequestCtx)
QueueREST push message to workers.
Click to show internal directories.
Click to hide internal directories.