connet

package module
v0.0.0-...-8871cbf Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 24 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
}

func NewClient

func NewClient(opts ...ClientOption) (*Client, error)

func (*Client) Run

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

type ClientOption

type ClientOption func(cfg *clientConfig) error

func ClientControlAddress

func ClientControlAddress(address string) ClientOption

func ClientControlCAs

func ClientControlCAs(certFile string) ClientOption

func ClientDestination

func ClientDestination(name, addr string, route model.RouteOption) ClientOption

func ClientDirectAddress

func ClientDirectAddress(address string) ClientOption

func ClientLogger

func ClientLogger(logger *slog.Logger) ClientOption

func ClientSource

func ClientSource(name, addr string, route model.RouteOption) ClientOption

func ClientToken

func ClientToken(token string) ClientOption

type Server

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

func NewServer

func NewServer(opts ...ServerOption) (*Server, error)

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

type ServerOption

type ServerOption func(*serverConfig) error

func ServerClientTokens

func ServerClientTokens(tokens ...string) ServerOption

func ServerControlAddress

func ServerControlAddress(address string) ServerOption

func ServerControlCertificate

func ServerControlCertificate(certFile, keyFile string) ServerOption

func ServerLogger

func ServerLogger(logger *slog.Logger) ServerOption

func ServerRelayAddress

func ServerRelayAddress(address string) ServerOption

func ServerRelayHostname

func ServerRelayHostname(hostname string) ServerOption

func ServerStoreDir

func ServerStoreDir(dir string) ServerOption

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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