management

command
v1.0.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

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