chclient

package
v1.11.5 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 27 Imported by: 37 modules, 30 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*cio.Logger
	// 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 added in v1.7.0

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