Documentation ¶
Index ¶
- type IPCClient
- func (c *IPCClient) AwaitResponse() error
- func (c *IPCClient) ClientListen() ipc.IPCResponse
- func (c *IPCClient) Close()
- func (c *IPCClient) Connect() error
- func (c *IPCClient) CreateGenericReq(message interface{}, t ipc.MsgType, dataType ipc.DataType) *ipc.IPCRequest
- func (c *IPCClient) CreateReq(message string, t ipc.MsgType, dataType ipc.DataType) *ipc.IPCRequest
- func (c *IPCClient) SendIPCMessage(msg *ipc.IPCRequest, then ...func() error) error
- func (c *IPCClient) SetDescf(desc string, args ...interface{})
- func (c *IPCClient) SetSocket(socketPath string) error
- func (c *IPCClient) Stringify() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPCClient ¶
type IPCClient struct { Name string // Name of the module Desc string // Description of the module Identifier [4]byte // Identifier of the module Sock string // Path to the UNIX domain socket // contains filtered or unexported fields }
func NewIPCClient ¶
NewIPCClient creates a new IPC client and returns it. The name is the name of the module, and the socketPath is the path to the UNIX domain socket.
func (*IPCClient) AwaitResponse ¶
func (*IPCClient) ClientListen ¶
func (c *IPCClient) ClientListen() ipc.IPCResponse
ClientListen listens for a message from the server and returns the data. GenericData is a generic map for data (map[string]interface{}). It can be used to store any data type.
func (*IPCClient) Connect ¶
Connect to the IPC server (UNIX domain socket) Parameter is the name of the module And identifier is the identifier of the server
func (*IPCClient) CreateGenericReq ¶
func (*IPCClient) SendIPCMessage ¶
func (c *IPCClient) SendIPCMessage(msg *ipc.IPCRequest, then ...func() error) error
SendIPCMessage sends an IPC message to the server.
Click to show internal directories.
Click to hide internal directories.