Documentation
¶
Index ¶
- func CertificateDir() string
- func ClientConfigFile() string
- func ConfigDir() string
- func ConfigFile() string
- func Save(cfg *Config, cfgFile string) error
- func Validate(cfg *Config) error
- type Config
- type ConfigOption
- type EnrollmentService
- type ManagementService
- type RateLimitConfig
- type ServiceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertificateDir ¶
func CertificateDir() string
func ClientConfigFile ¶
func ClientConfigFile() string
func ConfigFile ¶
func ConfigFile() string
Types ¶
type Config ¶
type Config struct {
Database *dbConfig `json:"database,omitempty"`
Service *svcConfig `json:"service,omitempty"`
KV *kvConfig `json:"kv,omitempty"`
Alertmanager *alertmanagerConfig `json:"alertmanager,omitempty"`
Auth *authConfig `json:"auth,omitempty"`
Prometheus *prometheusConfig `json:"prometheus,omitempty"`
CA *ca.Config `json:"ca,omitempty"`
Tracing *tracingConfig `json:"tracing,omitempty"`
GitOps *gitOpsConfig `json:"gitOps,omitempty"`
}
func LoadOrGenerate ¶
func NewDefault ¶
func NewDefault(opts ...ConfigOption) *Config
func NewFromFile ¶
type ConfigOption ¶ added in v0.8.1
type ConfigOption func(*Config)
func WithTracingEnabled ¶ added in v0.8.1
func WithTracingEnabled() ConfigOption
type EnrollmentService ¶ added in v0.6.0
type EnrollmentService struct {
client.Config
// EnrollmentUIEndpoint is the address of the device enrollment UI
EnrollmentUIEndpoint string `json:"enrollment-ui-endpoint,omitempty"`
}
func (*EnrollmentService) Equal ¶ added in v0.6.0
func (s *EnrollmentService) Equal(s2 *EnrollmentService) bool
type ManagementService ¶ added in v0.6.0
func (*ManagementService) Equal ¶ added in v0.6.0
func (s *ManagementService) Equal(s2 *ManagementService) bool
type RateLimitConfig ¶ added in v0.9.0
type RateLimitConfig struct {
Requests int `json:"requests,omitempty"` // max requests per window
Window util.Duration `json:"window,omitempty"` // e.g. "1m" for one minute
AuthRequests int `json:"authRequests,omitempty"` // max auth requests per window
AuthWindow util.Duration `json:"authWindow,omitempty"` // e.g. "1h" for one hour
// TrustedProxies specifies IP addresses/networks that are allowed to set proxy headers
// If empty, proxy headers are ignored for security (only direct connection IPs are used)
TrustedProxies []string `json:"trustedProxies,omitempty"`
}
type ServiceConfig ¶ added in v0.6.0
type ServiceConfig struct {
// EnrollmentService is the client configuration for connecting to the device enrollment server
EnrollmentService EnrollmentService `json:"enrollment-service,omitempty"`
// ManagementService is the client configuration for connecting to the device management server
ManagementService ManagementService `json:"management-service,omitempty"`
}
func NewServiceConfig ¶ added in v0.6.0
func NewServiceConfig() ServiceConfig
Click to show internal directories.
Click to hide internal directories.