Documentation ¶
Index ¶
- Constants
- Variables
- func AllKeys() map[string]reflect.Type
- func CastConfigValueForKey(key string, value any) (any, error)
- func DefaultDataDir() string
- 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) ExecutionDir() (string, error)
- func (b Bacalhau) ExecutionStoreFilePath() (string, error)
- func (b Bacalhau) JobStoreFilePath() (string, error)
- func (b Bacalhau) NetworkTransportDir() (string, error)
- func (b Bacalhau) OrchestratorDir() (string, error)
- func (b Bacalhau) PluginsDir() (string, error)
- func (b Bacalhau) UserKeyPath() (string, error)
- type BatchJobDefaultsConfig
- type BatchTaskDefaultConfig
- type Cluster
- type Compute
- 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 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 ComputeDirName = "compute"
const ComputeEnabledKey = "compute.enabled"
const ComputeHeartbeatInfoUpdateIntervalKey = "compute.heartbeat.infoupdateinterval"
const ComputeHeartbeatIntervalKey = "compute.heartbeat.interval"
const ComputeHeartbeatResourceUpdateIntervalKey = "compute.heartbeat.resourceupdateinterval"
const ComputeLabelsKey = "compute.labels"
const ComputeOrchestratorsKey = "compute.orchestrators"
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 FeatureFlagsExecTranslationKey = "featureflags.exectranslation"
const InputSourcesDisabledKey = "inputsources.disabled"
const InputSourcesMaxRetryCountKey = "inputsources.maxretrycount"
const InputSourcesReadTimeoutKey = "inputsources.readtimeout"
const InputSourcesTypesIPFSEndpointKey = "inputsources.types.ipfs.endpoint"
const JobAdmissionControlAcceptNetworkedJobsKey = "jobadmissioncontrol.acceptnetworkedjobs"
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 LoggingLevelKey = "logging.level"
const LoggingLogDebugInfoIntervalKey = "logging.logdebuginfointerval"
const LoggingModeKey = "logging.mode"
const NameProviderKey = "nameprovider"
const NetworkTransportDirName = "nats-store"
const OrchestratorAdvertiseKey = "orchestrator.advertise"
const OrchestratorAuthSecretKey = "orchestrator.authsecret"
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 OrchestratorSchedulerWorkerCountKey = "orchestrator.scheduler.workercount"
const PluginsDirName = "plugins"
const PublishersDisabledKey = "publishers.disabled"
const PublishersTypesIPFSEndpointKey = "publishers.types.ipfs.endpoint"
const PublishersTypesLocalAddressKey = "publishers.types.local.address"
const PublishersTypesLocalDirectoryKey = "publishers.types.local.directory"
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 StrictVersionMatchKey = "strictversionmatch"
const UpdateConfigIntervalKey = "updateconfig.interval"
const UserKeyFileName = "user_id.pem"
const WebUIEnabledKey = "webui.enabled"
const WebUIListenKey = "webui.listen"
Variables ¶
var ConfigDescriptions = map[string]string{}/* 101 elements not displayed */
ConfigDescriptions maps configuration paths to their descriptions
var Default = Bacalhau{ DataDir: DefaultDataDir(), API: API{ Host: "0.0.0.0", Port: 1234, Auth: AuthConfig{ Methods: map[string]AuthenticatorConfig{ "ClientKey": { Type: "challenge", }, }, }, }, NameProvider: "puuid", Orchestrator: Orchestrator{ Enabled: false, Host: "0.0.0.0", Port: 4222, NodeManager: NodeManager{ DisconnectTimeout: Minute, }, Scheduler: Scheduler{ WorkerCount: runtime.NumCPU(), HousekeepingInterval: 30 * Second, HousekeepingTimeout: 2 * Minute, }, EvaluationBroker: EvaluationBroker{ VisibilityTimeout: Minute, MaxRetryCount: 10, }, }, Compute: Compute{ Enabled: false, Orchestrators: []string{"nats://127.0.0.1:4222"}, Heartbeat: Heartbeat{ InfoUpdateInterval: Minute, ResourceUpdateInterval: 30 * Second, Interval: 15 * Second, }, AllocatedCapacity: ResourceScaler{ CPU: "70%", Memory: "70%", Disk: "70%", GPU: "100%", }, }, JobDefaults: JobDefaults{ Batch: BatchJobDefaultsConfig{ Priority: 0, Task: BatchTaskDefaultConfig{ Resources: ResourcesConfig{ CPU: "500m", Memory: "1Gb", }, }, }, Ops: BatchJobDefaultsConfig{ Priority: 0, Task: BatchTaskDefaultConfig{ Resources: ResourcesConfig{ CPU: "500m", Memory: "1Gb", }, }, }, Daemon: LongRunningJobDefaultsConfig{ Priority: 0, Task: LongRunningTaskDefaultConfig{ Resources: ResourcesConfig{ CPU: "500m", Memory: "1Gb", }, }, }, Service: LongRunningJobDefaultsConfig{ Priority: 0, Task: LongRunningTaskDefaultConfig{ Resources: ResourcesConfig{ CPU: "500m", Memory: "1Gb", }, }, }, }, InputSources: InputSourcesConfig{ ReadTimeout: Duration(5 * time.Minute), MaxRetryCount: 3, }, Engines: EngineConfig{ Types: EngineConfigTypes{ Docker: Docker{ ManifestCache: DockerManifestCache{ Size: 1000, TTL: Duration(1 * time.Hour), Refresh: Duration(1 * time.Hour), }}, }, }, Logging: Logging{ Level: "info", Mode: "default", LogDebugInfoInterval: 0, }, UpdateConfig: UpdateConfig{ Interval: Day, }, WebUI: WebUI{ Enabled: false, Listen: "0.0.0.0:8438", }, }
Default is the default configuration for a bacalhau node.
Functions ¶
func CastConfigValueForKey ¶ added in v1.5.0
func DefaultDataDir ¶
func DefaultDataDir() string
DefaultDataDir determines the appropriate default directory for storing repository data. Priority order: 1. User's home directory with .bacalhau appended.
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"` // Port specifies the port number on which the API server listens or the client connects. Port int `yaml:"Port,omitempty"` TLS TLS `yaml:"TLS,omitempty"` Auth AuthConfig `yaml:"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"` // 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"` }
AuthConfig is config that controls user authentication and authorization.
type AuthenticatorConfig ¶ added in v1.2.1
type AuthenticatorConfig struct { Type string `yaml:"Type,omitempty"` PolicyPath string `yaml:"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"` // NameProvider specifies the method used to generate names for the node. One of: hostname, aws, gcp, uuid, puuid. NameProvider string `yaml:"NameProvider,omitempty"` // DataDir specifies a location on disk where the bacalhau node will maintain state. DataDir string `yaml:"DataDir,omitempty"` // StrictVersionMatch indicates whether to enforce strict version matching. StrictVersionMatch bool `yaml:"StrictVersionMatch,omitempty"` Orchestrator Orchestrator `yaml:"Orchestrator,omitempty"` Compute Compute `yaml:"Compute,omitempty"` WebUI WebUI `yaml:"WebUI,omitempty"` InputSources InputSourcesConfig `yaml:"InputSources,omitempty"` Publishers PublishersConfig `yaml:"Publishers,omitempty"` Engines EngineConfig `yaml:"Engines,omitempty"` ResultDownloaders ResultDownloaders `yaml:"ResultDownloaders,omitempty"` JobDefaults JobDefaults `yaml:"JobDefaults,omitempty"` JobAdmissionControl JobAdmissionControl `yaml:"JobAdmissionControl,omitempty"` Logging Logging `yaml:"Logging,omitempty"` UpdateConfig UpdateConfig `yaml:"UpdateConfig,omitempty"` FeatureFlags FeatureFlags `yaml:"FeatureFlags,omitempty"` DisableAnalytics bool `yaml:"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) NetworkTransportDir ¶ added in v1.5.0
func (Bacalhau) OrchestratorDir ¶ added in v1.5.0
func (Bacalhau) PluginsDir ¶ 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"` Task BatchTaskDefaultConfig `yaml:"Task,omitempty"` }
type BatchTaskDefaultConfig ¶ added in v1.5.0
type BatchTaskDefaultConfig struct { Resources ResourcesConfig `yaml:"Resources,omitempty"` Publisher models.SpecConfig `yaml:"Publisher,omitempty"` Timeouts TaskTimeoutConfig `yaml:"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"` // Host specifies the hostname or IP address for cluster communication. Host string `yaml:"Host,omitempty"` // Port specifies the port number for cluster communication. Port int `yaml:"Port,omitempty"` // Advertise specifies the address to advertise to other cluster members. Advertise string `yaml:"Advertise,omitempty"` // Peers is a list of other cluster members to connect to on startup. Peers []string `yaml:"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"` // Orchestrators specifies a list of orchestrator endpoints that this compute node connects to. Orchestrators []string `yaml:"Orchestrators,omitempty"` Heartbeat Heartbeat `yaml:"Heartbeat,omitempty"` // Labels are key-value pairs used to describe and categorize the compute node. Labels map[string]string `yaml:"Labels,omitempty"` AllocatedCapacity ResourceScaler `yaml:"AllocatedCapacity,omitempty"` // AllowListedLocalPaths specifies a list of local file system paths that the compute node is allowed to access. AllowListedLocalPaths []string `yaml:"AllowListedLocalPaths"` }
type Docker ¶ added in v1.5.0
type Docker struct { // ManifestCache specifies the settings for the Docker manifest cache. ManifestCache DockerManifestCache `yaml:"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"` // TTL specifies the time-to-live duration for cache entries. TTL Duration `yaml:"TTL,omitempty"` // Refresh specifies the refresh interval for cache entries. Refresh Duration `yaml:"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"` Types EngineConfigTypes `yaml:"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"` // MaxRetryCount specifies the maximum number of times an evaluation can be retried before being marked as failed. MaxRetryCount int `yaml:"MaxRetryCount,omitempty"` }
type FeatureFlags ¶ added in v1.5.0
type FeatureFlags struct { // ExecTranslation enables the execution translation feature. ExecTranslation bool `yaml:"ExecTranslation,omitempty"` }
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"` // ResourceUpdateInterval specifies the time between updates of resource information to the orchestrator. ResourceUpdateInterval Duration `yaml:"ResourceUpdateInterval,omitempty"` // Interval specifies the time between heartbeat signals sent to the orchestrator. Interval Duration `yaml:"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"` }
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"` }
type InputSourcesConfig ¶ added in v1.5.0
type InputSourcesConfig struct { // Disabled specifies a list of storages that are disabled. Disabled []string `yaml:"Disabled,omitempty"` // ReadTimeout specifies the maximum time allowed for reading from a storage. ReadTimeout Duration `yaml:"ReadTimeout,omitempty"` // ReadTimeout specifies the maximum number of attempts for reading from a storage. MaxRetryCount int `yaml:"MaxRetryCount,omitempty"` Types InputSourcesTypes `yaml:"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"`
}
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"` }
type JobAdmissionControl ¶ added in v1.5.0
type JobAdmissionControl struct { // RejectStatelessJobs indicates whether to reject stateless jobs, i.e. jobs without inputs. RejectStatelessJobs bool `yaml:"RejectStatelessJobs,omitempty"` // AcceptNetworkedJobs indicates whether to accept jobs that require network access. AcceptNetworkedJobs bool `yaml:"AcceptNetworkedJobs,omitempty"` // ProbeHTTP specifies the HTTP endpoint for probing job submission. ProbeHTTP string `yaml:"ProbeHTTP,omitempty"` // ProbeExec specifies the command to execute for probing job submission. ProbeExec string `yaml:"ProbeExec,omitempty"` }
type JobDefaults ¶ added in v1.1.0
type JobDefaults struct { Batch BatchJobDefaultsConfig `yaml:"Batch,omitempty"` Ops BatchJobDefaultsConfig `yaml:"Ops,omitempty"` Daemon LongRunningJobDefaultsConfig `yaml:"Daemon,omitempty"` Service LongRunningJobDefaultsConfig `yaml:"Service,omitempty"` }
type LocalPublisher ¶ added in v1.5.0
type LocalPublisher struct { // Address specifies the endpoint the publisher serves on. Address string `yaml:"Address,omitempty"` // Port specifies the port the publisher serves on. Port int `yaml:"Port,omitempty"` // Directory specifies a path to location on disk where content is served from. Directory string `yaml:"Directory,omitempty"` }
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"` // Mode specifies the logging mode. One of: default, json. Mode string `yaml:"Mode,omitempty"` // LogDebugInfoInterval specifies the interval for logging debug information. LogDebugInfoInterval Duration `yaml:"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"` Task LongRunningTaskDefaultConfig `yaml:"Task,omitempty"` }
type LongRunningTaskDefaultConfig ¶ added in v1.5.0
type LongRunningTaskDefaultConfig struct {
Resources ResourcesConfig `yaml:"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"` // ManualApproval, if true, requires manual approval for new compute nodes joining the cluster. ManualApproval bool `yaml:"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"` // Host specifies the hostname or IP address on which the Orchestrator server listens for compute node connections. Host string `yaml:"Host,omitempty"` // Host specifies the port number on which the Orchestrator server listens for compute node connections. Port int `yaml:"Port,omitempty"` // Advertise specifies URL to advertise to other servers. Advertise string `yaml:"Advertise,omitempty"` // AuthSecret key specifies the key used by compute nodes to connect to an orchestrator. AuthSecret string `yaml:"AuthSecret,omitempty"` Cluster Cluster `yaml:"Cluster,omitempty"` NodeManager NodeManager `yaml:"NodeManager,omitempty"` Scheduler Scheduler `yaml:"Scheduler,omitempty"` EvaluationBroker EvaluationBroker `yaml:"EvaluationBroker,omitempty"` }
type PublisherTypes ¶ added in v1.5.0
type PublisherTypes struct { IPFS IPFSPublisher `yaml:"IPFS,omitempty"` S3 S3Publisher `yaml:"S3,omitempty"` Local LocalPublisher `yaml:"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"` Types PublisherTypes `yaml:"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"` // 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"` // 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"` // 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"` }
func (ResourceScaler) IsZero ¶ added in v1.5.0
func (s ResourceScaler) IsZero() bool
func (ResourceScaler) ToResource ¶ added in v1.5.0
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"` // 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"` // 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"` // 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"` }
type ResultDownloaders ¶ added in v1.5.0
type ResultDownloaders struct { // Disabled is a list of downloaders that are disabled. Disabled []string `yaml:"Disabled,omitempty"` // Timeout specifies the maximum time allowed for a download operation. Timeout Duration `yaml:"Timeout,omitempty"` Types ResultDownloadersTypes `yaml:"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"`
}
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"` // PreSignedURLExpiration specifies the duration before a pre-signed URL expires. PreSignedURLExpiration Duration `yaml:"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"` // HousekeepingInterval specifies how often to run housekeeping tasks. HousekeepingInterval Duration `yaml:"HousekeepingInterval,omitempty"` // HousekeepingTimeout specifies the maximum time allowed for a single housekeeping run. HousekeepingTimeout Duration `yaml:"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"` // KeyFile specifies the path to the TLS private key file. KeyFile string `yaml:"KeyFile,omitempty"` // CAFile specifies the path to the Certificate Authority file. CAFile string `yaml:"CAFile,omitempty"` // UseTLS indicates whether to use TLS for client connections. UseTLS bool `yaml:"UseTLS,omitempty"` // Insecure allows insecure TLS connections (e.g., self-signed certificates). Insecure bool `yaml:"Insecure"` // SelfSigned indicates whether to use a self-signed certificate. SelfSigned bool `yaml:"SelfSigned,omitempty"` // AutoCert specifies the domain for automatic certificate generation. AutoCert string `yaml:"AutoCert,omitempty"` // AutoCertCachePath specifies the directory to cache auto-generated certificates. AutoCertCachePath string `yaml:"AutoCertCachePath,omitempty"` }
type TaskTimeoutConfig ¶ added in v1.5.0
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"` }