Documentation
¶
Index ¶
- type Client
- func (c *Client) DialContext(ctx context.Context, network, addr string) (con net.Conn, err error)
- func (c *Client) DialTLSContext(ctx context.Context, network, addr string) (net.Conn, error)
- func (c *Client) LocalAddr() string
- func (c *Client) ManagerIP() net.IP
- func (c *Client) Transport() http.RoundTripper
- type Forwarder
- type ForwarderLogging
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Proto string `json:"proto" toml:"proto" comment:"Protocol to use to connect to manager (http or https)"`
Host string `json:"host" toml:"host" comment:"Hostname or IP of the manager"`
Port int `json:"port" toml:"port" comment:"Port at which endpoint API is running on manager server"`
UUID string `json:"endpoint-uuid" toml:"endpoint-uuid" comment:"Endpoint UUID configured on manager used to authenticate this endpoint"`
Key string `json:"endpoint-key" toml:"endpoint-key" comment:"Endpoint key configured on manager used to authenticate this endpoint"`
ServerKey string `` /* 221-byte string literal not displayed */
ServerFingerprint string `` /* 148-byte string literal not displayed */
Unsafe bool `json:"unsafe" toml:"unsafe" comment:"Allow unsafe HTTPS connection"`
MaxUploadSize int64 `json:"max-upload-size" toml:"max-upload-size" comment:"Maximum allowed upload size"`
// contains filtered or unexported fields
}
Client structure definition
func (*Client) DialContext ¶
func (*Client) DialTLSContext ¶
func (*Client) ManagerIP ¶
ManagerIP returns the IP address of the manager if any, returns nil otherwise
func (*Client) Transport ¶
func (c *Client) Transport() http.RoundTripper
Transport creates an approriate HTTP transport from a configuration Cert pinning inspired by: https://medium.com/@zmanian/server-public-key-pinning-in-go-7a57bbe39438
type Forwarder ¶
type Forwarder struct {
Local bool `` /* 140-byte string literal not displayed */
Client Client `json:"manager" toml:"manager" comment:"Configure connection to the manager"`
Logging ForwarderLogging `json:"logging" toml:"logging" comment:"Forwarder's logging configuration"`
}
Forwarder config structure definition
type ForwarderLogging ¶
type ForwarderLogging struct {
Dir string `json:"dir" toml:"dir" comment:"Directory used to store logs"`
RotationInterval time.Duration `json:"rotation-interval" toml:"rotation-interval" comment:"Logfile rotation interval"`
}
ForwarderLogging structure to encode Logging configuration of the forwarder
Click to show internal directories.
Click to hide internal directories.