temporal

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServerTaskQueue = "fallbck-server-queue"
)

Variables

This section is empty.

Functions

func CheckHealth

func CheckHealth(ctx context.Context, c client.Client) error

CheckHealth verifies connection to Temporal cluster

func DialWithRetry

func DialWithRetry(ctx context.Context, dial func() (client.Client, error)) (client.Client, error)

DialWithRetry retries dial until it succeeds or ctx expires

func NewClient

func NewClient(cfg config.TemporalConfig) (client.Client, error)

NewClient initializes a Temporal SDK client for an external cluster, with optional (m)TLS

func NewLoopbackClient

func NewLoopbackClient(hostPort, namespace string) (client.Client, error)

NewLoopbackClient connects to the embedded (loopback, plaintext) Temporal frontend

Types

type BackupExecutionResult

type BackupExecutionResult struct {
	Status        db.RunStatus  `json:"status"`
	BytesScanned  int64         `json:"bytes_scanned"`
	BytesUploaded int64         `json:"bytes_uploaded"`
	DedupRatio    float64       `json:"dedup_ratio"`
	ChunkCount    int           `json:"chunk_count"`
	SnapshotID    string        `json:"snapshot_id"`
	ErrorMessage  string        `json:"error_message,omitempty"`
	Duration      time.Duration `json:"duration"`
}

BackupExecutionResult contains the outcome and metrics of a backup run

type BackupHeartbeatProgress

type BackupHeartbeatProgress struct {
	CurrentFile   string  `json:"current_file"`
	BytesScanned  int64   `json:"bytes_scanned"`
	BytesUploaded int64   `json:"bytes_uploaded"`
	Percent       float64 `json:"percent"`
}

BackupHeartbeatProgress is sent periodically during execution

type BackupSessionInfo

type BackupSessionInfo struct {
	JobID           uuid.UUID          `json:"job_id"`
	AgentID         uuid.UUID          `json:"agent_id"`
	TargetID        uuid.UUID          `json:"target_id"`
	AgentTaskQueue  string             `json:"agent_task_queue"`
	ProxyURL        string             `json:"proxy_url"`
	Ticket          string             `json:"ticket"`
	Datastore       string             `json:"datastore"`
	Namespace       string             `json:"namespace"`
	BackupPaths     []string           `json:"backup_paths"`
	ExcludePaths    []string           `json:"exclude_paths"`
	RetentionPolicy db.RetentionPolicy `json:"retention_policy"`
	WorkflowID      string             `json:"workflow_id"`
	RunID           string             `json:"run_id"`
	BackupRunID     uuid.UUID          `json:"backup_run_id"`
}

BackupSessionInfo carries all configuration needed for a worker to execute a backup

type ServerWorker

type ServerWorker struct {
	// contains filtered or unexported fields
}

ServerWorker manages the Temporal worker for server workflows and server activities

func NewServerWorker

func NewServerWorker(c client.Client, database *db.DB, cfg *config.ServerConfig, tm *auth.TokenManager) *ServerWorker

NewServerWorker initializes the server-side Temporal workflow and activity worker

func (*ServerWorker) Register

func (sw *ServerWorker) Register(workflowFunc interface{}, serverActivities interface{})

RegisterWorkflowAndActivities registers workflows and server activities

func (*ServerWorker) Start

func (sw *ServerWorker) Start() error

Start launches the worker in the background

func (*ServerWorker) Stop

func (sw *ServerWorker) Stop()

Stop halts the worker gracefully

Directories

Path Synopsis
Package embedded runs the Temporal server in-process inside fallbck-server.
Package embedded runs the Temporal server in-process inside fallbck-server.
Package ui embeds the Temporal Web UI (temporalio/ui-server) in fallbck-server.
Package ui embeds the Temporal Web UI (temporalio/ui-server) in fallbck-server.

Jump to

Keyboard shortcuts

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