Documentation
¶
Index ¶
- func ParseKillSession(input string) (string, error)
- func ParsePid(input string) (int64, error)
- func ParseSignal(input string) error
- func ReadResponse(reader *bufio.Reader) (string, error)
- func SendCommand(conn net.Conn, cmd string) error
- type Client
- func (c *Client) Execute(cmd string) (string, error)
- func (c *Client) GetLoadStats() (*LoadStats, error)
- func (c *Client) GetPid() (int64, error)
- func (c *Client) GetStatus() (*Status, error)
- func (c *Client) GetVersion() (*Version, error)
- func (c *Client) KillSession(cname string) (string, error)
- func (c *Client) Signal(signal string) error
- type LoadStats
- type OVClient
- type RoutingPath
- type Status
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseKillSession ¶
ParseKillSession gets kill command result from string
func ParseSignal ¶
ParseSignal checks for error in response string
Types ¶
type Client ¶
Client is used to connect to OpenVPN Management Interface
func (*Client) GetLoadStats ¶
GetLoadStats returns number of connected clients and total number of network traffic
func (*Client) GetVersion ¶
GetVersion returns version of OpenVPN server
func (*Client) KillSession ¶
KillSession kills OpenVPN connection
type OVClient ¶
type OVClient struct { CommonName string RealAddress string VirtualAddress string BytesReceived uint64 BytesSent uint64 ConnectedSince string ConnectedSinceT string Username string }
OVClient .
type RoutingPath ¶
type RoutingPath struct { VirtualAddress string CommonName string RealAddress string LastRef string LastRefT string }
RoutingPath .
type Status ¶
type Status struct { Title string Time string TimeT string ClientList []*OVClient RoutingTable []*RoutingPath }
Status .
func ParseStatus ¶
ParseStatus gets status information from string
Click to show internal directories.
Click to hide internal directories.