Documentation ¶
Index ¶
- Constants
- func EmitEvent(ctx context.Context, event *Event)
- func SetupAnalyticsProvider(ctx context.Context, opts ...Option) error
- func ShutdownAnalyticsProvider(ctx context.Context) error
- type Config
- type Event
- type EventType
- type ExecutionComputeMessage
- type ExecutionEvent
- type GPUInfo
- type JobTerminalEvent
- type Option
- type Resource
- type SubmitJobEvent
Constants ¶
View Source
const ( NodeInstallationIDKey = "installation_id" NodeInstanceIDKey = "instance_id" NodeIDKey = "node_id" NodeTypeKey = "node_type" NodeVersionKey = "node_version" )
View Source
const ComputeMessageExecutionEventType = "bacalhau.execution_v1.compute_message"
View Source
const CreatedExecutionEventType = "bacalhau.execution_v1.create"
View Source
const DefaultOtelCollectorEndpoint = "t.bacalhau.org:4317"
View Source
const ProviderKey = "bacalhau-analytics"
View Source
const SubmitJobEventType = "bacalhau.job_v1.submit"
SubmitJobEventType is the event type for a job that has been submitted to an orchestrator.
View Source
const TerminalExecutionEventType = "bacalhau.execution_v1.terminal"
View Source
const TerminalJobEventType = "bacalhau.job_v1.terminal"
TerminalJobEventType is the event type for a job that has reached a terminal state.
Variables ¶
This section is empty.
Functions ¶
func SetupAnalyticsProvider ¶
Types ¶
type Event ¶
func NewJobTerminalEvent ¶
type ExecutionComputeMessage ¶
type ExecutionEvent ¶
type ExecutionEvent struct { JobID string `json:"job_id,omitempty"` ExecutionID string `json:"execution_id,omitempty"` EvalID string `json:"evaluation_id,omitempty"` NameSet bool `json:"name_set,omitempty"` NodeNameHash string `json:"node_name_hash,omitempty"` NamespaceHash string `json:"namespace_hash,omitempty"` Resources map[string]Resource `json:"resources,omitempty"` DesiredState string `json:"desired_state,omitempty"` DesiredStateErrorCode string `json:"desired_state_error_code,omitempty"` ComputeState string `json:"compute_state,omitempty"` ComputeStateErrorCode string `json:"compute_state_error_code,omitempty"` PublishedResultType string `json:"publisher_type,omitempty"` RunResultStdoutTruncated bool `json:"run_result_stdout_truncated,omitempty"` RunResultStderrTruncated bool `json:"run_result_stderr_truncated,omitempty"` RunResultExitCode int `json:"run_result_exit_code,omitempty"` PreviousExecution string `json:"previous_execution,omitempty"` NextExecution string `json:"next_execution,omitempty"` FollowupEvalID string `json:"followup_eval_id,omitempty"` Revision uint64 `json:"revision,omitempty"` CreateTime time.Time `json:"create_time,omitempty"` ModifyTime time.Time `json:"modify_time,omitempty"` }
type JobTerminalEvent ¶
type JobTerminalEvent struct { JobID string `json:"job_id"` NameSet bool `json:"name_set"` NamespaceHash string `json:"namespace_hash"` Type string `json:"type"` Count int `json:"count"` LabelsCount int `json:"labels_count"` MetaCount int `json:"meta_count"` State string `json:"state"` Version uint64 `json:"version"` Revision uint64 `json:"revision"` CreateTime time.Time `json:"create_time"` ModifyTime time.Time `json:"modify_time"` TaskNameHash string `json:"task_name_hash"` TaskEngineType string `json:"task_engine_type"` TaskPublisherType string `json:"task_publisher_type"` TaskEnvVarCount int `json:"task_env_var_count"` TaskMetaCount int `json:"task_meta_count"` TaskInputSourceTypes []string `json:"task_input_source_types"` TaskResultPathCount int `json:"task_result_path_count"` Resources Resource `json:"resources,omitempty"` TaskNetworkType string `json:"task_network_type"` TaskDomainsCount int `json:"task_domains_count"` TaskExecutionTimeout int64 `json:"task_execution_timeout"` TaskQueueTimeout int64 `json:"task_queue_timeout"` TaskTotalTimeout int64 `json:"task_total_timeout"` }
type Option ¶
type Option func(*Config)
func WithEndpoint ¶
func WithInstallationID ¶
func WithInstanceID ¶
func WithNodeNodeID ¶
func WithNodeType ¶
func WithVersion ¶
func WithVersion(bv *models.BuildVersionInfo) Option
type SubmitJobEvent ¶
type SubmitJobEvent struct { JobID string `json:"job_id"` NameSet bool `json:"name_set"` NamespaceHash string `json:"namespace_hash"` Type string `json:"type"` Count int `json:"count"` LabelsCount int `json:"labels_count"` MetaCount int `json:"meta_count"` Version uint64 `json:"version"` Revision uint64 `json:"revision"` CreateTime time.Time `json:"create_time"` ModifyTime time.Time `json:"modify_time"` TaskNameHash string `json:"task_name_hash"` TaskEngineType string `json:"task_engine_type"` TaskPublisherType string `json:"task_publisher_type"` TaskEnvVarCount int `json:"task_env_var_count"` TaskMetaCount int `json:"task_meta_count"` TaskInputSourceTypes []string `json:"task_input_source_types"` TaskResultPathCount int `json:"task_result_path_count"` Resources Resource `json:"resources,omitempty"` TaskNetworkType string `json:"task_network_type"` TaskDomainsCount int `json:"task_domains_count"` TaskExecutionTimeout int64 `json:"task_execution_timeout"` TaskQueueTimeout int64 `json:"task_queue_timeout"` TaskTotalTimeout int64 `json:"task_total_timeout"` Warnings []string `json:"warnings"` Error string `json:"error"` }
func NewSubmitJobEvent ¶
func NewSubmitJobEvent(j models.Job, warnings ...string) SubmitJobEvent
Click to show internal directories.
Click to hide internal directories.