Documentation ¶
Index ¶
- Constants
- Variables
- func AllKeys() map[string]reflect.Type
- func CastConfigValueForKey(key string, value any) (any, error)
- func StringSliceToMap(slice []string) (map[string]string, error)
- type API
- type AuthConfig
- type AuthenticatorConfig
- type Bacalhau
- func (b Bacalhau) AuthTokensPath() (string, error)
- func (b Bacalhau) ComputeDir() (string, error)
- func (b Bacalhau) Copy() (Bacalhau, error)
- func (b Bacalhau) ExecutionDir() (string, error)
- func (b Bacalhau) ExecutionStoreFilePath() (string, error)
- func (b Bacalhau) JobStoreFilePath() (string, error)
- func (b Bacalhau) MergeNew(other Bacalhau) (Bacalhau, error)
- func (b Bacalhau) NetworkTransportDir() (string, error)
- func (b Bacalhau) OrchestratorDir() (string, error)
- func (b Bacalhau) ResultsStorageDir() (string, error)
- func (b Bacalhau) UserKeyPath() (string, error)
- type BatchJobDefaultsConfig
- type BatchTaskDefaultConfig
- type Cluster
- type Compute
- type ComputeAuth
- type ComputeTLS
- type DefaultPublisherConfig
- type Docker
- type DockerManifestCache
- type Duration
- type EngineConfig
- type EngineConfigTypes
- type EvaluationBroker
- type FeatureFlags
- type Heartbeat
- type IPFSPublisher
- type IPFSStorage
- type InputSourcesConfig
- type InputSourcesTypes
- type IpfsDownloader
- type JobAdmissionControl
- type JobDefaults
- type LocalPublisher
- type Logging
- type LongRunningJobDefaultsConfig
- type LongRunningTaskDefaultConfig
- type NodeManager
- type Orchestrator
- type OrchestratorAuth
- type OrchestratorTLS
- type Provider
- type PublisherTypes
- type PublishersConfig
- type ResourceScaler
- type ResourceType
- type ResourcesConfig
- type ResultDownloaders
- type ResultDownloadersTypes
- type S3Publisher
- type Scheduler
- type TLS
- type TaskTimeoutConfig
- type UpdateConfig
- type WASM
- type WebUI
Constants ¶
const ( Second = Duration(time.Second) Minute = Duration(time.Minute) Day = Duration(time.Hour * 24) )
const APIAuthAccessPolicyPathKey = "API.Auth.AccessPolicyPath"
const APIAuthMethodsKey = "API.Auth.Methods"
const APIHostKey = "API.Host"
const APIPortKey = "API.Port"
const APITLSAutoCertCachePathKey = "API.TLS.AutoCertCachePath"
const APITLSAutoCertKey = "API.TLS.AutoCert"
const APITLSCAFileKey = "API.TLS.CAFile"
const APITLSCertFileKey = "API.TLS.CertFile"
const APITLSInsecureKey = "API.TLS.Insecure"
const APITLSKeyFileKey = "API.TLS.KeyFile"
const APITLSSelfSignedKey = "API.TLS.SelfSigned"
const APITLSUseTLSKey = "API.TLS.UseTLS"
const AuthTokensFileName = "tokens.json"
const ComputeAllocatedCapacityCPUKey = "Compute.AllocatedCapacity.CPU"
const ComputeAllocatedCapacityDiskKey = "Compute.AllocatedCapacity.Disk"
const ComputeAllocatedCapacityGPUKey = "Compute.AllocatedCapacity.GPU"
const ComputeAllocatedCapacityMemoryKey = "Compute.AllocatedCapacity.Memory"
const ComputeAllowListedLocalPathsKey = "Compute.AllowListedLocalPaths"
const ComputeAuthTokenKey = "Compute.Auth.Token"
const ComputeDirName = "compute"
const ComputeEnabledKey = "Compute.Enabled"
const ComputeHeartbeatInfoUpdateIntervalKey = "Compute.Heartbeat.InfoUpdateInterval"
const ComputeHeartbeatIntervalKey = "Compute.Heartbeat.Interval"
const ComputeHeartbeatResourceUpdateIntervalKey = "Compute.Heartbeat.ResourceUpdateInterval"
const ComputeOrchestratorsKey = "Compute.Orchestrators"
const ComputeTLSCACertKey = "Compute.TLS.CACert"
const ComputeTLSRequireTLSKey = "Compute.TLS.RequireTLS"
const DataDirKey = "DataDir"
const DisableAnalyticsKey = "DisableAnalytics"
const EnginesDisabledKey = "Engines.Disabled"
const EnginesTypesDockerManifestCacheRefreshKey = "Engines.Types.Docker.ManifestCache.Refresh"
const EnginesTypesDockerManifestCacheSizeKey = "Engines.Types.Docker.ManifestCache.Size"
const EnginesTypesDockerManifestCacheTTLKey = "Engines.Types.Docker.ManifestCache.TTL"
const ExecutionDirName = "executions"
const ExecutionStoreFileName = "state_boltdb.db"
const InputSourcesDisabledKey = "InputSources.Disabled"
const InputSourcesMaxRetryCountKey = "InputSources.MaxRetryCount"
const InputSourcesReadTimeoutKey = "InputSources.ReadTimeout"
const InputSourcesTypesIPFSEndpointKey = "InputSources.Types.IPFS.Endpoint"
const JobAdmissionControlAcceptNetworkedJobsKey = "JobAdmissionControl.AcceptNetworkedJobs"
const JobAdmissionControlLocalityKey = "JobAdmissionControl.Locality"
const JobAdmissionControlProbeExecKey = "JobAdmissionControl.ProbeExec"
const JobAdmissionControlProbeHTTPKey = "JobAdmissionControl.ProbeHTTP"
const JobAdmissionControlRejectStatelessJobsKey = "JobAdmissionControl.RejectStatelessJobs"
const JobDefaultsBatchPriorityKey = "JobDefaults.Batch.Priority"
const JobDefaultsBatchTaskPublisherParamsKey = "JobDefaults.Batch.Task.Publisher.Params"
const JobDefaultsBatchTaskPublisherTypeKey = "JobDefaults.Batch.Task.Publisher.Type"
const JobDefaultsBatchTaskResourcesCPUKey = "JobDefaults.Batch.Task.Resources.CPU"
const JobDefaultsBatchTaskResourcesDiskKey = "JobDefaults.Batch.Task.Resources.Disk"
const JobDefaultsBatchTaskResourcesGPUKey = "JobDefaults.Batch.Task.Resources.GPU"
const JobDefaultsBatchTaskResourcesMemoryKey = "JobDefaults.Batch.Task.Resources.Memory"
const JobDefaultsBatchTaskTimeoutsExecutionTimeoutKey = "JobDefaults.Batch.Task.Timeouts.ExecutionTimeout"
const JobDefaultsBatchTaskTimeoutsTotalTimeoutKey = "JobDefaults.Batch.Task.Timeouts.TotalTimeout"
const JobDefaultsDaemonPriorityKey = "JobDefaults.Daemon.Priority"
const JobDefaultsDaemonTaskResourcesCPUKey = "JobDefaults.Daemon.Task.Resources.CPU"
const JobDefaultsDaemonTaskResourcesDiskKey = "JobDefaults.Daemon.Task.Resources.Disk"
const JobDefaultsDaemonTaskResourcesGPUKey = "JobDefaults.Daemon.Task.Resources.GPU"
const JobDefaultsDaemonTaskResourcesMemoryKey = "JobDefaults.Daemon.Task.Resources.Memory"
const JobDefaultsOpsPriorityKey = "JobDefaults.Ops.Priority"
const JobDefaultsOpsTaskPublisherParamsKey = "JobDefaults.Ops.Task.Publisher.Params"
const JobDefaultsOpsTaskPublisherTypeKey = "JobDefaults.Ops.Task.Publisher.Type"
const JobDefaultsOpsTaskResourcesCPUKey = "JobDefaults.Ops.Task.Resources.CPU"
const JobDefaultsOpsTaskResourcesDiskKey = "JobDefaults.Ops.Task.Resources.Disk"
const JobDefaultsOpsTaskResourcesGPUKey = "JobDefaults.Ops.Task.Resources.GPU"
const JobDefaultsOpsTaskResourcesMemoryKey = "JobDefaults.Ops.Task.Resources.Memory"
const JobDefaultsOpsTaskTimeoutsExecutionTimeoutKey = "JobDefaults.Ops.Task.Timeouts.ExecutionTimeout"
const JobDefaultsOpsTaskTimeoutsTotalTimeoutKey = "JobDefaults.Ops.Task.Timeouts.TotalTimeout"
const JobDefaultsServicePriorityKey = "JobDefaults.Service.Priority"
const JobDefaultsServiceTaskResourcesCPUKey = "JobDefaults.Service.Task.Resources.CPU"
const JobDefaultsServiceTaskResourcesDiskKey = "JobDefaults.Service.Task.Resources.Disk"
const JobDefaultsServiceTaskResourcesGPUKey = "JobDefaults.Service.Task.Resources.GPU"
const JobDefaultsServiceTaskResourcesMemoryKey = "JobDefaults.Service.Task.Resources.Memory"
const JobStoreFileName = "state_boltdb.db"
const LabelsKey = "Labels"
const LoggingLevelKey = "Logging.Level"
const LoggingLogDebugInfoIntervalKey = "Logging.LogDebugInfoInterval"
const LoggingModeKey = "Logging.Mode"
const NameProviderKey = "NameProvider"
const NetworkTransportDirName = "nats-store"
const OrchestratorAdvertiseKey = "Orchestrator.Advertise"
const OrchestratorAuthTokenKey = "Orchestrator.Auth.Token"
const OrchestratorClusterAdvertiseKey = "Orchestrator.Cluster.Advertise"
const OrchestratorClusterHostKey = "Orchestrator.Cluster.Host"
const OrchestratorClusterNameKey = "Orchestrator.Cluster.Name"
const OrchestratorClusterPeersKey = "Orchestrator.Cluster.Peers"
const OrchestratorClusterPortKey = "Orchestrator.Cluster.Port"
const OrchestratorDirName = "orchestrator"
const OrchestratorEnabledKey = "Orchestrator.Enabled"
const OrchestratorEvaluationBrokerMaxRetryCountKey = "Orchestrator.EvaluationBroker.MaxRetryCount"
const OrchestratorEvaluationBrokerVisibilityTimeoutKey = "Orchestrator.EvaluationBroker.VisibilityTimeout"
const OrchestratorHostKey = "Orchestrator.Host"
const OrchestratorNodeManagerDisconnectTimeoutKey = "Orchestrator.NodeManager.DisconnectTimeout"
const OrchestratorNodeManagerManualApprovalKey = "Orchestrator.NodeManager.ManualApproval"
const OrchestratorPortKey = "Orchestrator.Port"
const OrchestratorSchedulerHousekeepingIntervalKey = "Orchestrator.Scheduler.HousekeepingInterval"
const OrchestratorSchedulerHousekeepingTimeoutKey = "Orchestrator.Scheduler.HousekeepingTimeout"
const OrchestratorSchedulerQueueBackoffKey = "Orchestrator.Scheduler.QueueBackoff"
const OrchestratorSchedulerWorkerCountKey = "Orchestrator.Scheduler.WorkerCount"
const OrchestratorSupportReverseProxyKey = "Orchestrator.SupportReverseProxy"
const OrchestratorTLSCACertKey = "Orchestrator.TLS.CACert"
const OrchestratorTLSServerCertKey = "Orchestrator.TLS.ServerCert"
const OrchestratorTLSServerKeyKey = "Orchestrator.TLS.ServerKey"
const OrchestratorTLSServerTimeoutKey = "Orchestrator.TLS.ServerTimeout"
const PublishersDisabledKey = "Publishers.Disabled"
const PublishersTypesIPFSEndpointKey = "Publishers.Types.IPFS.Endpoint"
const PublishersTypesLocalAddressKey = "Publishers.Types.Local.Address"
const PublishersTypesLocalPortKey = "Publishers.Types.Local.Port"
const PublishersTypesS3PreSignedURLDisabledKey = "Publishers.Types.S3.PreSignedURLDisabled"
const PublishersTypesS3PreSignedURLExpirationKey = "Publishers.Types.S3.PreSignedURLExpiration"
const ResultDownloadersDisabledKey = "ResultDownloaders.Disabled"
const ResultDownloadersTimeoutKey = "ResultDownloaders.Timeout"
const ResultDownloadersTypesIPFSEndpointKey = "ResultDownloaders.Types.IPFS.Endpoint"
const ResultsStorageDir = "results"
const StrictVersionMatchKey = "StrictVersionMatch"
const UpdateConfigIntervalKey = "UpdateConfig.Interval"
const UserKeyFileName = "user_id.pem"
const WebUIBackendKey = "WebUI.Backend"
const WebUIEnabledKey = "WebUI.Enabled"
const WebUIListenKey = "WebUI.Listen"
Variables ¶
var ConfigDescriptions = map[string]string{}/* 110 elements not displayed */
ConfigDescriptions maps configuration paths to their descriptions
Functions ¶
func CastConfigValueForKey ¶ added in v1.5.0
Types ¶
type API ¶ added in v1.5.0
type API struct { // Host specifies the hostname or IP address on which the API server listens or the client connects. Host string `yaml:"Host,omitempty" json:"Host,omitempty"` // Port specifies the port number on which the API server listens or the client connects. Port int `yaml:"Port,omitempty" json:"Port,omitempty"` TLS TLS `yaml:"TLS,omitempty" json:"TLS,omitempty"` Auth AuthConfig `yaml:"Auth,omitempty" json:"Auth,omitempty"` }
type AuthConfig ¶ added in v1.2.1
type AuthConfig struct { // Methods maps "method names" to authenticator implementations. A method // name is a human-readable string chosen by the person configuring the // system that is shown to users to help them pick the authentication method // they want to use. There can be multiple usages of the same Authenticator // *type* but with different configs and parameters, each identified with a // unique method name. // // For example, if an implementation wants to allow users to log in with // Github or Bitbucket, they might both use an authenticator implementation // of type "oidc", and each would appear once on this provider with key / // method name "github" and "bitbucket". // // By default, only a single authentication method that accepts // authentication via client keys will be enabled. Methods map[string]AuthenticatorConfig `yaml:"Methods,omitempty" json:"Methods,omitempty"` // AccessPolicyPath is the path to a file or directory that will be loaded as // the policy to apply to all inbound API requests. If unspecified, a policy // that permits access to all API endpoints to both authenticated and // unauthenticated users (the default as of v1.2.0) will be used. AccessPolicyPath string `yaml:"AccessPolicyPath,omitempty" json:"AccessPolicyPath,omitempty"` }
AuthConfig is config that controls user authentication and authorization.
type AuthenticatorConfig ¶ added in v1.2.1
type AuthenticatorConfig struct { Type string `yaml:"Type,omitempty" json:"Type,omitempty"` PolicyPath string `yaml:"PolicyPath,omitempty" json:"PolicyPath,omitempty"` }
AuthenticatorConfig is config for a specific named authentication method, specifying the type of authentication and the path to a policy file that controls the method. Some implementation types may require policies that meet a certain interface beyond the default – see the documentation on that type for more info.
type Bacalhau ¶ added in v1.5.0
type Bacalhau struct { API API `yaml:"API,omitempty" json:"API,omitempty"` // NameProvider specifies the method used to generate names for the node. One of: hostname, aws, gcp, uuid, puuid. NameProvider string `yaml:"NameProvider,omitempty" json:"NameProvider,omitempty"` // DataDir specifies a location on disk where the bacalhau node will maintain state. DataDir string `yaml:"DataDir,omitempty" json:"DataDir,omitempty"` // StrictVersionMatch indicates whether to enforce strict version matching. StrictVersionMatch bool `yaml:"StrictVersionMatch,omitempty" json:"StrictVersionMatch,omitempty"` Orchestrator Orchestrator `yaml:"Orchestrator,omitempty" json:"Orchestrator,omitempty"` Compute Compute `yaml:"Compute,omitempty" json:"Compute,omitempty"` // Labels are key-value pairs used to describe and categorize the nodes. Labels map[string]string `yaml:"Labels,omitempty" json:"Labels,omitempty"` WebUI WebUI `yaml:"WebUI,omitempty" json:"WebUI,omitempty"` InputSources InputSourcesConfig `yaml:"InputSources,omitempty" json:"InputSources,omitempty"` Publishers PublishersConfig `yaml:"Publishers,omitempty" json:"Publishers,omitempty"` Engines EngineConfig `yaml:"Engines,omitempty" json:"Engines,omitempty"` ResultDownloaders ResultDownloaders `yaml:"ResultDownloaders,omitempty" json:"ResultDownloaders,omitempty"` JobDefaults JobDefaults `yaml:"JobDefaults,omitempty" json:"JobDefaults,omitempty"` JobAdmissionControl JobAdmissionControl `yaml:"JobAdmissionControl,omitempty" json:"JobAdmissionControl,omitempty"` Logging Logging `yaml:"Logging,omitempty" json:"Logging,omitempty"` UpdateConfig UpdateConfig `yaml:"UpdateConfig,omitempty" json:"UpdateConfig,omitempty"` FeatureFlags FeatureFlags `yaml:"FeatureFlags,omitempty" json:"FeatureFlags,omitempty"` // DisableAnalytics, when true, disables sharing anonymous analytics data with the Bacalhau development team DisableAnalytics bool `yaml:"DisableAnalytics,omitempty" json:"DisableAnalytics,omitempty"` }
func (Bacalhau) AuthTokensPath ¶ added in v1.5.0
func (Bacalhau) ComputeDir ¶ added in v1.5.0
func (Bacalhau) ExecutionDir ¶ added in v1.5.0
func (Bacalhau) ExecutionStoreFilePath ¶ added in v1.5.0
func (Bacalhau) JobStoreFilePath ¶ added in v1.5.0
func (Bacalhau) MergeNew ¶ added in v1.5.0
MergeNew combines the current Bacalhau configuration with another one, returning a new instance with the merged configuration.
func (Bacalhau) NetworkTransportDir ¶ added in v1.5.0
func (Bacalhau) OrchestratorDir ¶ added in v1.5.0
func (Bacalhau) ResultsStorageDir ¶ added in v1.5.0
func (Bacalhau) UserKeyPath ¶ added in v1.5.0
type BatchJobDefaultsConfig ¶ added in v1.5.0
type BatchJobDefaultsConfig struct { // Priority specifies the default priority allocated to a batch or ops job. // This value is used when the job hasn't explicitly set its priority requirement. Priority int `yaml:"Priority,omitempty" json:"Priority,omitempty"` Task BatchTaskDefaultConfig `yaml:"Task,omitempty" json:"Task,omitempty"` }
type BatchTaskDefaultConfig ¶ added in v1.5.0
type BatchTaskDefaultConfig struct { Resources ResourcesConfig `yaml:"Resources,omitempty" json:"Resources,omitempty"` Publisher DefaultPublisherConfig `yaml:"Publisher,omitempty" json:"Publisher,omitempty"` Timeouts TaskTimeoutConfig `yaml:"Timeouts,omitempty" json:"Timeouts,omitempty"` }
type Cluster ¶ added in v1.5.0
type Cluster struct { // Name specifies the unique identifier for this orchestrator cluster. Name string `yaml:"Name,omitempty" json:"Name,omitempty"` // Host specifies the hostname or IP address for cluster communication. Host string `yaml:"Host,omitempty" json:"Host,omitempty"` // Port specifies the port number for cluster communication. Port int `yaml:"Port,omitempty" json:"Port,omitempty"` // Advertise specifies the address to advertise to other cluster members. Advertise string `yaml:"Advertise,omitempty" json:"Advertise,omitempty"` // Peers is a list of other cluster members to connect to on startup. Peers []string `yaml:"Peers,omitempty" json:"Peers,omitempty"` }
type Compute ¶ added in v1.5.0
type Compute struct { // Enabled indicates whether the compute node is active and available for job execution. Enabled bool `yaml:"Enabled,omitempty" json:"Enabled,omitempty"` // Orchestrators specifies a list of orchestrator endpoints that this compute node connects to. Orchestrators []string `yaml:"Orchestrators,omitempty" json:"Orchestrators,omitempty"` // Auth specifies the authentication configuration for compute nodes to connect to the orchestrator. Auth ComputeAuth `yaml:"Auth,omitempty" json:"Auth,omitempty"` Heartbeat Heartbeat `yaml:"Heartbeat,omitempty" json:"Heartbeat,omitempty"` AllocatedCapacity ResourceScaler `yaml:"AllocatedCapacity,omitempty" json:"AllocatedCapacity,omitempty"` // AllowListedLocalPaths specifies a list of local file system paths that the compute node is allowed to access. AllowListedLocalPaths []string `yaml:"AllowListedLocalPaths" json:"AllowListedLocalPaths,omitempty"` // TLS specifies the TLS related configuration on the compute node when connecting with the orchestrator. TLS ComputeTLS `yaml:"TLS,omitempty" json:"TLS,omitempty"` }
type ComputeAuth ¶ added in v1.5.0
type ComputeAuth struct { // Token specifies the key for compute nodes to be able to access the orchestrator. Token string `yaml:"Token,omitempty" json:"Token,omitempty"` }
type ComputeTLS ¶ added in v1.5.2
type ComputeTLS struct { // CACert specifies the CA file path that the compute node trusts when connecting to orchestrator. CACert string `yaml:"CACert,omitempty" json:"CACert,omitempty"` // RequireTLS specifies if the compute node enforces encrypted communication with orchestrator. RequireTLS bool `yaml:"RequireTLS,omitempty" json:"RequireTLS,omitempty"` }
type DefaultPublisherConfig ¶ added in v1.5.0
type DefaultPublisherConfig struct { // Type specifies the publisher type. e.g. "s3", "local", "ipfs", etc. Type string `json:"Type,omitempty" yaml:"Type,omitempty"` // Params specifies the publisher configuration data. Params map[string]string `json:"Params,omitempty" yaml:"Params,omitempty"` }
func (DefaultPublisherConfig) ToSpecConfig ¶ added in v1.5.0
func (d DefaultPublisherConfig) ToSpecConfig() models.SpecConfig
type Docker ¶ added in v1.5.0
type Docker struct { // ManifestCache specifies the settings for the Docker manifest cache. ManifestCache DockerManifestCache `yaml:"ManifestCache,omitempty" json:"ManifestCache,omitempty"` }
Docker represents the configuration settings for the Docker runtime provider.
type DockerManifestCache ¶ added in v1.5.0
type DockerManifestCache struct { // Size specifies the size of the Docker manifest cache. Size uint64 `yaml:"Size,omitempty" json:"Size,omitempty"` // TTL specifies the time-to-live duration for cache entries. TTL Duration `yaml:"TTL,omitempty" json:"TTL,omitempty"` // Refresh specifies the refresh interval for cache entries. Refresh Duration `yaml:"Refresh,omitempty" json:"Refresh,omitempty"` }
DockerManifestCache represents the configuration settings for the Docker manifest cache.
type Duration ¶
Duration is a wrapper type for time.Duration for decoding and encoding from/to YAML, etc.
func (Duration) AsTimeDuration ¶ added in v1.2.0
AsTimeDuration returns Duration as a time.Duration type. It is only called in the code gen to set viper defaults. This method exists for the following reasons:
- our config file is yaml, and we want to use durations for configuring things, printed in a human-readable format.
- time.Duration does not, and will not implement MarshalText/UnmarshalText - https://github.com/golang/go/issues/16039
- viper.GetDuration doesn't return an error, and instead returns `0` if it fails to cast - https://github.com/spf13/viper/blob/master/viper.go#L1048 - https://github.com/spf13/cast/blob/master/caste.go#L61 viper.GetDuration is unable to cast a types.Duration to a time.Duration (see second link), so it returns 0.
To meet the 3 constraints above we write durations into viper as a time.Duration, but cast them to a types.Duration when they are added to our config structure. This allows us to: 1. Have human-readable times in out config file. 2. Have type safety on out cli, i.e. config set <duration_key> 10s 3. Return durations instead of `0` from viper.GetDuration.
func (Duration) MarshalText ¶
func (*Duration) UnmarshalText ¶
UnmarshalText implements interface for YAML decoding
type EngineConfig ¶ added in v1.5.0
type EngineConfig struct { // Disabled specifies a list of engines that are disabled. Disabled []string `yaml:"Disabled,omitempty" json:"Disabled,omitempty"` Types EngineConfigTypes `yaml:"Types,omitempty" json:"Types,omitempty"` }
func (EngineConfig) IsNotDisabled ¶ added in v1.5.0
func (e EngineConfig) IsNotDisabled(kind string) bool
type EngineConfigTypes ¶ added in v1.5.0
type EvaluationBroker ¶ added in v1.5.0
type EvaluationBroker struct { // VisibilityTimeout specifies how long an evaluation can be claimed before it's returned to the queue. VisibilityTimeout Duration `yaml:"VisibilityTimeout,omitempty" json:"VisibilityTimeout,omitempty"` // MaxRetryCount specifies the maximum number of times an evaluation can be retried before being marked as failed. MaxRetryCount int `yaml:"MaxRetryCount,omitempty" json:"MaxRetryCount,omitempty"` }
type FeatureFlags ¶ added in v1.5.0
type FeatureFlags struct { }
type Heartbeat ¶ added in v1.5.0
type Heartbeat struct { // InfoUpdateInterval specifies the time between updates of non-resource information to the orchestrator. InfoUpdateInterval Duration `yaml:"InfoUpdateInterval,omitempty" json:"InfoUpdateInterval,omitempty"` // Deprecated: use Interval instead ResourceUpdateInterval Duration `yaml:"ResourceUpdateInterval,omitempty" json:"ResourceUpdateInterval,omitempty"` // Interval specifies the time between heartbeat signals sent to the orchestrator. Interval Duration `yaml:"Interval,omitempty" json:"Interval,omitempty"` }
type IPFSPublisher ¶ added in v1.5.0
type IPFSPublisher struct { // Endpoint specifies the multi-address to connect to for IPFS. e.g /ip4/127.0.0.1/tcp/5001 Endpoint string `yaml:"Endpoint,omitempty" json:"Endpoint,omitempty"` }
type IPFSStorage ¶ added in v1.5.0
type IPFSStorage struct { // Endpoint specifies the multi-address to connect to for IPFS. e.g /ip4/127.0.0.1/tcp/5001 Endpoint string `yaml:"Endpoint,omitempty" json:"Endpoint,omitempty"` }
type InputSourcesConfig ¶ added in v1.5.0
type InputSourcesConfig struct { // Disabled specifies a list of storages that are disabled. Disabled []string `yaml:"Disabled,omitempty" json:"Disabled,omitempty"` // ReadTimeout specifies the maximum time allowed for reading from a storage. ReadTimeout Duration `yaml:"ReadTimeout,omitempty" json:"ReadTimeout,omitempty"` // ReadTimeout specifies the maximum number of attempts for reading from a storage. MaxRetryCount int `yaml:"MaxRetryCount,omitempty" json:"MaxRetryCount,omitempty"` Types InputSourcesTypes `yaml:"Types,omitempty" json:"Types,omitempty"` }
func (InputSourcesConfig) IsNotDisabled ¶ added in v1.5.0
func (i InputSourcesConfig) IsNotDisabled(kind string) bool
type InputSourcesTypes ¶ added in v1.5.0
type InputSourcesTypes struct {
IPFS IPFSStorage `yaml:"IPFS,omitempty" json:"IPFS,omitempty"`
}
type IpfsDownloader ¶ added in v1.5.0
type IpfsDownloader struct { // Endpoint specifies the multi-address to connect to for IPFS. e.g /ip4/127.0.0.1/tcp/5001 Endpoint string `yaml:"Endpoint,omitempty" json:"Endpoint,omitempty"` }
type JobAdmissionControl ¶ added in v1.5.0
type JobAdmissionControl struct { // Locality specifies the locality of the job input data. Locality models.JobSelectionDataLocality `yaml:"Locality,omitempty" json:"Locality,omitempty"` // RejectStatelessJobs indicates whether to reject stateless jobs, i.e. jobs without inputs. RejectStatelessJobs bool `yaml:"RejectStatelessJobs,omitempty" json:"RejectStatelessJobs,omitempty"` // AcceptNetworkedJobs indicates whether to accept jobs that require network access. AcceptNetworkedJobs bool `yaml:"AcceptNetworkedJobs,omitempty" json:"AcceptNetworkedJobs,omitempty"` // ProbeHTTP specifies the HTTP endpoint for probing job submission. ProbeHTTP string `yaml:"ProbeHTTP,omitempty" json:"ProbeHTTP,omitempty"` // ProbeExec specifies the command to execute for probing job submission. ProbeExec string `yaml:"ProbeExec,omitempty" json:"ProbeExec,omitempty"` }
type JobDefaults ¶ added in v1.1.0
type JobDefaults struct { Batch BatchJobDefaultsConfig `yaml:"Batch,omitempty" json:"Batch,omitempty"` Ops BatchJobDefaultsConfig `yaml:"Ops,omitempty" json:"Ops,omitempty"` Daemon LongRunningJobDefaultsConfig `yaml:"Daemon,omitempty" json:"Daemon,omitempty"` Service LongRunningJobDefaultsConfig `yaml:"Service,omitempty" json:"Service,omitempty"` }
type LocalPublisher ¶ added in v1.5.0
type Logging ¶ added in v1.5.0
type Logging struct { // Level sets the logging level. One of: trace, debug, info, warn, error, fatal, panic. Level string `yaml:"Level,omitempty" json:"Level,omitempty"` // Mode specifies the logging mode. One of: default, json. Mode string `yaml:"Mode,omitempty" json:"Mode,omitempty"` // LogDebugInfoInterval specifies the interval for logging debug information. LogDebugInfoInterval Duration `yaml:"LogDebugInfoInterval,omitempty" json:"LogDebugInfoInterval,omitempty"` }
type LongRunningJobDefaultsConfig ¶ added in v1.5.0
type LongRunningJobDefaultsConfig struct { // Priority specifies the default priority allocated to a service or daemon job. // This value is used when the job hasn't explicitly set its priority requirement. Priority int `yaml:"Priority,omitempty" json:"Priority,omitempty"` Task LongRunningTaskDefaultConfig `yaml:"Task,omitempty" json:"Task,omitempty"` }
type LongRunningTaskDefaultConfig ¶ added in v1.5.0
type LongRunningTaskDefaultConfig struct {
Resources ResourcesConfig `yaml:"Resources,omitempty" json:"Resources,omitempty"`
}
type NodeManager ¶ added in v1.5.0
type NodeManager struct { // DisconnectTimeout specifies how long to wait before considering a node disconnected. DisconnectTimeout Duration `yaml:"DisconnectTimeout,omitempty" json:"DisconnectTimeout,omitempty"` // ManualApproval, if true, requires manual approval for new compute nodes joining the cluster. ManualApproval bool `yaml:"ManualApproval,omitempty" json:"ManualApproval,omitempty"` }
type Orchestrator ¶ added in v1.5.0
type Orchestrator struct { // Enabled indicates whether the orchestrator node is active and available for job submission. Enabled bool `yaml:"Enabled,omitempty" json:"Enabled,omitempty"` // Host specifies the hostname or IP address on which the Orchestrator server listens for compute node connections. Host string `yaml:"Host,omitempty" json:"Host,omitempty"` // Host specifies the port number on which the Orchestrator server listens for compute node connections. Port int `yaml:"Port,omitempty" json:"Port,omitempty"` // Advertise specifies URL to advertise to other servers. Advertise string `yaml:"Advertise,omitempty" json:"Advertise,omitempty"` // Auth specifies the authentication configuration for compute nodes to connect to the orchestrator. Auth OrchestratorAuth `yaml:"Auth,omitempty" json:"Auth,omitempty"` // TLS specifies the TLS related configuration on the orchestrator for when compute nodes need to connect. TLS OrchestratorTLS `yaml:"TLS,omitempty" json:"TLS,omitempty"` Cluster Cluster `yaml:"Cluster,omitempty" json:"Cluster,omitempty"` NodeManager NodeManager `yaml:"NodeManager,omitempty" json:"NodeManager,omitempty"` Scheduler Scheduler `yaml:"Scheduler,omitempty" json:"Scheduler,omitempty"` EvaluationBroker EvaluationBroker `yaml:"EvaluationBroker,omitempty" json:"EvaluationBroker,omitempty"` // SupportReverseProxy configures the orchestrator node to run behind a reverse proxy SupportReverseProxy bool `yaml:"SupportReverseProxy,omitempty" json:"SupportReverseProxy,omitempty"` }
type OrchestratorAuth ¶ added in v1.5.0
type OrchestratorAuth struct { // Token specifies the key for compute nodes to be able to access the orchestrator Token string `yaml:"Token,omitempty" json:"Token,omitempty"` }
type OrchestratorTLS ¶ added in v1.5.2
type OrchestratorTLS struct { // ServerKey specifies the private key file path given to NATS server to serve TLS connections. ServerKey string `yaml:"ServerKey,omitempty" json:"ServerKey,omitempty"` // ServerCert specifies the certificate file path given to NATS server to serve TLS connections. ServerCert string `yaml:"ServerCert,omitempty" json:"ServerCert,omitempty"` // ServerTimeout specifies the TLS timeout, in seconds, set on the NATS server. ServerTimeout int `yaml:"ServerTimeout,omitempty" json:"ServerTimeout,omitempty"` // CACert specifies the CA file path that the orchestrator node trusts when connecting to NATS server. CACert string `yaml:"CACert,omitempty" json:"CACert,omitempty"` }
type PublisherTypes ¶ added in v1.5.0
type PublisherTypes struct { IPFS IPFSPublisher `yaml:"IPFS,omitempty" json:"IPFS,omitempty"` S3 S3Publisher `yaml:"S3,omitempty" json:"S3,omitempty"` Local LocalPublisher `yaml:"Local,omitempty" json:"Local,omitempty"` }
type PublishersConfig ¶ added in v1.5.0
type PublishersConfig struct { // Disabled specifies a list of publishers that are disabled. Disabled []string `yaml:"Disabled,omitempty" json:"Disabled,omitempty"` Types PublisherTypes `yaml:"Types,omitempty" json:"Types,omitempty"` }
func (PublishersConfig) IsNotDisabled ¶ added in v1.5.0
func (p PublishersConfig) IsNotDisabled(kind string) bool
type ResourceScaler ¶ added in v1.5.0
type ResourceScaler struct { // CPU specifies the amount of CPU a compute node allocates for running jobs. // It can be expressed as a percentage (e.g., "85%") or a Kubernetes resource string (e.g., "100m"). CPU ResourceType `yaml:"CPU,omitempty" json:"CPU,omitempty"` // Memory specifies the amount of Memory a compute node allocates for running jobs. // It can be expressed as a percentage (e.g., "85%") or a Kubernetes resource string (e.g., "1Gi"). Memory ResourceType `yaml:"Memory,omitempty" json:"Memory,omitempty"` // Disk specifies the amount of Disk space a compute node allocates for running jobs. // It can be expressed as a percentage (e.g., "85%") or a Kubernetes resource string (e.g., "10Gi"). Disk ResourceType `yaml:"Disk,omitempty" json:"Disk,omitempty"` // GPU specifies the amount of GPU a compute node allocates for running jobs. // It can be expressed as a percentage (e.g., "85%") or a Kubernetes resource string (e.g., "1"). // Note: When using percentages, the result is always rounded up to the nearest whole GPU. GPU ResourceType `yaml:"GPU,omitempty" json:"GPU,omitempty"` }
func ResourceScalerFromModelsResourceConfig ¶ added in v1.5.0
func ResourceScalerFromModelsResourceConfig(r models.ResourcesConfig) ResourceScaler
func (ResourceScaler) IsZero ¶ added in v1.5.0
func (s ResourceScaler) IsZero() bool
func (ResourceScaler) ToResource ¶ added in v1.5.0
ToResource TODO: This is a very complex function that should be simplified and split
type ResourceType ¶ added in v1.5.0
type ResourceType string
func (ResourceType) IsScaler ¶ added in v1.5.0
func (t ResourceType) IsScaler() bool
type ResourcesConfig ¶ added in v1.5.0
type ResourcesConfig struct { // CPU specifies the default amount of CPU allocated to a task. // It uses Kubernetes resource string format (e.g., "100m" for 0.1 CPU cores). // This value is used when the task hasn't explicitly set its CPU requirement. CPU string `yaml:"CPU,omitempty" json:"CPU,omitempty"` // Memory specifies the default amount of memory allocated to a task. // It uses Kubernetes resource string format (e.g., "256Mi" for 256 mebibytes). // This value is used when the task hasn't explicitly set its memory requirement. Memory string `yaml:"Memory,omitempty" json:"Memory,omitempty"` // Disk specifies the default amount of disk space allocated to a task. // It uses Kubernetes resource string format (e.g., "1Gi" for 1 gibibyte). // This value is used when the task hasn't explicitly set its disk space requirement. Disk string `yaml:"Disk,omitempty" json:"Disk,omitempty"` // GPU specifies the default number of GPUs allocated to a task. // It uses Kubernetes resource string format (e.g., "1" for 1 GPU). // This value is used when the task hasn't explicitly set its GPU requirement. GPU string `yaml:"GPU,omitempty" json:"GPU,omitempty"` }
func FromModelsResourceConfig ¶ added in v1.5.0
func FromModelsResourceConfig(r models.ResourcesConfig) ResourcesConfig
FromModelsResourceConfig converts a models.ResourcesConfig to a ResourcesConfig.
type ResultDownloaders ¶ added in v1.5.0
type ResultDownloaders struct { // Disabled is a list of downloaders that are disabled. Disabled []string `yaml:"Disabled,omitempty" json:"Disabled,omitempty"` // Timeout specifies the maximum time allowed for a download operation. Timeout Duration `yaml:"Timeout,omitempty" json:"Timeout,omitempty"` Types ResultDownloadersTypes `yaml:"Types,omitempty" json:"Types,omitempty"` }
func (ResultDownloaders) IsNotDisabled ¶ added in v1.5.0
func (r ResultDownloaders) IsNotDisabled(kind string) bool
type ResultDownloadersTypes ¶ added in v1.5.0
type ResultDownloadersTypes struct {
IPFS IpfsDownloader `yaml:"IPFS,omitempty" json:"IPFS,omitempty"`
}
type S3Publisher ¶ added in v1.5.0
type S3Publisher struct { // PreSignedURLDisabled specifies whether pre-signed URLs are enabled for the S3 provider. PreSignedURLDisabled bool `yaml:"PreSignedURLDisabled,omitempty" json:"PreSignedURLDisabled,omitempty"` // PreSignedURLExpiration specifies the duration before a pre-signed URL expires. PreSignedURLExpiration Duration `yaml:"PreSignedURLExpiration,omitempty" json:"PreSignedURLExpiration,omitempty"` }
type Scheduler ¶ added in v1.5.0
type Scheduler struct { // WorkerCount specifies the number of concurrent workers for job scheduling. WorkerCount int `yaml:"WorkerCount,omitempty" json:"WorkerCount,omitempty"` // QueueBackoff specifies the time to wait before retrying a failed job. QueueBackoff Duration `yaml:"QueueBackoff,omitempty" json:"QueueBackoff,omitempty"` // HousekeepingInterval specifies how often to run housekeeping tasks. HousekeepingInterval Duration `yaml:"HousekeepingInterval,omitempty" json:"HousekeepingInterval,omitempty"` // HousekeepingTimeout specifies the maximum time allowed for a single housekeeping run. HousekeepingTimeout Duration `yaml:"HousekeepingTimeout,omitempty" json:"HousekeepingTimeout,omitempty"` }
type TLS ¶ added in v1.5.0
type TLS struct { // CertFile specifies the path to the TLS certificate file. CertFile string `yaml:"CertFile,omitempty" json:"CertFile,omitempty"` // KeyFile specifies the path to the TLS private key file. KeyFile string `yaml:"KeyFile,omitempty" json:"KeyFile,omitempty"` // CAFile specifies the path to the Certificate Authority file. CAFile string `yaml:"CAFile,omitempty" json:"CAFile,omitempty"` // UseTLS indicates whether to use TLS for client connections. UseTLS bool `yaml:"UseTLS,omitempty" json:"UseTLS,omitempty"` // Insecure allows insecure TLS connections (e.g., self-signed certificates). Insecure bool `yaml:"Insecure" json:"Insecure"` // SelfSigned indicates whether to use a self-signed certificate. SelfSigned bool `yaml:"SelfSigned,omitempty" json:"SelfSigned,omitempty"` // AutoCert specifies the domain for automatic certificate generation. AutoCert string `yaml:"AutoCert,omitempty" json:"AutoCert,omitempty"` // AutoCertCachePath specifies the directory to cache auto-generated certificates. AutoCertCachePath string `yaml:"AutoCertCachePath,omitempty" json:"AutoCertCachePath,omitempty"` }
type TaskTimeoutConfig ¶ added in v1.5.0
type TaskTimeoutConfig struct { // TotalTimeout is the maximum total time allowed for a task TotalTimeout Duration `yaml:"TotalTimeout,omitempty" json:"TotalTimeout,omitempty"` // ExecutionTimeout is the maximum time allowed for task execution ExecutionTimeout Duration `yaml:"ExecutionTimeout,omitempty" json:"ExecutionTimeout,omitempty"` }
type UpdateConfig ¶ added in v1.1.2
type UpdateConfig struct { // Interval specifies the time between update checks, when set to 0 update checks are not performed. Interval Duration `yaml:"Interval,omitempty" json:"Interval,omitempty"` }
type WebUI ¶ added in v1.5.0
type WebUI struct { // Enabled indicates whether the Web UI is enabled. Enabled bool `yaml:"Enabled,omitempty" json:"Enabled,omitempty"` // Listen specifies the address and port on which the Web UI listens. Listen string `yaml:"Listen,omitempty" json:"Listen,omitempty"` // Backend specifies the address and port of the backend API server. // If empty, the Web UI will use the same address and port as the API server. Backend string `yaml:"Backend,omitempty" json:"Backend,omitempty"` }