Documentation ¶
Overview ¶
Package network implements a Transport that works over a socket.
Index ¶
- type Config
- type Transport
- func (t *Transport) GetHumanStatus() string
- func (t *Transport) GetStatus() util.TransportStatus
- func (t *Transport) IsRunning() bool
- func (t *Transport) Run(start chan struct{}) (retcode int, ret string, _ error)
- func (t *Transport) Stderr() <-chan []byte
- func (t *Transport) Stdout() <-chan []byte
- func (t *Transport) StopOrKill() error
- func (t *Transport) StopOrKillTimeout(duration time.Duration) error
- func (t *Transport) StopOrKillWaitgroup(group *sync.WaitGroup)
- func (t *Transport) Update(confHolder tomlconf.ConfigHolder) error
- func (t *Transport) Write(p []byte) (n int, err error)
- func (t *Transport) WriteString(s string) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { util.BaseConfig Name xml.Name `xml:"config"` Address string `xml:"address"` StartLocal bool `xml:"start_local"` IsUnix bool `xml:"is_unix,attr"` TLS bool `xml:"tls,attr"` }
Config is a config for a networkTransport
type Transport ¶
type Transport struct { *Config // contains filtered or unexported fields }
Transport is an implementation of the transport interface that is designed to be used over the network
func (*Transport) GetHumanStatus ¶
GetHumanStatus returns the status of the transport that is human readable
func (*Transport) GetStatus ¶
func (t *Transport) GetStatus() util.TransportStatus
GetStatus returns the current state of the transport
func (*Transport) IsRunning ¶
IsRunning returns whether or not the underlying process is currently running. For more information use GetStatus.
func (*Transport) Run ¶
Run runs the underlying process on the Transport. It returns the return code of the process (or -1 if start failed) a string representation of the exit, if applicable, and an error. error should be checked first as the string may not be filled for some errors.
func (*Transport) Stderr ¶
Stderr returns a channel that will have lines from stdout sent over it. multiple calls are not supported.
func (*Transport) Stdout ¶
Stdout returns a channel that will have lines from stdout sent over it. multiple calls are not supported.
func (*Transport) StopOrKill ¶
StopOrKill implements StopOrKiller
func (*Transport) StopOrKillTimeout ¶
StopOrKillTimeout implements StopOrKiller
func (*Transport) StopOrKillWaitgroup ¶
StopOrKillWaitgroup implements StopOrKiller
Directories ¶
Path | Synopsis |
---|---|
Prog is the clientside component of networkTransport.
|
Prog is the clientside component of networkTransport. |
Package protocol holds structs and other constructs that are used by the network transport for cross-network RPC calls
|
Package protocol holds structs and other constructs that are used by the network transport for cross-network RPC calls |