config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationBasic added in v0.1.3

type AuthenticationBasic struct {
	Scheme   string `json:"scheme,omitempty" yaml:"scheme,omitempty"`
	Username string `json:"username,omitempty" yaml:"username,omitempty"`
	Password string `json:"password,omitempty" yaml:"password,omitempty"`
}

func (*AuthenticationBasic) Validate added in v0.1.3

func (a *AuthenticationBasic) Validate() error

type AuthenticationBearer added in v0.1.3

type AuthenticationBearer struct {
	Scheme          string `json:"scheme,omitempty" yaml:"scheme,omitempty"`
	Token           string `json:"token,omitempty" yaml:"token,omitempty"`
	TokenPath       string `json:"tokenPath,omitempty" yaml:"tokenPath,omitempty"`
	HashedToken     string `json:"hashedToken,omitempty" yaml:"hashedToken,omitempty"`
	HashedTokenPath string `json:"hashedTokenPath,omitempty" yaml:"hashedTokenPath,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthenticationBearer) Validate added in v0.1.3

func (a *AuthenticationBearer) Validate() error

type AuthenticationExternal added in v0.1.3

type AuthenticationExternal struct {
	Scheme   string `json:"scheme,omitempty" yaml:"scheme,omitempty"`
	Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
}

func (*AuthenticationExternal) Validate added in v0.1.3

func (a *AuthenticationExternal) Validate() error

type Config

type Config struct {
	Level             Level  `` /* 129-byte string literal not displayed */
	TunnelAddress     string `` /* 129-byte string literal not displayed */
	HTTPAddress       string `` /* 129-byte string literal not displayed */
	ServerName        string `` /* 129-byte string literal not displayed */
	PrivateKeyPath    string `` /* 129-byte string literal not displayed */
	CertificatePath   string `` /* 129-byte string literal not displayed */
	TunnelGroups      string `` /* 129-byte string literal not displayed */
	WatchTunnelGroups bool   `ff:" short=w | long=watch-groups     | default=false            | usage: watch tunnel groups sources for updates "`

	// ManagementAddress is where reverst hosts introspective APIs for telemetry and debugging etc.
	ManagementAddress string `ff:" long=management-address | usage: HTTP address for management API "`

	MaxIdleTimeout  time.Duration `ff:" long=max-idle-timeout  | default=1m  | usage: maximum time a connection can be idle "`
	KeepAlivePeriod time.Duration `ff:" long=keep-alive-period | default=30s | usage: period between keep-alive events      "`
}

func (*Config) SubscribeTunnelGroups added in v0.1.4

func (c *Config) SubscribeTunnelGroups(ctx context.Context, ch chan<- *TunnelGroups) error

func (Config) Validate

func (c Config) Validate() error

type Level

type Level slog.Level

func (*Level) Set

func (l *Level) Set(v string) error

func (Level) String

func (l Level) String() string

type TunnelGroup

type TunnelGroup struct {
	Hosts          []string `json:"hosts,omitempty" yaml:"hosts,omitempty"`
	Authentication struct {
		Basic    *AuthenticationBasic    `json:"basic,omitempty" yaml:"basic,omitempty"`
		Bearer   *AuthenticationBearer   `json:"bearer,omitempty" yaml:"bearer,omitempty"`
		External *AuthenticationExternal `json:"external,omitempty" yaml:"external,omitempty"`
	} `json:"authentication,omitempty" yaml:"authentication,omitempty"`
}

TunnelGroup is an instance of a tunnel group which identifies the hostnames served by the instances in the group.

func (TunnelGroup) Validate

func (g TunnelGroup) Validate() error

type TunnelGroups

type TunnelGroups struct {
	Groups map[string]TunnelGroup `json:"groups,omitempty" yaml:"groups,omitempty"`
}

TunnelGroups is a configuration file format for defining the tunnel groups served by an instance of then reverst tunnel server.

func (TunnelGroups) AuthenticationHandler

func (g TunnelGroups) AuthenticationHandler() protocol.AuthenticationHandler

func (TunnelGroups) Validate

func (g TunnelGroups) Validate() error

Jump to

Keyboard shortcuts

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