Documentation ¶
Overview ¶
Package process is the low-level abstraction for a Tor instance.
The standard use is to create a Creator with NewCreator and the path to the Tor executable. The child package 'embedded' can be used if Tor is statically linked in the binary. Most developers will prefer the tor package adjacent to this one for a higher level abstraction over the process and control port connection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ControlPortFromFileContents ¶
ControlPortFromFileContents reads a control port file that is written by Tor when ControlPortWriteToFile is set.
Types ¶
type Creator ¶
Creator is the interface for process creation.
func NewCreator ¶
NewCreator creates a Creator for external Tor process execution based on the given exe path.
type Process ¶
type Process interface { // Start starts the Tor process in the background and returns. It is // analagous to os/exec.Cmd.Start. Start() error // Wait waits for the Tor process to exit and returns error if it was not a // successful exit. It is analagous to os/exec.Cmd.Wait. Wait() error }
Process is the interface implemented by Tor processes.