models

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_ADMIN_ADDRESS = "0.0.0.0"
View Source
const DEFAULT_ADMIN_PASSWORD = "frpc-password"
View Source
const DEFAULT_ADMIN_PORT = 7400
View Source
const DEFAULT_ADMIN_USERNAME = "frpc-user"

Variables

This section is empty.

Functions

This section is empty.

Types

type Common

type Common struct {
	ServerAddress        string
	ServerPort           int
	ServerAuthentication ServerAuthentication
	AdminAddress         string
	AdminPort            int
	AdminUsername        string
	AdminPassword        string
}

type Config

type Config struct {
	Common    Common
	Upstreams []Upstream
}

func NewConfig

func NewConfig(k8sclient client.Client, clientObject *frpv1alpha1.Client, upstreamObjects []frpv1alpha1.Upstream) (Config, error)

type ServerAuthentication

type ServerAuthentication struct {
	Type  ServerAuthenticationType
	Token string
}

type ServerAuthenticationType

type ServerAuthenticationType int64
const (
	Token ServerAuthenticationType = iota
)

type Upstream

type Upstream struct {
	Name string
	Type UpstreamType
	TCP  Upstream_TCP
	UDP  Upstream_UDP
}

type UpstreamType

type UpstreamType int64
const (
	TCP UpstreamType = iota
	UDP UpstreamType = iota
)

type Upstream_TCP

type Upstream_TCP struct {
	Host          string
	Port          int
	ServerPort    int
	ProxyProtocol *string
	HealthCheck   *Upstream_TCP_HealthCheck
}

type Upstream_TCP_HealthCheck added in v0.3.0

type Upstream_TCP_HealthCheck struct {
	TimeoutSeconds  int
	MaxFailed       int
	IntervalSeconds int
}

type Upstream_UDP added in v0.3.0

type Upstream_UDP struct {
	Host       string
	Port       int
	ServerPort int
}

Jump to

Keyboard shortcuts

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