Documentation ¶
Overview ¶
Package ipc provides a way for a process to communicate with a daemon, using a unix domain socket.
Index ¶
Constants ¶
View Source
const (
StopCommand = "stop"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UnixSocket ¶
type UnixSocket struct { IsServer bool IsActive bool IsListening bool Incoming chan []byte Outgoing chan []byte ServerUp chan struct{} ClientConnected chan struct{} ClientDisconnected chan struct{} sync.RWMutex // contains filtered or unexported fields }
UnixSocket is a standalone struct to handle communication between processes, using a unix domain socket.
func NewUnixSocket ¶
func NewUnixSocket(socketFile string, server bool) *UnixSocket
func NewUnixSocketClient ¶
func NewUnixSocketClient(socketFile string) *UnixSocket
func NewUnixSocketServer ¶
func NewUnixSocketServer(socketFile string) *UnixSocket
func (*UnixSocket) RunClient ¶
func (dc *UnixSocket) RunClient() error
func (*UnixSocket) RunServer ¶
func (dc *UnixSocket) RunServer() error
func (*UnixSocket) StopCurrent ¶
func (dc *UnixSocket) StopCurrent()
Click to show internal directories.
Click to hide internal directories.