std

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 41 Imported by: ? modules, 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 std implements the OpenFlange portable standard library (`std:<name>`, version 0.1) as in-process Go pipes. Every pipe ships its OPENFLANGE.md manifest and portable tests, embedded under manifests/<name>/.

Call Register to add all std pipes to an adapter.Registry.

Index

Constants

View Source
const (
	MaxArrowMetadataBytes = 16 << 20  // one message's metadata
	MaxArrowMessageBytes  = 256 << 20 // one message's body (a record batch)
)

Limits std:arrow-to-ndjson enforces on an (untrusted) IPC stream before the Arrow decoder sees it; the decoder allocates what a message header claims.

View Source
const ArrowAvailable = true

ArrowAvailable reports whether std:ndjson-to-arrow / std:arrow-to-ndjson are implemented in this build.

View Source
const DefaultHTTPTimeoutMs = 30000

DefaultHTTPTimeoutMs is the default of std:http-source's `timeoutMs`.

View Source
const MaxArrowBatchSize = 1_000_000

MaxArrowBatchSize bounds the rows held by std:ndjson-to-arrow.

View Source
const MaxGroupSize = 1_000_000

MaxGroupSize bounds `size` of std:batch and std:window (bounded state).

View Source
const MaxPartitions = 8

MaxPartitions is the number of outputs of std:partition (p0..p7).

View Source
const Version = "0.1.0"

Version is the version of the standard library implemented here.

Variables

View Source
var (
	Stdin  io.Reader = os.Stdin
	Stdout io.Writer = os.Stdout
)

Stdin and Stdout are the streams used by std:stdin and std:stdout. They default to the process streams and can be replaced by embedding applications and tests (not concurrently with a run).

Functions

func CompileJSONSchema

func CompileJSONSchema(schema any) (*jsonschema.Schema, error)

CompileJSONSchema compiles a JSON Schema (dialect 2020-12 unless `$schema` says otherwise) given as generic Go values. External references are refused.

func Manifest

func Manifest(name string) (*manifest.Manifest, error)

Manifest returns the parsed embedded manifest of one std pipe.

func Manifests

func Manifests() fs.FS

Manifests returns the embedded std manifests and tests, rooted so that `<name>/OPENFLANGE.md` and `<name>/tests/*.test.yaml` are the entries.

func Names

func Names() []string

Names lists the std pipes of this build (without the `std:` prefix), sorted.

func ParseArrowSchema

func ParseArrowSchema(v any) (*arrow.Schema, error)

ParseArrowSchema converts the JSON form {fields: [{name, type, nullable}]} (nullable defaults to true) into an Arrow schema.

func ParseArrowType

func ParseArrowType(name string) (arrow.DataType, error)

ParseArrowType parses a type name of the OpenFlange Arrow schema form.

func Register

func Register(reg *adapter.Registry) error

Register adds every std pipe to the registry and declares the features this implementation supports (`windows`, and `arrow` when built in).

Types

type SchemaError

type SchemaError struct {
	Path    string `json:"path"`
	Message string `json:"message"`
}

SchemaError is one violation: a JSON Pointer into the item and a message.

func SchemaErrors

func SchemaErrors(sch *jsonschema.Schema, it stream.Item) []SchemaError

SchemaErrors validates one JSON item and returns the violations sorted by path, empty when the item is valid.

Jump to

Keyboard shortcuts

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