basic

package
v0.0.0-...-446135d Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

The `basic` package contains the annotation functions for string-based tracking of program flow. Used primarily for debugging and testing shared memory functionality

Index

Constants

This section is empty.

Variables

View Source
var (

	// Local pointer to global state, can be reset for testing
	StateManager = &store.StateManager
)

Functions

func Convert

func Convert(stringData Array) (bytes []byte)

Conversion function to map from string array to exportable bytes format

func ExportRunTxt

func ExportRunTxt(bytes []byte, file io.Writer)

Function for handling the text write operation

Types

type Array

type Array = []string

Data storage array for collector

type Collection

type Collection = collections.BasicCollector[string]

Collector object for shared state

type Node

type Node = tracker.Node[string]

Tracking data object

func End

func End(tracker *Tracker, inputs []Node, name, description string, isError bool) (node Node)

Action annotation for marking the endpoints of a process flow

func Start

func Start(tracker *Tracker, name, description string) (node Node)

Action annotation for marking start of a process flow

func Task

func Task(ctx context.Context, tracker *Tracker, inputs []Node, name, description string) (ctxNew context.Context, node Node)

Action annotation for marking intermediate tasks of a process

type Singleton

type Singleton = store.GlobalState[Collection]

Shared memory format for basic tracker

type Tracker

type Tracker = tracker.BasicTracker[string]

String node-based flow tracker

func RegisterTracker

func RegisterTracker(ctx context.Context) (t Tracker)

Initialises string-based basic tracking object with required params

Jump to

Keyboard shortcuts

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