client

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 18 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"`
	AllowedPaths []string          `yaml:"allowed_paths"`
}

func (*BackendConfig) IsPathAllowed added in v0.0.2

func (b *BackendConfig) IsPathAllowed(path string) bool

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"`
}

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