Documentation
¶
Index ¶
Constants ¶
View Source
const TokenEnvVar = "PHILHARMONIC_TOKEN"
the environment variable the client commands read the manager API bearer token from. overrides client.token/token_file from the config file if present
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientConfig ¶
type ClientConfig struct {
Manager *string `yaml:"manager"`
TLS *TLSFileConfig `yaml:"tls"`
Token *string `yaml:"token"`
TokenFile *string `yaml:"token_file"`
}
for cli's 'nodes', 'status', 'run', 'stop'
type Config ¶
type Config struct {
Manager *ManagerConfig `yaml:"manager"`
Worker *WorkerConfig `yaml:"worker"`
Node *NodeConfig `yaml:"node"`
Scheduler *SchedulerConfig `yaml:"scheduler"`
Task *TaskConfig `yaml:"task"`
Client *ClientConfig `yaml:"client"`
HTTP *HTTPConfig `yaml:"http"`
}
type HTTPConfig ¶
type ManagerAuthConfig ¶
type ManagerAuthConfig struct {
// TokenFile is a YAML file of bearer token records (user, role,
// token_hash). Empty/nil disables authentication.
TokenFile *string `yaml:"token_file"`
}
configures user authentication on the manager API
type ManagerConfig ¶
type ManagerConfig struct {
Host *string `yaml:"host"`
Port *int `yaml:"port"`
Workers []string `yaml:"workers"`
Scheduler *string `yaml:"scheduler"`
DBType *string `yaml:"dbtype"`
TLS *TLSFileConfig `yaml:"tls"`
Auth *ManagerAuthConfig `yaml:"auth"`
DbFile *string `yaml:"db_file"`
DbTaskBucket *string `yaml:"db_task_bucket"`
DbEventBucket *string `yaml:"db_event_bucket"`
MaxRestarts *int `yaml:"max_restarts"`
RestartBackoffBase *string `yaml:"restart_backoff_base"` // duration
RestartBackoffMax *string `yaml:"restart_backoff_max"` // duration
LoopInterval *string `yaml:"loop_interval"` // duration
ApiShutdownTimeout *string `yaml:"api_shutdown_timeout"` // duration
}
type NodeConfig ¶
type SchedulerConfig ¶
type TLSFileConfig ¶
type TLSFileConfig struct {
CertFile *string `yaml:"cert_file"`
KeyFile *string `yaml:"key_file"`
CAFile *string `yaml:"ca_file"`
ClientCAFile *string `yaml:"client_ca_file"`
}
the shared shape of the per-role "tls" config sections which fields are meaningful depends on the role:
manager: cert/key = manager API server identity (also presented to
workers when talking to them); ca_file = trust root for worker
certificates; client_ca_file = require client certs (mTLS) on
the manager API
worker: cert/key = worker API server identity; client_ca_file =
require client certs (mTLS), i.e. only certificate holders
(normally the manager) may reach the worker API
client: ca_file = trust root for the manager's (and workers')
certificates; cert/key = client certificate presented
to mTLS-protected servers
type TaskConfig ¶
type TaskConfig struct {
HealthCheckDefaultInterval *int `yaml:"health_check_default_interval"`
HealthCheckDefaultTimeout *int `yaml:"health_check_default_timeout"`
HealthCheckDefaultRetries *int `yaml:"health_check_default_retries"`
HealthCheckDefaultStartPeriod *int `yaml:"health_check_default_start_period"`
}
type WorkerConfig ¶
type WorkerConfig struct {
Host *string `yaml:"host"`
Port *int `yaml:"port"`
Name *string `yaml:"name"`
DBType *string `yaml:"dbtype"`
TLS *TLSFileConfig `yaml:"tls"`
DbFilename *string `yaml:"db_filename"`
DbBucketName *string `yaml:"db_bucket_name"`
DbLogBucketName *string `yaml:"db_log_bucket_name"`
LogCaptureMaxLines *int `yaml:"log_capture_max_lines"`
LoopInterval *string `yaml:"loop_interval"` // duration
ApiShutdownTimeout *string `yaml:"api_shutdown_timeout"` // duration
}
Click to show internal directories.
Click to hide internal directories.