types

package
v1.2.2-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Auth = "Auth"
View Source
const AuthAccessPolicyPath = "Auth.AccessPolicyPath"
View Source
const AuthMethods = "Auth.Methods"
View Source
const AuthTokensPath = "Auth.TokensPath"
View Source
const Metrics = "Metrics"
View Source
const MetricsEventTracerPath = "Metrics.EventTracerPath"
View Source
const MetricsLibp2pTracerPath = "Metrics.Libp2pTracerPath"
View Source
const Node = "Node"
View Source
const NodeAllowListedLocalPaths = "Node.AllowListedLocalPaths"
View Source
const NodeBootstrapAddresses = "Node.BootstrapAddresses"
View Source
const NodeClientAPI = "Node.ClientAPI"
View Source
const NodeClientAPIClientTLS = "Node.ClientAPI.ClientTLS"
View Source
const NodeClientAPIClientTLSCACert = "Node.ClientAPI.ClientTLS.CACert"
View Source
const NodeClientAPIClientTLSInsecure = "Node.ClientAPI.ClientTLS.Insecure"
View Source
const NodeClientAPIClientTLSUseTLS = "Node.ClientAPI.ClientTLS.UseTLS"
View Source
const NodeClientAPIHost = "Node.ClientAPI.Host"
View Source
const NodeClientAPIPort = "Node.ClientAPI.Port"
View Source
const NodeClientAPITLS = "Node.ClientAPI.TLS"
View Source
const NodeClientAPITLSAutoCert = "Node.ClientAPI.TLS.AutoCert"
View Source
const NodeClientAPITLSAutoCertCachePath = "Node.ClientAPI.TLS.AutoCertCachePath"
View Source
const NodeClientAPITLSServerCertificate = "Node.ClientAPI.TLS.ServerCertificate"
View Source
const NodeClientAPITLSServerKey = "Node.ClientAPI.TLS.ServerKey"
View Source
const NodeCompute = "Node.Compute"
View Source
const NodeComputeCapacity = "Node.Compute.Capacity"
View Source
const NodeComputeCapacityDefaultJobResourceLimits = "Node.Compute.Capacity.DefaultJobResourceLimits"
View Source
const NodeComputeCapacityDefaultJobResourceLimitsCPU = "Node.Compute.Capacity.DefaultJobResourceLimits.CPU"
View Source
const NodeComputeCapacityDefaultJobResourceLimitsDisk = "Node.Compute.Capacity.DefaultJobResourceLimits.Disk"
View Source
const NodeComputeCapacityDefaultJobResourceLimitsGPU = "Node.Compute.Capacity.DefaultJobResourceLimits.GPU"
View Source
const NodeComputeCapacityDefaultJobResourceLimitsMemory = "Node.Compute.Capacity.DefaultJobResourceLimits.Memory"
View Source
const NodeComputeCapacityIgnorePhysicalResourceLimits = "Node.Compute.Capacity.IgnorePhysicalResourceLimits"
View Source
const NodeComputeCapacityJobResourceLimits = "Node.Compute.Capacity.JobResourceLimits"
View Source
const NodeComputeCapacityJobResourceLimitsCPU = "Node.Compute.Capacity.JobResourceLimits.CPU"
View Source
const NodeComputeCapacityJobResourceLimitsDisk = "Node.Compute.Capacity.JobResourceLimits.Disk"
View Source
const NodeComputeCapacityJobResourceLimitsGPU = "Node.Compute.Capacity.JobResourceLimits.GPU"
View Source
const NodeComputeCapacityJobResourceLimitsMemory = "Node.Compute.Capacity.JobResourceLimits.Memory"
View Source
const NodeComputeCapacityQueueResourceLimits = "Node.Compute.Capacity.QueueResourceLimits"
View Source
const NodeComputeCapacityQueueResourceLimitsCPU = "Node.Compute.Capacity.QueueResourceLimits.CPU"
View Source
const NodeComputeCapacityQueueResourceLimitsDisk = "Node.Compute.Capacity.QueueResourceLimits.Disk"
View Source
const NodeComputeCapacityQueueResourceLimitsGPU = "Node.Compute.Capacity.QueueResourceLimits.GPU"
View Source
const NodeComputeCapacityQueueResourceLimitsMemory = "Node.Compute.Capacity.QueueResourceLimits.Memory"
View Source
const NodeComputeCapacityTotalResourceLimits = "Node.Compute.Capacity.TotalResourceLimits"
View Source
const NodeComputeCapacityTotalResourceLimitsCPU = "Node.Compute.Capacity.TotalResourceLimits.CPU"
View Source
const NodeComputeCapacityTotalResourceLimitsDisk = "Node.Compute.Capacity.TotalResourceLimits.Disk"
View Source
const NodeComputeCapacityTotalResourceLimitsGPU = "Node.Compute.Capacity.TotalResourceLimits.GPU"
View Source
const NodeComputeCapacityTotalResourceLimitsMemory = "Node.Compute.Capacity.TotalResourceLimits.Memory"
View Source
const NodeComputeExecutionStore = "Node.Compute.ExecutionStore"
View Source
const NodeComputeExecutionStorePath = "Node.Compute.ExecutionStore.Path"
View Source
const NodeComputeExecutionStoreType = "Node.Compute.ExecutionStore.Type"
View Source
const NodeComputeJobSelection = "Node.Compute.JobSelection"
View Source
const NodeComputeJobSelectionAcceptNetworkedJobs = "Node.Compute.JobSelection.AcceptNetworkedJobs"
View Source
const NodeComputeJobSelectionLocality = "Node.Compute.JobSelection.Locality"
View Source
const NodeComputeJobSelectionProbeExec = "Node.Compute.JobSelection.ProbeExec"
View Source
const NodeComputeJobSelectionProbeHTTP = "Node.Compute.JobSelection.ProbeHTTP"
View Source
const NodeComputeJobSelectionRejectStatelessJobs = "Node.Compute.JobSelection.RejectStatelessJobs"
View Source
const NodeComputeJobTimeouts = "Node.Compute.JobTimeouts"
View Source
const NodeComputeJobTimeoutsDefaultJobExecutionTimeout = "Node.Compute.JobTimeouts.DefaultJobExecutionTimeout"
View Source
const NodeComputeJobTimeoutsJobExecutionTimeoutClientIDBypassList = "Node.Compute.JobTimeouts.JobExecutionTimeoutClientIDBypassList"
View Source
const NodeComputeJobTimeoutsJobNegotiationTimeout = "Node.Compute.JobTimeouts.JobNegotiationTimeout"
View Source
const NodeComputeJobTimeoutsMaxJobExecutionTimeout = "Node.Compute.JobTimeouts.MaxJobExecutionTimeout"
View Source
const NodeComputeJobTimeoutsMinJobExecutionTimeout = "Node.Compute.JobTimeouts.MinJobExecutionTimeout"
View Source
const NodeComputeLocalPublisher = "Node.Compute.LocalPublisher"
View Source
const NodeComputeLocalPublisherAddress = "Node.Compute.LocalPublisher.Address"
View Source
const NodeComputeLocalPublisherDirectory = "Node.Compute.LocalPublisher.Directory"
View Source
const NodeComputeLocalPublisherPort = "Node.Compute.LocalPublisher.Port"
View Source
const NodeComputeLogStreamConfig = "Node.Compute.LogStreamConfig"
View Source
const NodeComputeLogStreamConfigChannelBufferSize = "Node.Compute.LogStreamConfig.ChannelBufferSize"
View Source
const NodeComputeLogging = "Node.Compute.Logging"
View Source
const NodeComputeLoggingLogRunningExecutionsInterval = "Node.Compute.Logging.LogRunningExecutionsInterval"
View Source
const NodeComputeManifestCache = "Node.Compute.ManifestCache"
View Source
const NodeComputeManifestCacheDuration = "Node.Compute.ManifestCache.Duration"
View Source
const NodeComputeManifestCacheFrequency = "Node.Compute.ManifestCache.Frequency"
View Source
const NodeComputeManifestCacheSize = "Node.Compute.ManifestCache.Size"
View Source
const NodeComputeQueue = "Node.Compute.Queue"
View Source
const NodeComputeStoragePath = "Node.ComputeStoragePath"
View Source
const NodeDisabledFeatures = "Node.DisabledFeatures"
View Source
const NodeDisabledFeaturesEngines = "Node.DisabledFeatures.Engines"
View Source
const NodeDisabledFeaturesPublishers = "Node.DisabledFeatures.Publishers"
View Source
const NodeDisabledFeaturesStorages = "Node.DisabledFeatures.Storages"
View Source
const NodeDownloadURLRequestRetries = "Node.DownloadURLRequestRetries"
View Source
const NodeDownloadURLRequestTimeout = "Node.DownloadURLRequestTimeout"
View Source
const NodeExecutorPluginPath = "Node.ExecutorPluginPath"
View Source
const NodeIPFS = "Node.IPFS"
View Source
const NodeIPFSAPIListenAddresses = "Node.IPFS.APIListenAddresses"
View Source
const NodeIPFSConnect = "Node.IPFS.Connect"
View Source
const NodeIPFSGatewayListenAddresses = "Node.IPFS.GatewayListenAddresses"
View Source
const NodeIPFSPrivateInternal = "Node.IPFS.PrivateInternal"
View Source
const NodeIPFSProfile = "Node.IPFS.Profile"
View Source
const NodeIPFSServePath = "Node.IPFS.ServePath"
View Source
const NodeIPFSSwarmAddresses = "Node.IPFS.SwarmAddresses"
View Source
const NodeIPFSSwarmKeyPath = "Node.IPFS.SwarmKeyPath"
View Source
const NodeIPFSSwarmListenAddresses = "Node.IPFS.SwarmListenAddresses"
View Source
const NodeLabels = "Node.Labels"
View Source
const NodeLibp2p = "Node.Libp2p"
View Source
const NodeLibp2pPeerConnect = "Node.Libp2p.PeerConnect"
View Source
const NodeLibp2pSwarmPort = "Node.Libp2p.SwarmPort"
View Source
const NodeLoggingMode = "Node.LoggingMode"
View Source
const NodeName = "Node.Name"
View Source
const NodeNameProvider = "Node.NameProvider"
View Source
const NodeNetwork = "Node.Network"
View Source
const NodeNetworkAdvertisedAddress = "Node.Network.AdvertisedAddress"
View Source
const NodeNetworkAuthSecret = "Node.Network.AuthSecret"
View Source
const NodeNetworkCluster = "Node.Network.Cluster"
View Source
const NodeNetworkClusterAdvertisedAddress = "Node.Network.Cluster.AdvertisedAddress"
View Source
const NodeNetworkClusterName = "Node.Network.Cluster.Name"
View Source
const NodeNetworkClusterPeers = "Node.Network.Cluster.Peers"
View Source
const NodeNetworkClusterPort = "Node.Network.Cluster.Port"
View Source
const NodeNetworkOrchestrators = "Node.Network.Orchestrators"
View Source
const NodeNetworkPort = "Node.Network.Port"
View Source
const NodeNetworkStoreDir = "Node.Network.StoreDir"
View Source
const NodeNetworkType = "Node.Network.Type"
View Source
const NodeNodeInfoStoreTTL = "Node.NodeInfoStoreTTL"
View Source
const NodeRequester = "Node.Requester"
View Source
const NodeRequesterDefaultPublisher = "Node.Requester.DefaultPublisher"
View Source
const NodeRequesterEvaluationBroker = "Node.Requester.EvaluationBroker"
View Source
const NodeRequesterEvaluationBrokerEvalBrokerInitialRetryDelay = "Node.Requester.EvaluationBroker.EvalBrokerInitialRetryDelay"
View Source
const NodeRequesterEvaluationBrokerEvalBrokerMaxRetryCount = "Node.Requester.EvaluationBroker.EvalBrokerMaxRetryCount"
View Source
const NodeRequesterEvaluationBrokerEvalBrokerSubsequentRetryDelay = "Node.Requester.EvaluationBroker.EvalBrokerSubsequentRetryDelay"
View Source
const NodeRequesterEvaluationBrokerEvalBrokerVisibilityTimeout = "Node.Requester.EvaluationBroker.EvalBrokerVisibilityTimeout"
View Source
const NodeRequesterExternalVerifierHook = "Node.Requester.ExternalVerifierHook"
View Source
const NodeRequesterFailureInjectionConfig = "Node.Requester.FailureInjectionConfig"
View Source
const NodeRequesterFailureInjectionConfigIsBadActor = "Node.Requester.FailureInjectionConfig.IsBadActor"
View Source
const NodeRequesterHousekeepingBackgroundTaskInterval = "Node.Requester.HousekeepingBackgroundTaskInterval"
View Source
const NodeRequesterJobDefaults = "Node.Requester.JobDefaults"
View Source
const NodeRequesterJobDefaultsExecutionTimeout = "Node.Requester.JobDefaults.ExecutionTimeout"
View Source
const NodeRequesterJobSelectionPolicy = "Node.Requester.JobSelectionPolicy"
View Source
const NodeRequesterJobSelectionPolicyAcceptNetworkedJobs = "Node.Requester.JobSelectionPolicy.AcceptNetworkedJobs"
View Source
const NodeRequesterJobSelectionPolicyLocality = "Node.Requester.JobSelectionPolicy.Locality"
View Source
const NodeRequesterJobSelectionPolicyProbeExec = "Node.Requester.JobSelectionPolicy.ProbeExec"
View Source
const NodeRequesterJobSelectionPolicyProbeHTTP = "Node.Requester.JobSelectionPolicy.ProbeHTTP"
View Source
const NodeRequesterJobSelectionPolicyRejectStatelessJobs = "Node.Requester.JobSelectionPolicy.RejectStatelessJobs"
View Source
const NodeRequesterJobStore = "Node.Requester.JobStore"
View Source
const NodeRequesterJobStorePath = "Node.Requester.JobStore.Path"
View Source
const NodeRequesterJobStoreType = "Node.Requester.JobStore.Type"
View Source
const NodeRequesterNodeRankRandomnessRange = "Node.Requester.NodeRankRandomnessRange"
View Source
const NodeRequesterOverAskForBidsFactor = "Node.Requester.OverAskForBidsFactor"
View Source
const NodeRequesterStorageProvider = "Node.Requester.StorageProvider"
View Source
const NodeRequesterStorageProviderS3 = "Node.Requester.StorageProvider.S3"
View Source
const NodeRequesterStorageProviderS3PreSignedURLDisabled = "Node.Requester.StorageProvider.S3.PreSignedURLDisabled"
View Source
const NodeRequesterStorageProviderS3PreSignedURLExpiration = "Node.Requester.StorageProvider.S3.PreSignedURLExpiration"
View Source
const NodeRequesterTagCache = "Node.Requester.TagCache"
View Source
const NodeRequesterTagCacheDuration = "Node.Requester.TagCache.Duration"
View Source
const NodeRequesterTagCacheFrequency = "Node.Requester.TagCache.Frequency"
View Source
const NodeRequesterTagCacheSize = "Node.Requester.TagCache.Size"
View Source
const NodeRequesterTranslationEnabled = "Node.Requester.TranslationEnabled"
View Source
const NodeRequesterWorker = "Node.Requester.Worker"
View Source
const NodeRequesterWorkerWorkerCount = "Node.Requester.Worker.WorkerCount"
View Source
const NodeRequesterWorkerWorkerEvalDequeueBaseBackoff = "Node.Requester.Worker.WorkerEvalDequeueBaseBackoff"
View Source
const NodeRequesterWorkerWorkerEvalDequeueMaxBackoff = "Node.Requester.Worker.WorkerEvalDequeueMaxBackoff"
View Source
const NodeRequesterWorkerWorkerEvalDequeueTimeout = "Node.Requester.Worker.WorkerEvalDequeueTimeout"
View Source
const NodeServerAPI = "Node.ServerAPI"
View Source
const NodeServerAPIClientTLS = "Node.ServerAPI.ClientTLS"
View Source
const NodeServerAPIClientTLSCACert = "Node.ServerAPI.ClientTLS.CACert"
View Source
const NodeServerAPIClientTLSInsecure = "Node.ServerAPI.ClientTLS.Insecure"
View Source
const NodeServerAPIClientTLSUseTLS = "Node.ServerAPI.ClientTLS.UseTLS"
View Source
const NodeServerAPIHost = "Node.ServerAPI.Host"
View Source
const NodeServerAPIPort = "Node.ServerAPI.Port"
View Source
const NodeServerAPITLS = "Node.ServerAPI.TLS"
View Source
const NodeServerAPITLSAutoCert = "Node.ServerAPI.TLS.AutoCert"
View Source
const NodeServerAPITLSAutoCertCachePath = "Node.ServerAPI.TLS.AutoCertCachePath"
View Source
const NodeServerAPITLSServerCertificate = "Node.ServerAPI.TLS.ServerCertificate"
View Source
const NodeServerAPITLSServerKey = "Node.ServerAPI.TLS.ServerKey"
View Source
const NodeStrictVersionMatch = "Node.StrictVersionMatch"
View Source
const NodeType = "Node.Type"
View Source
const NodeVolumeSizeRequestTimeout = "Node.VolumeSizeRequestTimeout"
View Source
const NodeWebUI = "Node.WebUI"
View Source
const NodeWebUIEnabled = "Node.WebUI.Enabled"
View Source
const NodeWebUIPort = "Node.WebUI.Port"
View Source
const Update = "Update"
View Source
const UpdateCheckFrequency = "Update.CheckFrequency"
View Source
const UpdateCheckStatePath = "Update.CheckStatePath"
View Source
const UpdateSkipChecks = "Update.SkipChecks"
View Source
const User = "User"
View Source
const UserInstallationID = "User.InstallationID"
View Source
const UserKeyPath = "User.KeyPath"
View Source
const UserLibp2pKeyPath = "User.Libp2pKeyPath"

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"`
	QueueResourceLimits      models.ResourcesConfig `yaml:"QueueResourceLimits"`
}

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    model.JobSelectionPolicy `yaml:"JobSelection"`
	Queue           QueueConfig              `yaml:"Queue"`
	Logging         LoggingConfig            `yaml:"Logging"`
	ManifestCache   DockerCacheConfig        `yaml:"ManifestCache"`
	LogStreamConfig LogStreamConfig          `yaml:"LogStream"`
	LocalPublisher  LocalPublisherConfig     `yaml:"LocalPublisher"`
}

type DockerCacheConfig added in v1.2.1

type DockerCacheConfig struct {
	Size      uint64   `yaml:"Size"`
	Duration  Duration `yaml:"Duration"`
	Frequency Duration `yaml:"Frequency"`
}

type Duration

type Duration time.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

func (dur Duration) AsTimeDuration() time.Duration

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:

  1. our config file is yaml, and we want to use durations for configuring things, printed in a human-readable format.
  2. time.Duration does not, and will not implement MarshalText/UnmarshalText - https://github.com/golang/go/issues/16039
  3. 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 (dur Duration) MarshalText() ([]byte, error)

func (Duration) String

func (dur Duration) String() string

func (*Duration) UnmarshalText

func (dur *Duration) UnmarshalText(text []byte) error

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 FeatureConfig struct {
	Engines    []string `yaml:"Engines"`
	Publishers []string `yaml:"Publishers"`
	Storages   []string `yaml:"Storages"`
}

type IpfsConfig

type IpfsConfig struct {
	// Connect is the multiaddress to connect to for IPFS.
	Connect string `yaml:"Connect"`
	// Whether the in-process IPFS should automatically discover other IPFS nodes
	PrivateInternal bool `yaml:"PrivateInternal"`
	// IPFS multiaddresses that the in-process IPFS should connect to
	// TODO call this Peers, its peers the node will try and stay connected to.
	SwarmAddresses []string `yaml:"SwarmAddresses"`
	// Optional IPFS swarm key required to connect to a private IPFS swarm
	SwarmKeyPath string `yaml:"SwarmKeyPath"`
	// Path of the IPFS repo
	ServePath string `yaml:"ServePath"`

	Profile                string   `yaml:"Profile"`
	SwarmListenAddresses   []string `yaml:"SwarmListenAddresses"`
	GatewayListenAddresses []string `yaml:"GatewayListenAddresses"`
	APIListenAddresses     []string `yaml:"APIListenAddresses"`
}

func (IpfsConfig) GetSwarmAddresses

func (cfg IpfsConfig) GetSwarmAddresses() []string

Due to a bug in Viper (https://github.com/spf13/viper/issues/380), string slice values can be comma-separated as a command-line flag but not as an environment variable. This getter exists to handle the case where swarm addresses that are meant to be comma-separated end up in the first item.

type JobDefaults added in v1.1.0

type JobDefaults struct {
	ExecutionTimeout Duration `yaml:"ExecutionTimeout"`
}

type JobStoreConfig added in v1.1.4

type JobStoreConfig struct {
	Type StorageType `yaml:"Type"`
	Path string      `yaml:"Path"`
}

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 Libp2pConfig

type Libp2pConfig struct {
	SwarmPort int `yaml:"SwarmPort"`
	// PeerConnect is the libp2p multiaddress to connect to.
	PeerConnect string `yaml:"PeerConnect"`
}

type LocalPublisherConfig added in v1.2.2

type LocalPublisherConfig struct {
	Address   string `yaml:"Address"`
	Port      int    `yaml:"Port"`
	Directory string `yaml:"Directory"`
}

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 {
	Libp2pTracerPath string `yaml:"Libp2PTracerPath"`
	EventTracerPath  string `yaml:"EventTracerPath"`
}

type NetworkClusterConfig added in v1.2.1

type NetworkClusterConfig struct {
	Name              string   `yaml:"Name"`
	Port              int      `yaml:"Port"`
	AdvertisedAddress string   `yaml:"AdvertisedAddress"`
	Peers             []string `yaml:"Peers"`
}

type NetworkConfig added in v1.2.1

type NetworkConfig struct {
	Type              string               `yaml:"Type"`
	Port              int                  `yaml:"Port"`
	AdvertisedAddress string               `yaml:"AdvertisedAddress"`
	AuthSecret        string               `yaml:"AuthSecret"`
	Orchestrators     []string             `yaml:"Orchestrators"`
	StoreDir          string               `yaml:"StoreDir"`
	Cluster           NetworkClusterConfig `yaml:"Cluster"`
}

type NodeConfig

type NodeConfig struct {
	Name         string       `yaml:"Name"`
	NameProvider string       `yaml:"NameProvider"`
	ClientAPI    APIConfig    `yaml:"ClientAPI"`
	ServerAPI    APIConfig    `yaml:"ServerAPI"`
	Libp2p       Libp2pConfig `yaml:"Libp2P"`
	IPFS         IpfsConfig   `yaml:"IPFS"`

	Compute   ComputeConfig   `yaml:"Compute"`
	Requester RequesterConfig `yaml:"Requester"`

	// BootstrapAddresses is a list of bacalhau addresses for bootstrapping new local nodes.
	BootstrapAddresses []string `yaml:"BootstrapAddresses"`

	DownloadURLRequestRetries int      `yaml:"DownloadURLRequestRetries"`
	DownloadURLRequestTimeout Duration `yaml:"DownloadURLRequestTimeout"`
	VolumeSizeRequestTimeout  Duration `yaml:"VolumeSizeRequestTimeout"`
	NodeInfoStoreTTL          Duration `yaml:"NodeInfoStoreTTL"`

	ExecutorPluginPath string `yaml:"ExecutorPluginPath"`

	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 QueueConfig

type QueueConfig struct {
}

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 model.JobSelectionPolicy `yaml:"JobSelectionPolicy"`
	JobStore           JobStoreConfig           `yaml:"JobStore"`

	HousekeepingBackgroundTaskInterval Duration                              `yaml:"HousekeepingBackgroundTaskInterval"`
	NodeRankRandomnessRange            int                                   `yaml:"NodeRankRandomnessRange"`
	OverAskForBidsFactor               uint                                  `yaml:"OverAskForBidsFactor"`
	FailureInjectionConfig             model.FailureInjectionRequesterConfig `yaml:"FailureInjectionConfig"`

	TranslationEnabled bool `yaml:"TranslationEnabled"`

	EvaluationBroker EvaluationBrokerConfig `yaml:"EvaluationBroker"`
	Worker           WorkerConfig           `yaml:"Worker"`
	StorageProvider  StorageProviderConfig  `yaml:"StorageProvider"`

	TagCache         DockerCacheConfig `yaml:"TagCache"`
	DefaultPublisher string            `yaml:"DefaultPublisher"`
}

type S3StorageProviderConfig added in v1.1.4

type S3StorageProviderConfig struct {
	PreSignedURLDisabled   bool     `yaml:"PreSignedURLDisabled"`
	PreSignedURLExpiration Duration `yaml:"PreSignedURLExpiration"`
}

type SetOption added in v1.2.0

type SetOption func(p *SetParams)

func WithViper added in v1.2.0

func WithViper(v *viper.Viper) SetOption

type SetParams added in v1.2.0

type SetParams struct {
	Viper *viper.Viper
}

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:"ServerTLSKey"`
}

type UpdateConfig added in v1.1.2

type UpdateConfig struct {
	SkipChecks     bool     `yaml:"SkipChecks"`
	CheckStatePath string   `yaml:"StatePath"`
	CheckFrequency Duration `yaml:"CheckFrequency"`
}

type UserConfig

type UserConfig struct {
	KeyPath        string `yaml:"KeyPath"`
	Libp2pKeyPath  string `yaml:"Libp2PKeyPath"`
	InstallationID string `yaml:"InstallationID"`
}

type WebUIConfig added in v1.2.1

type WebUIConfig struct {
	Enabled bool `yaml:"Enabled"`
	Port    int  `yaml:"Port"`
}

type WorkerConfig

type WorkerConfig struct {
	WorkerCount                  int      `yaml:"WorkerCount"`
	WorkerEvalDequeueTimeout     Duration `yaml:"WorkerEvalDequeueTimeout"`
	WorkerEvalDequeueBaseBackoff Duration `yaml:"WorkerEvalDequeueBaseBackoff"`
	WorkerEvalDequeueMaxBackoff  Duration `yaml:"WorkerEvalDequeueMaxBackoff"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL