Documentation
¶
Index ¶
- Constants
- func CheckHealth(ctx context.Context, c client.Client) error
- func DialWithRetry(ctx context.Context, dial func() (client.Client, error)) (client.Client, error)
- func NewClient(cfg config.TemporalConfig) (client.Client, error)
- func NewLoopbackClient(hostPort, namespace string) (client.Client, error)
- type BackupExecutionResult
- type BackupHeartbeatProgress
- type BackupSessionInfo
- type ServerWorker
Constants ¶
View Source
const (
ServerTaskQueue = "fallbck-server-queue"
)
Variables ¶
This section is empty.
Functions ¶
func CheckHealth ¶
CheckHealth verifies connection to Temporal cluster
func DialWithRetry ¶
DialWithRetry retries dial until it succeeds or ctx expires
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
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. |
Click to show internal directories.
Click to hide internal directories.