Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrTorNotStarted returns if Tor service is not started ErrTorNotStarted = errors.New("error: Tor not started") // ErrTorAlreadyStarted returns if we have already establish the Tor connection ErrTorAlreadyStarted = errors.New("error: Tor already started") // ErrOnionServiceAlreadyStarted returns if the onion service is already started ErrOnionServiceAlreadyStarted = errors.New("error: Onion service already started") // ErrOnionServiceNotStarted returns if we try to run server without starting onion service ErrOnionServiceNotStarted = errors.New("error: Onion service not started") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents an RPC Client. There may be multiple outstanding Calls associated with a single Client, and a Client may be used by multiple goroutines simultaneously.
func NewClient ¶
NewClient returns a new Client to handle requests to the set of services at the other end of the Tor connection.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents an RPC Server on Tor.
func (*Server) Register ¶
Register publishes in the server the set of methods of the receiver value that satisfy the following conditions:
- exported method of exported type
- two arguments, both of exported type
- the second argument is a pointer
- one return value, of type error
It returns an error if the receiver is not an exported type or has no suitable methods. The client accesses each method using a string of the form "Type.Method", where Type is the receiver's concrete type.
func (*Server) RegisterName ¶
RegisterName is like Register but uses the provided name for the type instead of the receiver's concrete type.
func (*Server) Run ¶
Run runs the server by establishing tor connection After connection to Tor is establish, it listens for incoming connection