Documentation ¶
Overview ¶
Contains the ZeroMQ server loop. Deals with incoming requests and delegates them to the event store. Also publishes newly stored events using a PUB socket.
See README file for an up-to-date documentation of the ZeroMQ wire format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InitParams ¶
type InitParams struct { // The event store to use as backend. Store *eventstore.EventStore // The ZeroMQ path that the command receiving socket will bind // to. CommandSocketZPath *string // The ZeroMQ path that the event publishing socket will bind // to. EvPubSocketZPath *string // ZeroMQ context to use. While the context potentially could be // instantiated by Server, it is not. Otherwise, it wuold be // impossible to use inproc:// endpoints. ZMQContext *zmq.Context }
StartParams are parameters required for starting the server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
A server instance. Can be run.
func New ¶
func New(params *InitParams) (*Server, error)
Initialize a new event store server and return a handle to it. The event store is not started. It's up to the caller to execute Run() on the server handle.
func (*Server) Start ¶
Runs the server that distributes requests to workers. Panics on error since it is an essential piece of code required to run the application correctly.