Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServiceIO ¶
Types ¶
type Config ¶
type Config struct { // Role specifies if this node will serve the role of a seed // or normal node. Seed is responsible for distributing // the data about new nodes in the cluster. Role NodeRole // Addr specifies the interface on which the service // and application listeners will be ran Addr string // ServicePort defines the port on which the service protocol // will send and receive messages ServicePort string // ApplicationPort defines the port on which the application // protocol listener will be ran ApplicationPort string // SeedsAddr defines a list of seeds addresses with their // service ports defined. There should be two or more // seed nodes in the cluster. SeedsAddr []string // LoggerFactory specifies the logger factory used to // instantiate loggers in the node and it's internal // components LogerFactory event.LoggerFactory }
Config is a single node configuration
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents a single node in the event system cluster
func NewNode ¶
func NewNode(config Config, handlers *event.AppHandlers) (*Node, error)
Creates a new node A node represents a single node in the event system cluster. To launch the system you have to activate the node using the Run function.
func (*Node) Handle ¶
Handle puts the event into the AppHandlers event source. This method blocks the execution but only until there is space in the event buffer. It does not block until the handler is executed.
Click to show internal directories.
Click to hide internal directories.