management

command
v1.0.0-beta4 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Management sample

This sample demonstrates safe, ID-scoped Durable Task Scheduler management operations:

  • start and wait for completion
  • typed custom status progress
  • QueryInstances with tags, ID prefix, payload fetching, and continuation pages
  • ListInstanceIDs for completed orchestration IDs
  • suspend and resume
  • terminate with a supplied output
  • restart and validate the restarted payload
  • status-based instance-ID reuse
  • single and batch ID-scoped purge

The sample intentionally does not use filtered purge or clean-hub operations.

Prerequisites

Set DTS_CONNECTION_STRING to a task hub you can use for samples:

export DTS_CONNECTION_STRING="Endpoint=http://localhost:8080;TaskHub=default;Authentication=None"

ListInstanceIDs and RestartInstance must be implemented by the target service. If a target reports success but omits owned IDs or drops restart payloads, the sample exits with a precise error instead of treating the limitation as a pass.

Run

go run ./samples/management

Expected result

The program validates each management scenario and prints:

SAMPLE_OK management

only after every scenario and cleanup succeeds.

Cleanup

Every orchestration uses a sample-management-* unique owned ID that is recorded before scheduling. Cleanup uses dtssample.Cleanup before worker shutdown, and the purge scenario uses only explicit single/batch ID-scoped purge requests.

Documentation

Overview

Command management demonstrates instance-management operations scoped to sample-owned orchestration IDs.

Jump to

Keyboard shortcuts

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