client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendConfig

type BackendConfig struct {
	Host      string            `yaml:"host"`
	Port      uint32            `yaml:"port"`
	Subdomain string            `yaml:"subdomain"`
	Protocol  protocol.Protocol `yaml:"protocol"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client manages client connections to the server.

func New

func New(config *Config) (*Client, error)

New creates a new connection manager.

func (*Client) Start

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

Start starts the connection manager.

func (*Client) Stop

func (c *Client) Stop()

Stop gracefully stops the client.

type Config

type Config struct {
	ServerAddr string                    `yaml:"server_addr"`
	Backend    map[string]*BackendConfig `yaml:"backend"`
}

Config represents the configuration for the client. It contains the server address and a map of backend configurations. Each backend configuration includes the host, port, subdomain, and protocol. The server address is the address of the gunnel server.

func LoadConfig

func LoadConfig(configPath string) (*Config, error)

Jump to

Keyboard shortcuts

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