Skip to content

sgns::processing::TaskKeys

#include <TaskKeys.hpp>

Public Functions

Name
std::string ProcessingPrefix()
Returns the processing base prefix for the task queue.
std::string ScopePrefix(const std::string & private_network_id)
Returns the CRDT branch prefix for a private-network job scope.
std::string ScopedTopic(std::string_view public_topic, const std::string & private_network_id)
Derives a pubsub topic for a private-network job scope.
std::string ScopedKeyPath(const std::string & private_network_id, std::string_view path)
Prefixes a raw CRDT path with the private-network branch.
std::string SubTaskResultKey(const std::string & private_network_id, std::string_view subTaskId)
Builds the subtask-result key for a private-network job scope.
std::string TaskListKey()
std::string TaskListKey(const std::string & private_network_id)
std::string SubTaskListKey()
std::string SubTaskListKey(std::string_view taskId)
std::string SubTaskListKey(const std::string & private_network_id, std::string_view taskId)
std::string TaskKey(std::string_view taskId)
std::string TaskKey(const std::string & private_network_id, std::string_view taskId)
std::string SubTaskKey(std::string_view taskId, std::string_view subTaskId)
std::string SubTaskKey(const std::string & private_network_id, std::string_view taskId, std::string_view subTaskId)
std::string ClaimableListKey()
std::string ClaimableListKey(const std::string & private_network_id)
std::string ClaimableTaskKey(std::string_view taskId)
std::string ClaimableTaskKey(const std::string & private_network_id, std::string_view taskId)
std::string ResultTaskKey(std::string_view taskId)
std::string ResultTaskKey(const std::string & private_network_id, std::string_view taskId)
std::string LockKey(std::string_view taskKey)
Builds a task-lock key. Scope-agnostic by design: taskKey already carries the network scope when produced by the scoped TaskKey overload.

Public Functions Documentation

function ProcessingPrefix

static inline std::string ProcessingPrefix()

Returns the processing base prefix for the task queue.

Return: "/<prefix_base

function ScopePrefix

static inline std::string ScopePrefix(
    const std::string & private_network_id
)

Returns the CRDT branch prefix for a private-network job scope.

Parameters:

  • private_network_id Private-network identity (0x-hex-32B); empty = public scope.

Return: Empty string for the public scope, "/chain/" when scoped.

function ScopedTopic

static inline std::string ScopedTopic(
    std::string_view public_topic,
    const std::string & private_network_id
)

Derives a pubsub topic for a private-network job scope.

Parameters:

  • public_topic Public-network topic string.
  • private_network_id Private-network identity; empty = public scope.

Return: public_topic unchanged when public, "/" when scoped.

function ScopedKeyPath

static inline std::string ScopedKeyPath(
    const std::string & private_network_id,
    std::string_view path
)

Prefixes a raw CRDT path with the private-network branch.

Parameters:

  • private_network_id Private-network identity; empty = public scope.
  • path Raw key path (may or may not start with '/').

Return: path unchanged when public; "/chain//" with exactly one slash between segments when scoped.

function SubTaskResultKey

static inline std::string SubTaskResultKey(
    const std::string & private_network_id,
    std::string_view subTaskId
)

Builds the subtask-result key for a private-network job scope.

Parameters:

  • private_network_id Private-network identity; empty = public scope.
  • subTaskId Subtask identifier.

Return: "results/" when public (byte-identical to the legacy boost::format output), "/chain//results/" when scoped.

function TaskListKey

static inline std::string TaskListKey()

function TaskListKey

static inline std::string TaskListKey(
    const std::string & private_network_id
)

function SubTaskListKey

static inline std::string SubTaskListKey()

function SubTaskListKey

static inline std::string SubTaskListKey(
    std::string_view taskId
)

function SubTaskListKey

static inline std::string SubTaskListKey(
    const std::string & private_network_id,
    std::string_view taskId
)

function TaskKey

static inline std::string TaskKey(
    std::string_view taskId
)

function TaskKey

static inline std::string TaskKey(
    const std::string & private_network_id,
    std::string_view taskId
)

function SubTaskKey

static inline std::string SubTaskKey(
    std::string_view taskId,
    std::string_view subTaskId
)

function SubTaskKey

static inline std::string SubTaskKey(
    const std::string & private_network_id,
    std::string_view taskId,
    std::string_view subTaskId
)

function ClaimableListKey

static inline std::string ClaimableListKey()

function ClaimableListKey

static inline std::string ClaimableListKey(
    const std::string & private_network_id
)

function ClaimableTaskKey

static inline std::string ClaimableTaskKey(
    std::string_view taskId
)

function ClaimableTaskKey

static inline std::string ClaimableTaskKey(
    const std::string & private_network_id,
    std::string_view taskId
)

function ResultTaskKey

static inline std::string ResultTaskKey(
    std::string_view taskId
)

function ResultTaskKey

static inline std::string ResultTaskKey(
    const std::string & private_network_id,
    std::string_view taskId
)

function LockKey

static inline std::string LockKey(
    std::string_view taskKey
)

Builds a task-lock key. Scope-agnostic by design: taskKey already carries the network scope when produced by the scoped TaskKey overload.


Updated on 2026-10-15 at 17:15:11 +0000