Documentation
¶
Index ¶
Constants ¶
View Source
const (
DefaultClusterName = "default"
)
Variables ¶
View Source
var (
ErrNamespaceNotFound = errors.New("namespace not found")
)
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
Addr string `yaml:"addr,omitempty" toml:"addr,omitempty" json:"addr,omitempty"`
EnableBasicAuth bool `yaml:"enable-basic-auth,omitempty" toml:"enable-basic-auth,omitempty" json:"enable-basic-auth,omitempty"`
User string `yaml:"user,omitempty" toml:"user,omitempty" json:"user,omitempty"`
Password string `yaml:"password,omitempty" toml:"password,omitempty" json:"password,omitempty"`
}
type Advance ¶
type Advance struct {
PeerPort string `yaml:"peer-port,omitempty" toml:"peer-port,omitempty" json:"peer-port,omitempty"`
IgnoreWrongNamespace bool `yaml:"ignore-wrong-namespace,omitempty" toml:"ignore-wrong-namespace,omitempty" json:"ignore-wrong-namespace,omitempty"`
WatchInterval string `yaml:"watch-interval,omitempty" toml:"watch-interval,omitempty" json:"watch-interval,omitempty"`
}
type BackendNamespace ¶
type Config ¶
type Config struct {
Workdir string `yaml:"workdir,omitempty" toml:"workdir,omitempty" json:"workdir,omitempty"`
Proxy ProxyServer `yaml:"proxy,omitempty" toml:"proxy,omitempty" json:"proxy,omitempty"`
API API `yaml:"api,omitempty" toml:"api,omitempty" json:"api,omitempty"`
Metrics Metrics `yaml:"metrics,omitempty" toml:"metrics,omitempty" json:"metrics,omitempty"`
Log Log `yaml:"log,omitempty" toml:"log,omitempty" json:"log,omitempty"`
Security Security `yaml:"security,omitempty" toml:"security,omitempty" json:"security,omitempty"`
Advance Advance `yaml:"advance,omitempty" toml:"advance,omitempty" json:"advance,omitempty"`
}
type FrontendNamespace ¶
type FrontendNamespace struct {
Security TLSCert `yaml:"security" json:"security" toml:"security"`
}
type LogFile ¶
type LogFile struct {
Filename string `yaml:"filename,omitempty" toml:"filename,omitempty" json:"filename,omitempty"`
MaxSize int `yaml:"max-size,omitempty" toml:"max-size,omitempty" json:"max-size,omitempty"`
MaxDays int `yaml:"max-days,omitempty" toml:"max-days,omitempty" json:"max-days,omitempty"`
MaxBackups int `yaml:"max-backups,omitempty" toml:"max-backups,omitempty" json:"max-backups,omitempty"`
}
type Metrics ¶
type Metrics struct {
PromCluster string `yaml:"prom-cluster,omitempty" toml:"prom-cluster,omitempty" json:"prom-cluster,omitempty"`
}
type Namespace ¶
type Namespace struct {
Namespace string `yaml:"namespace" json:"namespace" toml:"namespace"`
Frontend FrontendNamespace `yaml:"frontend" json:"frontend" toml:"frontend"`
Backend BackendNamespace `yaml:"backend" json:"backend" toml:"backend"`
}
type NamespaceDir ¶
type NamespaceDir struct {
// contains filtered or unexported fields
}
NamespaceDir is used by weirctl to import namespaces from a directory.
func NewNamespacesFromDir ¶
func NewNamespacesFromDir(nsdir string) (*NamespaceDir, error)
func (*NamespaceDir) GetNamespace ¶
func (f *NamespaceDir) GetNamespace(ns string) (*Namespace, error)
func (*NamespaceDir) ListAllNamespace ¶
func (f *NamespaceDir) ListAllNamespace() ([]*Namespace, error)
type ProxyServer ¶
type ProxyServer struct {
ProxyServerOnline
Addr string `yaml:"addr,omitempty" toml:"addr,omitempty" json:"addr,omitempty"`
PDAddrs string `yaml:"pd-addrs,omitempty" toml:"pd-addrs,omitempty" json:"pd-addrs,omitempty"`
ProxyProtocol string `yaml:"proxy-protocol,omitempty" toml:"proxy-protocol,omitempty" json:"proxy-protocol,omitempty"`
}
type ProxyServerOnline ¶
type Security ¶
type Security struct {
RSAKeySize int `yaml:"rsa-key-size,omitempty" toml:"rsa-key-size,omitempty" json:"rsa-key-size,omitempty"`
Server TLSCert `yaml:"server,omitempty" toml:"server,omitempty" json:"server,omitempty"`
Cluster TLSCert `yaml:"cluster,omitempty" toml:"cluster,omitempty" json:"cluster,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.