Documentation ¶
Overview ¶
Package ptextras implements extra goodies useful for writing Tor Pluggable Transports that are not included in goptlib as of verson 0.0.6.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TermMonitor ¶
type TermMonitor struct {
// contains filtered or unexported fields
}
TermMonitor is a signal/termination monitor used to handle the shutdown management for Tor Pluggable Transports.
func NewTermMonitor ¶
func NewTermMonitor() (m *TermMonitor)
NewTermMonitor creates a new termination monitor instance.
func (*TermMonitor) OnHandlerFinish ¶
func (m *TermMonitor) OnHandlerFinish()
OnHandlerFinish is the routine that should be called when a handler finishes.
func (*TermMonitor) OnHandlerStart ¶
func (m *TermMonitor) OnHandlerStart()
OnHandlerStart is the routine that should be called when a handler starts.
func (*TermMonitor) Wait ¶
func (m *TermMonitor) Wait(termOnNoHandlers bool) os.Signal
Wait blocks until a signal has been received, or (optionally) the number of pending handlers has hit 0. In the case of the latter, it is treated as if a SIGTERM has been received.
Click to show internal directories.
Click to hide internal directories.