agent

package
v0.0.0-...-75a7fc5 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MIT Imports: 26 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 {
	// contains filtered or unexported fields
}

Client represents a client instance

func NewClient

func NewClient(c *Config) (*Client, error)

NewClient creates a new client instance

func (*Client) Close

func (c *Client) Close() error

Close manually stops the client

func (*Client) Run

func (c *Client) Run() error

Run starts client and blocks while connected

func (*Client) Start

func (c *Client) Start(ctx context.Context) error

Start client and does not block

func (*Client) Wait

func (c *Client) Wait() error

Wait blocks while the client is running.

type Config

type Config struct {
	Fingerprint      string
	Auth             string
	KeepAlive        time.Duration
	MaxRetryCount    int
	MaxRetryInterval time.Duration
	Server           string
	Proxy            string
	Remotes          []string
	Headers          http.Header
	TLS              TLSConfig
	DialContext      func(ctx context.Context, network, addr string) (net.Conn, error)
	Verbose          bool
}

Config represents a client configuration

type TLSConfig

type TLSConfig struct {
	SkipVerify bool
	CA         string
	Cert       string
	Key        string
	ServerName string
}

TLSConfig for a Client

Jump to

Keyboard shortcuts

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