Documentation ¶
Index ¶
- type IServices
- type RunningServices
- type Server
- type Services
- func (s *Services) ConnectToServer(addr string) (net.Conn, error)
- func (s *Services) GetRunningServices() RunningServices
- func (s *Services) GetServiceServers(remoteAddr string) []string
- func (s *Services) ServeServices(conoidHost, conoidPort string, connCh chan<- net.Conn)
- func (s *Services) ServeStatic(dir string, port int) (string, string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IServices ¶
type IServices interface { ServeServices(string, string, chan<- net.Conn) // Retrieve all Services and serve GetRunningServices() RunningServices // Get all running Services GetServiceServers(string) []string // Get all servers' address that a service runs on ConnectToServer(string) (net.Conn, error) // Connect to a service running locally ServeStatic(string, int) (string, string) // Serve static Services, and return their port numbers }
func InitServices ¶
func InitServices() IServices
type RunningServices ¶
A map to store running services, the key represents local server, and the value as the remote server's address
type Services ¶
type Services struct {
// contains filtered or unexported fields
}
func (*Services) ConnectToServer ¶
Connect to a service running locally
func (*Services) GetRunningServices ¶
func (s *Services) GetRunningServices() RunningServices
Get all running Services
func (*Services) GetServiceServers ¶
Get a service's port number using the remote address
func (*Services) ServeServices ¶
Retrieve all Services and serve
Click to show internal directories.
Click to hide internal directories.