Documentation ¶
Index ¶
- Constants
- func Set(cfg BacalhauConfig, opts ...SetOption)
- func SetDefaults(cfg BacalhauConfig, opts ...SetOption)
- type APIConfig
- type AuthConfig
- type AuthenticatorConfig
- type BacalhauConfig
- type CapacityConfig
- type ClientTLSConfig
- type ComputeConfig
- type ComputeControlPlaneConfig
- type DockerCacheConfig
- type Duration
- type EvaluationBrokerConfig
- type FeatureConfig
- type IpfsConfig
- type JobDefaults
- type JobStoreConfig
- type JobTimeoutConfig
- type LocalPublisherConfig
- type LogStreamConfig
- type LoggingConfig
- type MetricsConfig
- type NetworkClusterConfig
- type NetworkConfig
- type NodeConfig
- type RequesterConfig
- type RequesterControlPlaneConfig
- type S3StorageProviderConfig
- type SchedulerConfig
- type SetOption
- type SetParams
- type StorageProviderConfig
- type StorageType
- type TLSConfiguration
- type UpdateConfig
- type UserConfig
- type WebUIConfig
- type WorkerConfig
Constants ¶
const Auth = "Auth"
const AuthAccessPolicyPath = "Auth.AccessPolicyPath"
const AuthMethods = "Auth.Methods"
const AuthTokensPath = "Auth.TokensPath"
const Metrics = "Metrics"
const MetricsEventTracerPath = "Metrics.EventTracerPath"
const Node = "Node"
const NodeAllowListedLocalPaths = "Node.AllowListedLocalPaths"
const NodeClientAPI = "Node.ClientAPI"
const NodeClientAPIClientTLS = "Node.ClientAPI.ClientTLS"
const NodeClientAPIClientTLSCACert = "Node.ClientAPI.ClientTLS.CACert"
const NodeClientAPIClientTLSInsecure = "Node.ClientAPI.ClientTLS.Insecure"
const NodeClientAPIClientTLSUseTLS = "Node.ClientAPI.ClientTLS.UseTLS"
const NodeClientAPIHost = "Node.ClientAPI.Host"
const NodeClientAPIPort = "Node.ClientAPI.Port"
const NodeClientAPITLS = "Node.ClientAPI.TLS"
const NodeClientAPITLSAutoCert = "Node.ClientAPI.TLS.AutoCert"
const NodeClientAPITLSAutoCertCachePath = "Node.ClientAPI.TLS.AutoCertCachePath"
const NodeClientAPITLSSelfSigned = "Node.ClientAPI.TLS.SelfSigned"
const NodeClientAPITLSServerCertificate = "Node.ClientAPI.TLS.ServerCertificate"
const NodeClientAPITLSServerKey = "Node.ClientAPI.TLS.ServerKey"
const NodeCompute = "Node.Compute"
const NodeComputeCapacity = "Node.Compute.Capacity"
const NodeComputeCapacityDefaultJobResourceLimits = "Node.Compute.Capacity.DefaultJobResourceLimits"
const NodeComputeCapacityDefaultJobResourceLimitsCPU = "Node.Compute.Capacity.DefaultJobResourceLimits.CPU"
const NodeComputeCapacityDefaultJobResourceLimitsDisk = "Node.Compute.Capacity.DefaultJobResourceLimits.Disk"
const NodeComputeCapacityDefaultJobResourceLimitsGPU = "Node.Compute.Capacity.DefaultJobResourceLimits.GPU"
const NodeComputeCapacityDefaultJobResourceLimitsMemory = "Node.Compute.Capacity.DefaultJobResourceLimits.Memory"
const NodeComputeCapacityIgnorePhysicalResourceLimits = "Node.Compute.Capacity.IgnorePhysicalResourceLimits"
const NodeComputeCapacityJobResourceLimits = "Node.Compute.Capacity.JobResourceLimits"
const NodeComputeCapacityJobResourceLimitsCPU = "Node.Compute.Capacity.JobResourceLimits.CPU"
const NodeComputeCapacityJobResourceLimitsDisk = "Node.Compute.Capacity.JobResourceLimits.Disk"
const NodeComputeCapacityJobResourceLimitsGPU = "Node.Compute.Capacity.JobResourceLimits.GPU"
const NodeComputeCapacityJobResourceLimitsMemory = "Node.Compute.Capacity.JobResourceLimits.Memory"
const NodeComputeCapacityTotalResourceLimits = "Node.Compute.Capacity.TotalResourceLimits"
const NodeComputeCapacityTotalResourceLimitsCPU = "Node.Compute.Capacity.TotalResourceLimits.CPU"
const NodeComputeCapacityTotalResourceLimitsDisk = "Node.Compute.Capacity.TotalResourceLimits.Disk"
const NodeComputeCapacityTotalResourceLimitsGPU = "Node.Compute.Capacity.TotalResourceLimits.GPU"
const NodeComputeCapacityTotalResourceLimitsMemory = "Node.Compute.Capacity.TotalResourceLimits.Memory"
const NodeComputeControlPlaneSettings = "Node.Compute.ControlPlaneSettings"
const NodeComputeControlPlaneSettingsHeartbeatFrequency = "Node.Compute.ControlPlaneSettings.HeartbeatFrequency"
const NodeComputeControlPlaneSettingsHeartbeatTopic = "Node.Compute.ControlPlaneSettings.HeartbeatTopic"
const NodeComputeControlPlaneSettingsInfoUpdateFrequency = "Node.Compute.ControlPlaneSettings.InfoUpdateFrequency"
const NodeComputeControlPlaneSettingsResourceUpdateFrequency = "Node.Compute.ControlPlaneSettings.ResourceUpdateFrequency"
const NodeComputeExecutionStore = "Node.Compute.ExecutionStore"
const NodeComputeExecutionStorePath = "Node.Compute.ExecutionStore.Path"
const NodeComputeExecutionStoreType = "Node.Compute.ExecutionStore.Type"
const NodeComputeJobSelection = "Node.Compute.JobSelection"
const NodeComputeJobSelectionAcceptNetworkedJobs = "Node.Compute.JobSelection.AcceptNetworkedJobs"
const NodeComputeJobSelectionLocality = "Node.Compute.JobSelection.Locality"
const NodeComputeJobSelectionProbeExec = "Node.Compute.JobSelection.ProbeExec"
const NodeComputeJobSelectionProbeHTTP = "Node.Compute.JobSelection.ProbeHTTP"
const NodeComputeJobSelectionRejectStatelessJobs = "Node.Compute.JobSelection.RejectStatelessJobs"
const NodeComputeJobTimeouts = "Node.Compute.JobTimeouts"
const NodeComputeJobTimeoutsDefaultJobExecutionTimeout = "Node.Compute.JobTimeouts.DefaultJobExecutionTimeout"
const NodeComputeJobTimeoutsJobExecutionTimeoutClientIDBypassList = "Node.Compute.JobTimeouts.JobExecutionTimeoutClientIDBypassList"
const NodeComputeJobTimeoutsJobNegotiationTimeout = "Node.Compute.JobTimeouts.JobNegotiationTimeout"
const NodeComputeJobTimeoutsMaxJobExecutionTimeout = "Node.Compute.JobTimeouts.MaxJobExecutionTimeout"
const NodeComputeJobTimeoutsMinJobExecutionTimeout = "Node.Compute.JobTimeouts.MinJobExecutionTimeout"
const NodeComputeLocalPublisher = "Node.Compute.LocalPublisher"
const NodeComputeLocalPublisherAddress = "Node.Compute.LocalPublisher.Address"
const NodeComputeLocalPublisherDirectory = "Node.Compute.LocalPublisher.Directory"
const NodeComputeLocalPublisherPort = "Node.Compute.LocalPublisher.Port"
const NodeComputeLogStreamConfig = "Node.Compute.LogStreamConfig"
const NodeComputeLogStreamConfigChannelBufferSize = "Node.Compute.LogStreamConfig.ChannelBufferSize"
const NodeComputeLogging = "Node.Compute.Logging"
const NodeComputeLoggingLogRunningExecutionsInterval = "Node.Compute.Logging.LogRunningExecutionsInterval"
const NodeComputeManifestCache = "Node.Compute.ManifestCache"
const NodeComputeManifestCacheDuration = "Node.Compute.ManifestCache.Duration"
const NodeComputeManifestCacheFrequency = "Node.Compute.ManifestCache.Frequency"
const NodeComputeManifestCacheSize = "Node.Compute.ManifestCache.Size"
const NodeComputeStoragePath = "Node.ComputeStoragePath"
const NodeDisabledFeatures = "Node.DisabledFeatures"
const NodeDisabledFeaturesEngines = "Node.DisabledFeatures.Engines"
const NodeDisabledFeaturesPublishers = "Node.DisabledFeatures.Publishers"
const NodeDisabledFeaturesStorages = "Node.DisabledFeatures.Storages"
const NodeDownloadURLRequestRetries = "Node.DownloadURLRequestRetries"
const NodeDownloadURLRequestTimeout = "Node.DownloadURLRequestTimeout"
const NodeExecutorPluginPath = "Node.ExecutorPluginPath"
const NodeIPFS = "Node.IPFS"
const NodeIPFSConnect = "Node.IPFS.Connect"
const NodeLabels = "Node.Labels"
const NodeLoggingMode = "Node.LoggingMode"
const NodeName = "Node.Name"
const NodeNameProvider = "Node.NameProvider"
const NodeNetwork = "Node.Network"
const NodeNetworkAdvertisedAddress = "Node.Network.AdvertisedAddress"
const NodeNetworkAuthSecret = "Node.Network.AuthSecret"
const NodeNetworkCluster = "Node.Network.Cluster"
const NodeNetworkClusterAdvertisedAddress = "Node.Network.Cluster.AdvertisedAddress"
const NodeNetworkClusterName = "Node.Network.Cluster.Name"
const NodeNetworkClusterPeers = "Node.Network.Cluster.Peers"
const NodeNetworkClusterPort = "Node.Network.Cluster.Port"
const NodeNetworkOrchestrators = "Node.Network.Orchestrators"
const NodeNetworkPort = "Node.Network.Port"
const NodeNetworkStoreDir = "Node.Network.StoreDir"
const NodeRequester = "Node.Requester"
const NodeRequesterControlPlaneSettings = "Node.Requester.ControlPlaneSettings"
const NodeRequesterControlPlaneSettingsHeartbeatCheckFrequency = "Node.Requester.ControlPlaneSettings.HeartbeatCheckFrequency"
const NodeRequesterControlPlaneSettingsHeartbeatTopic = "Node.Requester.ControlPlaneSettings.HeartbeatTopic"
const NodeRequesterControlPlaneSettingsNodeDisconnectedAfter = "Node.Requester.ControlPlaneSettings.NodeDisconnectedAfter"
const NodeRequesterDefaultPublisher = "Node.Requester.DefaultPublisher"
const NodeRequesterEvaluationBroker = "Node.Requester.EvaluationBroker"
const NodeRequesterEvaluationBrokerEvalBrokerInitialRetryDelay = "Node.Requester.EvaluationBroker.EvalBrokerInitialRetryDelay"
const NodeRequesterEvaluationBrokerEvalBrokerMaxRetryCount = "Node.Requester.EvaluationBroker.EvalBrokerMaxRetryCount"
const NodeRequesterEvaluationBrokerEvalBrokerSubsequentRetryDelay = "Node.Requester.EvaluationBroker.EvalBrokerSubsequentRetryDelay"
const NodeRequesterEvaluationBrokerEvalBrokerVisibilityTimeout = "Node.Requester.EvaluationBroker.EvalBrokerVisibilityTimeout"
const NodeRequesterExternalVerifierHook = "Node.Requester.ExternalVerifierHook"
const NodeRequesterFailureInjectionConfig = "Node.Requester.FailureInjectionConfig"
const NodeRequesterFailureInjectionConfigIsBadActor = "Node.Requester.FailureInjectionConfig.IsBadActor"
const NodeRequesterHousekeepingBackgroundTaskInterval = "Node.Requester.HousekeepingBackgroundTaskInterval"
const NodeRequesterJobDefaults = "Node.Requester.JobDefaults"
const NodeRequesterJobDefaultsExecutionTimeout = "Node.Requester.JobDefaults.ExecutionTimeout"
const NodeRequesterJobDefaultsQueueTimeout = "Node.Requester.JobDefaults.QueueTimeout"
const NodeRequesterJobDefaultsTotalTimeout = "Node.Requester.JobDefaults.TotalTimeout"
const NodeRequesterJobSelectionPolicy = "Node.Requester.JobSelectionPolicy"
const NodeRequesterJobSelectionPolicyAcceptNetworkedJobs = "Node.Requester.JobSelectionPolicy.AcceptNetworkedJobs"
const NodeRequesterJobSelectionPolicyLocality = "Node.Requester.JobSelectionPolicy.Locality"
const NodeRequesterJobSelectionPolicyProbeExec = "Node.Requester.JobSelectionPolicy.ProbeExec"
const NodeRequesterJobSelectionPolicyProbeHTTP = "Node.Requester.JobSelectionPolicy.ProbeHTTP"
const NodeRequesterJobSelectionPolicyRejectStatelessJobs = "Node.Requester.JobSelectionPolicy.RejectStatelessJobs"
const NodeRequesterJobStore = "Node.Requester.JobStore"
const NodeRequesterJobStorePath = "Node.Requester.JobStore.Path"
const NodeRequesterJobStoreType = "Node.Requester.JobStore.Type"
const NodeRequesterManualNodeApproval = "Node.Requester.ManualNodeApproval"
const NodeRequesterNodeInfoStoreTTL = "Node.Requester.NodeInfoStoreTTL"
const NodeRequesterNodeRankRandomnessRange = "Node.Requester.NodeRankRandomnessRange"
const NodeRequesterOverAskForBidsFactor = "Node.Requester.OverAskForBidsFactor"
const NodeRequesterScheduler = "Node.Requester.Scheduler"
const NodeRequesterSchedulerNodeOverSubscriptionFactor = "Node.Requester.Scheduler.NodeOverSubscriptionFactor"
const NodeRequesterSchedulerQueueBackoff = "Node.Requester.Scheduler.QueueBackoff"
const NodeRequesterStorageProvider = "Node.Requester.StorageProvider"
const NodeRequesterStorageProviderS3 = "Node.Requester.StorageProvider.S3"
const NodeRequesterStorageProviderS3PreSignedURLDisabled = "Node.Requester.StorageProvider.S3.PreSignedURLDisabled"
const NodeRequesterStorageProviderS3PreSignedURLExpiration = "Node.Requester.StorageProvider.S3.PreSignedURLExpiration"
const NodeRequesterTagCache = "Node.Requester.TagCache"
const NodeRequesterTagCacheDuration = "Node.Requester.TagCache.Duration"
const NodeRequesterTagCacheFrequency = "Node.Requester.TagCache.Frequency"
const NodeRequesterTagCacheSize = "Node.Requester.TagCache.Size"
const NodeRequesterTranslationEnabled = "Node.Requester.TranslationEnabled"
const NodeRequesterWorker = "Node.Requester.Worker"
const NodeRequesterWorkerWorkerCount = "Node.Requester.Worker.WorkerCount"
const NodeRequesterWorkerWorkerEvalDequeueBaseBackoff = "Node.Requester.Worker.WorkerEvalDequeueBaseBackoff"
const NodeRequesterWorkerWorkerEvalDequeueMaxBackoff = "Node.Requester.Worker.WorkerEvalDequeueMaxBackoff"
const NodeRequesterWorkerWorkerEvalDequeueTimeout = "Node.Requester.Worker.WorkerEvalDequeueTimeout"
const NodeServerAPI = "Node.ServerAPI"
const NodeServerAPIClientTLS = "Node.ServerAPI.ClientTLS"
const NodeServerAPIClientTLSCACert = "Node.ServerAPI.ClientTLS.CACert"
const NodeServerAPIClientTLSInsecure = "Node.ServerAPI.ClientTLS.Insecure"
const NodeServerAPIClientTLSUseTLS = "Node.ServerAPI.ClientTLS.UseTLS"
const NodeServerAPIHost = "Node.ServerAPI.Host"
const NodeServerAPIPort = "Node.ServerAPI.Port"
const NodeServerAPITLS = "Node.ServerAPI.TLS"
const NodeServerAPITLSAutoCert = "Node.ServerAPI.TLS.AutoCert"
const NodeServerAPITLSAutoCertCachePath = "Node.ServerAPI.TLS.AutoCertCachePath"
const NodeServerAPITLSSelfSigned = "Node.ServerAPI.TLS.SelfSigned"
const NodeServerAPITLSServerCertificate = "Node.ServerAPI.TLS.ServerCertificate"
const NodeServerAPITLSServerKey = "Node.ServerAPI.TLS.ServerKey"
const NodeStrictVersionMatch = "Node.StrictVersionMatch"
const NodeType = "Node.Type"
const NodeVolumeSizeRequestTimeout = "Node.VolumeSizeRequestTimeout"
const NodeWebUI = "Node.WebUI"
const NodeWebUIEnabled = "Node.WebUI.Enabled"
const NodeWebUIPort = "Node.WebUI.Port"
const Update = "Update"
const UpdateCheckFrequency = "Update.CheckFrequency"
const UpdateCheckStatePath = "Update.CheckStatePath"
const UpdateSkipChecks = "Update.SkipChecks"
const User = "User"
const UserInstallationID = "User.InstallationID"
const UserKeyPath = "User.KeyPath"
Variables ¶
This section is empty.
Functions ¶
func Set ¶ added in v1.1.0
func Set(cfg BacalhauConfig, opts ...SetOption)
func SetDefaults ¶
func SetDefaults(cfg BacalhauConfig, opts ...SetOption)
Types ¶
type APIConfig ¶
type APIConfig struct { // Host is the hostname of an environment's public API servers. Host string `yaml:"Host"` // Port is the port that an environment serves the public API on. Port int `yaml:"Port"` // ClientTLS specifies tls options for the client connecting to the // API. ClientTLS ClientTLSConfig `yaml:"ClientTLS"` // TLS returns information about how TLS is configured for the public server. // This is only used in APIConfig for NodeConfig.ServerAPI TLS TLSConfiguration `yaml:"TLS"` }
type AuthConfig ¶ added in v1.2.1
type AuthConfig struct { // TokensPath is the location where a state file of tokens will be stored. // By default it will be local to the Bacalhau repo, but can be any location // in the host filesystem. Tokens are sensitive and should be stored in a // location that is only readable to the current user. TokensPath string `yaml:"TokensPath"` // 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"` // 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"` }
AuthConfig is config that controls user authentication and authorization.
type AuthenticatorConfig ¶ added in v1.2.1
type AuthenticatorConfig struct { Type authn.MethodType `yaml:"Type"` PolicyPath string `yaml:"PolicyPath,omitempty"` }
AuthenticationConfig 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 BacalhauConfig ¶
type BacalhauConfig struct { Node NodeConfig `yaml:"Node"` User UserConfig `yaml:"User"` Metrics MetricsConfig `yaml:"Metrics"` Update UpdateConfig `yaml:"UpdateConfig"` Auth AuthConfig `yaml:"Auth"` }
type CapacityConfig ¶
type CapacityConfig struct { IgnorePhysicalResourceLimits bool `yaml:"IgnorePhysicalResourceLimits"` // Total amount of resource the system can be using at one time in aggregate for all jobs. TotalResourceLimits models.ResourcesConfig `yaml:"TotalResourceLimits"` // Per job amount of resource the system can be using at one time. JobResourceLimits models.ResourcesConfig `yaml:"JobResourceLimits"` DefaultJobResourceLimits models.ResourcesConfig `yaml:"DefaultJobResourceLimits"` }
type ClientTLSConfig ¶ added in v1.2.1
type ClientTLSConfig struct { // Used for NodeConfig.ClientAPI, instructs the client to connect over // TLS. Auto enabled if Insecure or CACert are specified. UseTLS bool `yaml:"UseTLS"` // Used for NodeConfig.ClientAPI, specifies the location of a ca certificate // file (primarily for self-signed server certs). Will use HTTPS for requests. CACert string `yaml:"CACert"` // Used for NodeConfig.ClientAPI, and when true instructs the client to use // HTTPS, but not to attempt to verify the certificate. Insecure bool `yaml:"Insecure"` }
type ComputeConfig ¶
type ComputeConfig struct { Capacity CapacityConfig `yaml:"Capacity"` ExecutionStore JobStoreConfig `yaml:"ExecutionStore"` JobTimeouts JobTimeoutConfig `yaml:"JobTimeouts"` JobSelection models.JobSelectionPolicy `yaml:"JobSelection"` Logging LoggingConfig `yaml:"Logging"` ManifestCache DockerCacheConfig `yaml:"ManifestCache"` LogStreamConfig LogStreamConfig `yaml:"LogStream"` LocalPublisher LocalPublisherConfig `yaml:"LocalPublisher"` ControlPlaneSettings ComputeControlPlaneConfig `yaml:"ClusterTimeouts"` }
type ComputeControlPlaneConfig ¶ added in v1.3.1
type ComputeControlPlaneConfig struct { // The frequency with which the compute node will send node info (inc current labels) // to the controlling requester node. InfoUpdateFrequency Duration `yaml:"InfoUpdateFrequency"` // How often the compute node will send current resource availability to the requester node. ResourceUpdateFrequency Duration `yaml:"ResourceUpdateFrequency"` // How often the compute node will send a heartbeat to the requester node to let it know // that the compute node is still alive. This should be less than the requester's configured // heartbeat timeout to avoid flapping. HeartbeatFrequency Duration `yaml:"HeartbeatFrequency"` // This is the pubsub topic that the compute node will use to send heartbeats to the requester node. HeartbeatTopic string `yaml:"HeartbeatTopic"` }
type DockerCacheConfig ¶ added in v1.2.1
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 EvaluationBrokerConfig ¶
type EvaluationBrokerConfig struct { EvalBrokerVisibilityTimeout Duration `yaml:"EvalBrokerVisibilityTimeout"` EvalBrokerInitialRetryDelay Duration `yaml:"EvalBrokerInitialRetryDelay"` EvalBrokerSubsequentRetryDelay Duration `yaml:"EvalBrokerSubsequentRetryDelay"` EvalBrokerMaxRetryCount int `yaml:"EvalBrokerMaxRetryCount"` }
type FeatureConfig ¶
type IpfsConfig ¶
type IpfsConfig struct { // Connect is the multiaddress to connect to for IPFS. Connect string `yaml:"Connect"` }
type JobDefaults ¶ added in v1.1.0
type JobStoreConfig ¶ added in v1.1.4
type JobStoreConfig struct { Type StorageType `yaml:"Type"` Path string `yaml:"Path"` }
func (JobStoreConfig) Validate ¶ added in v1.2.3
func (cfg JobStoreConfig) Validate() error
type JobTimeoutConfig ¶
type JobTimeoutConfig struct { // JobExecutionTimeoutClientIDBypassList is the list of clients that are allowed to bypass the job execution timeout // check. JobExecutionTimeoutClientIDBypassList []string `yaml:"JobExecutionTimeoutClientIDBypassList"` // JobNegotiationTimeout default timeout value to hold a bid for a job JobNegotiationTimeout Duration `yaml:"JobNegotiationTimeout"` // MinJobExecutionTimeout default value for the minimum execution timeout this compute node supports. Jobs with // lower timeout requirements will not be bid on. MinJobExecutionTimeout Duration `yaml:"MinJobExecutionTimeout"` // MaxJobExecutionTimeout default value for the maximum execution timeout this compute node supports. Jobs with // higher timeout requirements will not be bid on. MaxJobExecutionTimeout Duration `yaml:"MaxJobExecutionTimeout"` // DefaultJobExecutionTimeout default value for the execution timeout this compute node will assign to jobs with // no timeout requirement defined. DefaultJobExecutionTimeout Duration `yaml:"DefaultJobExecutionTimeout"` }
type LocalPublisherConfig ¶ added in v1.2.2
type LogStreamConfig ¶ added in v1.2.2
type LogStreamConfig struct { // How many messages to buffer in the log stream channel, per stream ChannelBufferSize int `yaml:"ChannelBufferSize"` }
type LoggingConfig ¶
type LoggingConfig struct { // logging running executions LogRunningExecutionsInterval Duration `yaml:"LogRunningExecutionsInterval"` }
type MetricsConfig ¶
type MetricsConfig struct {
EventTracerPath string `yaml:"EventTracerPath"`
}
type NetworkClusterConfig ¶ added in v1.2.1
type NetworkConfig ¶ added in v1.2.1
type NodeConfig ¶
type NodeConfig struct { Name string `yaml:"Name"` NameProvider string `yaml:"NameProvider"` ClientAPI APIConfig `yaml:"ClientAPI"` ServerAPI APIConfig `yaml:"ServerAPI"` IPFS IpfsConfig `yaml:"IPFS"` Compute ComputeConfig `yaml:"Compute"` Requester RequesterConfig `yaml:"Requester"` DownloadURLRequestRetries int `yaml:"DownloadURLRequestRetries"` DownloadURLRequestTimeout Duration `yaml:"DownloadURLRequestTimeout"` VolumeSizeRequestTimeout Duration `yaml:"VolumeSizeRequestTimeout"` ExecutorPluginPath string `yaml:"ExecutorPluginPath"` // TODO(forrest) [refactor]: rename this to ExecutorStoragePath ComputeStoragePath string `yaml:"ComputeStoragePath"` LoggingMode logger.LogMode `yaml:"LoggingMode"` // Type is "compute", "requester" or both Type []string `yaml:"Type"` // Local paths that are allowed to be mounted into jobs AllowListedLocalPaths []string `yaml:"AllowListedLocalPaths"` // What features should not be enabled even if installed DisabledFeatures FeatureConfig `yaml:"DisabledFeatures"` // Labels to apply to the node that can be used for node selection and filtering Labels map[string]string `yaml:"Labels"` // Configuration for the web UI WebUI WebUIConfig `yaml:"WebUI"` Network NetworkConfig `yaml:"Network"` StrictVersionMatch bool `yaml:"StrictVersionMatch"` }
type RequesterConfig ¶
type RequesterConfig struct { JobDefaults JobDefaults `yaml:"JobDefaults"` // URL where to send external verification requests to. ExternalVerifierHook string `yaml:"ExternalVerifierHook"` // How the node decides what jobs to run. JobSelectionPolicy models.JobSelectionPolicy `yaml:"JobSelectionPolicy"` JobStore JobStoreConfig `yaml:"JobStore"` HousekeepingBackgroundTaskInterval Duration `yaml:"HousekeepingBackgroundTaskInterval"` NodeRankRandomnessRange int `yaml:"NodeRankRandomnessRange"` OverAskForBidsFactor uint `yaml:"OverAskForBidsFactor"` FailureInjectionConfig models.FailureInjectionRequesterConfig `yaml:"FailureInjectionConfig"` TranslationEnabled bool `yaml:"TranslationEnabled"` EvaluationBroker EvaluationBrokerConfig `yaml:"EvaluationBroker"` Worker WorkerConfig `yaml:"Worker"` Scheduler SchedulerConfig `yaml:"Scheduler"` StorageProvider StorageProviderConfig `yaml:"StorageProvider"` TagCache DockerCacheConfig `yaml:"TagCache"` DefaultPublisher string `yaml:"DefaultPublisher"` ControlPlaneSettings RequesterControlPlaneConfig `yaml:"ControlPlaneSettings"` NodeInfoStoreTTL Duration `yaml:"NodeInfoStoreTTL"` // ManualNodeApproval is a flag that determines if nodes should be manually approved or not. // By default, nodes are auto-approved to simplify upgrades, by setting this property to // true, nodes will need to be manually approved before they are included in node selection. ManualNodeApproval bool `yaml:"ManualNodeApproval"` }
type RequesterControlPlaneConfig ¶ added in v1.3.1
type RequesterControlPlaneConfig struct { // This setting is the time period after which a compute node is considered to be unresponsive. // If the compute node misses two of these frequencies, it will be marked as unknown. The compute // node should have a frequency setting less than this one to ensure that it does not keep // switching between unknown and active too frequently. HeartbeatCheckFrequency Duration `yaml:"HeartbeatFrequency"` // This is the pubsub topic that the compute node will use to send heartbeats to the requester node. HeartbeatTopic string `yaml:"HeartbeatTopic"` // This is the time period after which a compute node is considered to be disconnected. If the compute // node does not deliver a heartbeat every `NodeDisconnectedAfter` then it is considered disconnected. NodeDisconnectedAfter Duration `yaml:"NodeDisconnectedAfter"` }
type S3StorageProviderConfig ¶ added in v1.1.4
type SchedulerConfig ¶ added in v1.3.2
type StorageProviderConfig ¶ added in v1.1.4
type StorageProviderConfig struct {
S3 S3StorageProviderConfig `yaml:"S3"`
}
type StorageType ¶
type StorageType int64
const ( UnknownStorage StorageType = 0 BoltDB StorageType = 1 )
func ParseStorageType ¶
func ParseStorageType(s string) (ret StorageType, err error)
func (StorageType) MarshalYAML ¶
func (j StorageType) MarshalYAML() (interface{}, error)
func (StorageType) String ¶
func (i StorageType) String() string
func (*StorageType) UnmarshalText ¶
func (j *StorageType) UnmarshalText(text []byte) error
func (*StorageType) UnmarshalYAML ¶
func (j *StorageType) UnmarshalYAML(value *yaml.Node) error
type TLSConfiguration ¶
type TLSConfiguration struct { // AutoCert specifies a hostname for a certificate to be obtained via ACME. // This is only used by the server, and only by the requester node when it // has a publicly resolvable domain name. AutoCert string `yaml:"AutoCert"` // AutoCertCachePath specifies the directory where the autocert process // will cache certificates to avoid rate limits. AutoCertCachePath string `yaml:"AutoCertCachePath"` // ServerCertificate specifies the location of a TLS certificate to be used // by the requester to serve TLS requests ServerCertificate string `yaml:"ServerCertificate"` // ServerKey is the TLS server key to match the certificate to allow the // requester to server TLS. ServerKey string `yaml:"ServerKey"` // SelfSignedCert will auto-generate a self-signed certificate for the // requester node if TLS certificates have not been provided. SelfSigned bool `yaml:"SelfSigned"` }