config

package
v1.8.0-beta.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

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 (c *Client) DialContext(ctx context.Context, network, addr string) (con net.Conn, err error)

func (*Client) DialTLSContext

func (c *Client) DialTLSContext(ctx context.Context, network, addr string) (net.Conn, error)

func (*Client) LocalAddr

func (c *Client) LocalAddr() string

func (*Client) ManagerIP

func (c *Client) ManagerIP() net.IP

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL