Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecvResponse ¶
RecvResponse reads a response object from the given reader
func SendResponse ¶
func SendResponse(o interface{}) error
SendResponse conveys to the caller a given response object o
Types ¶
type ErrCantConnect ¶
type ErrCantConnect struct {
// contains filtered or unexported fields
}
func (ErrCantConnect) Error ¶
func (e ErrCantConnect) Error() string
func (ErrCantConnect) Unwrap ¶
func (e ErrCantConnect) Unwrap() error
type MonitorClient ¶
type MonitorClient struct {
// contains filtered or unexported fields
}
func NewMonitorClient ¶
func NewMonitorClient(pid int) *MonitorClient
func (*MonitorClient) Kill ¶
func (m *MonitorClient) Kill() error
func (*MonitorClient) Poll ¶
func (m *MonitorClient) Poll() (*PollMessage, error)
func (*MonitorClient) Reap ¶
func (m *MonitorClient) Reap() error
type MonitorServer ¶
type MonitorServer struct {
// contains filtered or unexported fields
}
func NewMonitorServer ¶
func NewMonitorServer(mon *Monitor) *MonitorServer
func (*MonitorServer) Serve ¶
func (m *MonitorServer) Serve() error
func (*MonitorServer) Shutdown ¶
func (m *MonitorServer) Shutdown() error
type PollMessage ¶
type PollMessage struct { Stdout string `json:"stdout,omitempty"` Stderr string `json:"stderr,omitempty"` // ExitCode is non-nil when the controlled process exited ExitCode *int `json:"exitcode"` // Error is any error encountered while trying to reach the agent Error string `json:"error,omitempty"` }
type SafeBuffer ¶
type SafeBuffer struct {
// contains filtered or unexported fields
}
func (*SafeBuffer) Len ¶
func (sb *SafeBuffer) Len() int
type SafeExitCode ¶
type SafeExitCode struct {
// contains filtered or unexported fields
}
SafeExitCode is a sync storage for the exit code of a process the initial value of nil cannot be reset after the first set
func (*SafeExitCode) Load ¶
func (s *SafeExitCode) Load() *int
func (*SafeExitCode) Store ¶
func (s *SafeExitCode) Store(code int)
type SafeSignal ¶
SafeSignal is a goroutine safe signalling mechanism It can have multiple goroutines that trigger the signal without interfering with eachother (or crashing as using a channel would) Currently designed for a single waiter goroutine.
func (*SafeSignal) Signal ¶
func (s *SafeSignal) Signal()
func (*SafeSignal) Wait ¶
func (s *SafeSignal) Wait()
type StartMessage ¶
type StartMessage struct {
SessionID string `json:"sid"`
}
Click to show internal directories.
Click to hide internal directories.