client

package
v0.0.0-...-7851fa2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 42 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 {
	ClientConfig
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, cfg ClientConfig) (*Client, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) FormatAcme

func (c *Client) FormatAcme(resp *protocol.InstructionResponse, output io.Writer)

func (*Client) FormatList

func (c *Client) FormatList(hostnames []string, output io.Writer)

func (*Client) FormatValidate

func (c *Client) FormatValidate(hostname string, resp *protocol.ValidateResponse, output io.Writer)

func (*Client) GetAcmeInstruction

func (c *Client) GetAcmeInstruction(ctx context.Context, hostname string) (*protocol.InstructionResponse, error)

func (*Client) GetConnectedNodes

func (c *Client) GetConnectedNodes() []*protocol.Node

func (*Client) GetCurrentConfig

func (c *Client) GetCurrentConfig() *Config

func (*Client) GetRegisteredHostnames

func (c *Client) GetRegisteredHostnames(ctx context.Context) ([]string, error)

func (*Client) Initialize

func (c *Client) Initialize(ctx context.Context, syncTunnels bool) error

func (*Client) ListTunnels

func (*Client) RebuildTunnels

func (c *Client) RebuildTunnels(tunnels []Tunnel)

func (*Client) Register

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

func (*Client) ReleaseTunnel

func (c *Client) ReleaseTunnel(ctx context.Context, tunnel Tunnel) error

func (*Client) RequestAcmeValidation

func (c *Client) RequestAcmeValidation(ctx context.Context, hostname string) (*protocol.ValidateResponse, error)

func (*Client) Start

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

func (*Client) SyncConfigTunnels

func (c *Client) SyncConfigTunnels(ctx context.Context)

func (*Client) UnpublishTunnel

func (c *Client) UnpublishTunnel(ctx context.Context, tunnel Tunnel) error

func (*Client) UpdateApex

func (c *Client) UpdateApex(apex string)

type ClientConfig

type ClientConfig struct {
	Logger          *zap.Logger
	Configuration   *Config
	PKIClient       protocol.PKIService
	ServerTransport transport.Transport
	Recorder        rtt.Recorder
	ReloadSignal    <-chan os.Signal
	ServerListener  net.Listener
}

type Config

type Config struct {
	Version     int      `yaml:"version" json:"version"`
	Apex        string   `yaml:"apex" json:"apex"`
	Certificate string   `yaml:"certificate,omitempty" json:"certificate,omitempty"`
	PrivKey     string   `yaml:"privKey,omitempty" json:"privKey,omitempty"`
	Tunnels     []Tunnel `yaml:"tunnels,omitempty" json:"tunnels,omitempty"`
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(path string) (*Config, error)

type Tunnel

type Tunnel struct {
	Target   string `yaml:"target" json:"target"`
	Hostname string `yaml:"hostname,omitempty" json:"hostname,omitempty"`
	Insecure bool   `yaml:"insecure,omitempty" json:"insecure"`
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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