utils

package
v0.0.0-...-f8d460b Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SeriesIDKey contextKey = "cldf/seriesID"
)

Variables

This section is empty.

Functions

func ExecuteOperation

func ExecuteOperation[IN, OUT, DEP any](
	b cldfops.Bundle,
	operation *cldfops.Operation[IN, OUT, DEP],
	deps DEP,
	input IN,
	seriesID string,
	opts ...cldfops.ExecuteOption[IN, DEP],
) (cldfops.Report[IN, OUT], error)

ExecuteOperation is a helper function to execute an operation whose report is unique by seriesID. It sets the seriesID in the context for the duration of the operation execution, so that it can be sourced and used by underlying operations. It uses ExecuteOperationN with n=1 to execute a single operation and retrieve its report.

func GetSeriesID

func GetSeriesID(ctx context.Context) (string, bool)

GetSeriesID retrieves the series ID from the context, if it exists.

Types

This section is empty.

Jump to

Keyboard shortcuts

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