Documentation ¶
Index ¶
- Constants
- func LoadTLSConfig(mode, cacertPath, certPath, keyPath string) (*tls.Config, error)
- type Config
- type ConsulApiConf
- type DiscoveryConf
- type EngineConfig
- type EngineUri
- type KusciaApiConf
- type KusciaDiscConf
- type KusciaSchedulerConf
- type SecurityCompromiseConf
- type ServerConfig
- type StorageConf
- type TLSConf
Constants ¶
View Source
const ( DefaultSessionExpireTime = 24 * time.Hour // 24 hours DefaultSessionCheckInterval = 30 * time.Minute // 30 minute DefaultEngineClientTimeout = 120 * time.Second // 120s DefaultInterTimeout = 5 * time.Second // 5s DefaultBrokerIntraServerHost = "127.0.0.1" // default use localhost for safety DefaultLogLevel = "info" DefaultEngineProtocol = "http" DefaultExchangeJobInfoRetryTimes = 3 DefaultExchangeJobInfoRetryInterval = 200 * time.Millisecond DefaultEngineClientMode = "GRPC" )
View Source
const ( StorageTypeSQLite = "sqlite" StorageTypeMySQL = "mysql" StorageTypePostgres = "postgres" )
View Source
const ( NoTLS string = "notls" TLS string = "tls" MutualTLS string = "mtls" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { IntraServer ServerConfig `yaml:"intra_server"` InterServer ServerConfig `yaml:"inter_server"` InterTimeout time.Duration `yaml:"inter_timeout"` // used in engine callback IntraHost string `yaml:"intra_host"` LogLevel string `yaml:"log_level"` // self party code PartyCode string `yaml:"party_code"` PrivateKeyPath string `yaml:"private_key_path"` InterHost string `yaml:"inter_host"` // base64 encoded PEM-encoded private key PrivateKeyData string `yaml:"private_key_data"` PartyInfoFile string `yaml:"party_info_file"` Engine EngineConfig `yaml:"engine"` Storage StorageConf `yaml:"storage"` SecurityCompromise SecurityCompromiseConf `yaml:"security_compromise"` Discovery DiscoveryConf `yaml:"discovery"` // cache SessionExpireTime time.Duration `yaml:"session_expire_time"` SessionCheckInterval time.Duration `yaml:"session_expire_check_time"` // PersistSession bool `yaml:"persist_session"` // streaming Batched bool `yaml:"batched"` // exchange job info ExchangeJobInfoRetryTimes int `yaml:"exchange_job_info_retry_times"` ExchangeJobInfoRetryInterval time.Duration `yaml:"exchange_job_info_retry_interval"` AuthorizedWritableParties []string `yaml:"authorized_writable_parties"` }
type ConsulApiConf ¶
type DiscoveryConf ¶
type DiscoveryConf struct { // supported discovery types: "file", "kuscia" Type string `yaml:"type"` File string `yaml:"file"` Consul *ConsulApiConf `yaml:"consul"` Kuscia *KusciaDiscConf `yaml:"kuscia"` }
type EngineConfig ¶
type EngineConfig struct { ClientMode string `yaml:"mode"` ClientTimeout time.Duration `yaml:"timeout"` Protocol string `yaml:"protocol"` TLSCfg TLSConf `yaml:"tls_cfg"` ContentType string `yaml:"content_type"` // supported schedulers: "kuscia" or "naive" Scheduler string `yaml:"scheduler"` // Uris valid when scheduler is empty or "naive" Uris []EngineUri `yaml:"uris"` // KusciaSchedulerOption valid only when scheduler is "kuscia" KusciaSchedulerOption *KusciaSchedulerConf `yaml:"kuscia_scheduler"` }
type KusciaApiConf ¶
type KusciaApiConf struct { Endpoint string `yaml:"endpoint"` // supported tls mode: "NOTLS", "TLS", "MTLS" // - Token is needed if tls_mode == TLS or tls_mode == MTLS TLSMode string `yaml:"tls_mode"` Cert string `yaml:"cert"` Key string `yaml:"key"` CaCert string `yaml:"cacert"` Token string `yaml:"token"` }
type KusciaDiscConf ¶
type KusciaDiscConf struct { KusciaApiConf `yaml:",inline"` ClusterDefine string `yaml:"cluster_define"` }
type KusciaSchedulerConf ¶
type KusciaSchedulerConf struct { KusciaApiConf `yaml:",inline"` MaxPollTimes int `yaml:"max_poll_times"` PollInterval time.Duration `yaml:"poll_interval"` MaxWaitTime time.Duration `yaml:"max_wait_time"` AppImage string `yaml:"app_image"` // default value is false, set true for debugging purpose KeepJobAliveForDebug bool `yaml:"keep_job_alive_for_debug"` }
type SecurityCompromiseConf ¶
type ServerConfig ¶
type StorageConf ¶
Click to show internal directories.
Click to hide internal directories.