Documentation
¶
Index ¶
- Variables
- func ValidateRuntimeConfig(config *Config) error
- func ValidateRuntimeConfigReload(current, candidate *Config) error
- type Config
- type ConnectionConfig
- type LogConfig
- type MachineConfig
- type NodesConfig
- type ObservabilityConfig
- type Panel
- func (p *Panel) Close() error
- func (p *Panel) CloseContext(parent context.Context) error
- func (p *Panel) IsRunning() bool
- func (p *Panel) ObservabilitySnapshot() service.RuntimeSnapshot
- func (p *Panel) ServerInstance() *core.Instance
- func (p *Panel) ServicesSnapshot() []service.Service
- func (p *Panel) Start() error
- func (p *Panel) StartContext(parent context.Context) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrStaticRuntimeConfigEmptyNodes = errors.New("static mode requires at least one Nodes entry") ErrRuntimeConfigModeConflict = errors.New("static Nodes and enabled MachineConfig are mutually exclusive") ErrRuntimeConfigModeChange = errors.New("online runtime mode change is not supported") )
View Source
var ErrRemotePanelRequiresHTTPS = errors.New("remote panel API host must use HTTPS")
Functions ¶
func ValidateRuntimeConfig ¶
Types ¶
type Config ¶
type Config struct {
LogConfig *LogConfig `mapstructure:"Log"`
DnsConfigPath string `mapstructure:"DnsConfigPath"`
InboundConfigPath string `mapstructure:"InboundConfigPath"`
OutboundConfigPath string `mapstructure:"OutboundConfigPath"`
RouteConfigPath string `mapstructure:"RouteConfigPath"`
ConnectionConfig *ConnectionConfig `mapstructure:"ConnectionConfig"`
Observability *ObservabilityConfig `mapstructure:"Observability"`
MachineConfig *MachineConfig `mapstructure:"MachineConfig"`
NodesConfig []*NodesConfig `mapstructure:"Nodes"`
}
func (*Config) ShowErrorDetails ¶
type ConnectionConfig ¶
type MachineConfig ¶
type MachineConfig struct {
Enable bool `mapstructure:"Enable"`
PanelType string `mapstructure:"PanelType"`
ApiHost string `mapstructure:"ApiHost"`
MachineID int `mapstructure:"MachineID"`
Token string `mapstructure:"Token"`
Timeout int `mapstructure:"Timeout"`
DiscoveryInterval int `mapstructure:"DiscoveryInterval"`
ControllerConfig *controller.Config `mapstructure:"ControllerConfig"`
}
type NodesConfig ¶
type NodesConfig struct {
PanelType string `mapstructure:"PanelType"`
ApiConfig *api.Config `mapstructure:"ApiConfig"`
ControllerConfig *controller.Config `mapstructure:"ControllerConfig"`
}
type ObservabilityConfig ¶
type Panel ¶
type Panel struct {
// Server is a compatibility projection of the currently owned core.
//
// Deprecated: Use ServerInstance. The returned core is borrowed; callers
// must not close it or assume ownership.
Server *core.Instance
// Service is a compatibility projection of the currently owned services.
//
// Deprecated: Use ServicesSnapshot, which returns a cloned slice.
Service []service.Service
// Running is a compatibility projection of the panel lifecycle.
//
// Deprecated: Use IsRunning.
Running bool
// contains filtered or unexported fields
}
Panel Structure
func (*Panel) ObservabilitySnapshot ¶
func (p *Panel) ObservabilitySnapshot() service.RuntimeSnapshot
func (*Panel) ServerInstance ¶
ServerInstance returns the core currently owned by the panel, if any. The returned core is borrowed; callers must not close it or assume ownership.
func (*Panel) ServicesSnapshot ¶
ServicesSnapshot returns a cloned slice of services currently owned by the panel. The service references are borrowed and must not be closed by callers.
Click to show internal directories.
Click to hide internal directories.