Discover Packages
github.com/mxk/oktapus
daemon
package
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Jan 25, 2019
License: BSD-3-Clause
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Rendered for
linux/amd64
windows/amd64
darwin/amd64
js/wasm
DefaultAddr is the default daemon listening address.
IsNotRunning returns true if err indicates that the daemon is not running.
Addr is the daemon network address. The zero value implies DefaultAddr.
Kill terminates the daemon.
func (d Addr ) Send(msg interface{}) (interface{}, error )
Send sends a message to the daemon and returns the response. The message and
response data types must be gob-registered.
Serve returns the channel on which the daemon will send incoming messages.
Address is updated to reflect the actual listening socket address.
Start starts the daemon process. Address is updated to reflect the actual
listening socket address.
type Request struct {
net .Conn
Msg interface{}
Rch chan<- interface{}
}
Request contains the client connection, the received message, and the
response channel. The handler must either send a response via Rch or close
it without sending anything, which will close the network connection.
StartFunc should call c.Start() to start the daemon process after making any
adjustments to the command parameters.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.