Documentation ¶
Overview ¶
Package ipc contains the logic to manage the Inter-Process Communication (IPC) between the gateway replicas.
Index ¶
- func CloseAllGuestsConnections(guestsConnections GuestConnections)
- func CloseListenSocket(socket net.Listener)
- func Connect(path, id string) (net.Conn, error)
- func CreateListenSocket(path string) (net.Listener, error)
- func ForgeStartMessage(id string) string
- func StartAllGuestsConnections(guestsConnections GuestConnections) error
- func WaitAllGuestsConnections(guestsConnections GuestConnections, socket net.Listener) error
- func WaitForStart(id string, conn net.Conn) error
- type GuestConnections
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseAllGuestsConnections ¶
func CloseAllGuestsConnections(guestsConnections GuestConnections)
CloseAllGuestsConnections closes all connections in the guestsConnections map.
func CloseListenSocket ¶
CloseListenSocket closes the listen socket.
func CreateListenSocket ¶
CreateListenSocket creates a Unix domain socket and listens for incoming connections.
func ForgeStartMessage ¶
ForgeStartMessage creates a start message.
func StartAllGuestsConnections ¶
func StartAllGuestsConnections(guestsConnections GuestConnections) error
StartAllGuestsConnections sends a start message to all connections in the guestsConnections map.
func WaitAllGuestsConnections ¶
func WaitAllGuestsConnections(guestsConnections GuestConnections, socket net.Listener) error
WaitAllGuestsConnections waits for all guests to connect to the socket.
Types ¶
type GuestConnections ¶
GuestConnections is a map of guest IDs to connections.
func NewGuestConnections ¶
func NewGuestConnections(guests []string) GuestConnections
NewGuestConnections creates a new GuestConnections map from string slice.