processio

package
v0.47.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 1 module, 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.

Documentation

Overview

Package processio is the key-value store of processes (IO-01 to IO-03): the task type "process_io" and the store behind the IO API. The input conventions follow process-io-worker v1.0.13 (Apache-2.0): io.read.<output>, io.write.<key>, io.default.<key>, placeholders and JSON parsing of written strings.

Index

Constants

View Source
const TaskType = "process_io"

Variables

This section is empty.

Functions

This section is empty.

Types

type Limits

type Limits struct {
	MaxValuesPerUser int
	MaxValueBytes    int
}

Limits bound the values of a user that no instance holds (LONG-11).

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(s *store.Store, limits Limits) *Service

func (*Service) Bulk

func (this *Service) Bulk(ctx context.Context, userId string, admin bool, bulk model.IoBulk) (result []model.IoValue, err error)

Bulk writes, then reads, so that a key written in the same call reads back the new value.

func (*Service) Delete

func (this *Service) Delete(ctx context.Context, userId string, key string) error

func (*Service) Get

func (this *Service) Get(ctx context.Context, userId string, key string) (result model.IoValue, ok bool, err error)

Get returns the value of a key, computed keys included; ok is false for a missing key.

func (*Service) List

func (this *Service) List(ctx context.Context, userId string, options model.IoListOptions) (result model.Page[model.IoValue], err error)

List filters by deployment, instance and a regular expression on the key.

func (*Service) Set

func (this *Service) Set(ctx context.Context, userId string, admin bool, v model.IoValue) error

Set writes a value of a user; a bound instance or deployment must belong to the user.

type Type

type Type struct {
	// contains filtered or unexported fields
}

Type is the task type process_io.

func NewType

func NewType(service *Service) *Type

func (*Type) Execute

func (this *Type) Execute(ctx context.Context, task engine.Task) (engine.TaskResult, error)

Execute writes, then reads; read values become local variables named after the io.read. suffix. A key with {{InstanceId}} is bound to the instance, one with only {{DeploymentId}} to the deployment, so that the value is deleted with it (IO-01, IO-03).

Jump to

Keyboard shortcuts

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