maps

package
v0.1.23-oss Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

type Hash = entities.Hash

func MapInput

func MapInput(ctx context.Context, req *MapRequest) (Hash, error)

MapInput() encode the input, if 'storeInput' is specified it stores the input object to the object-store as well.

type MapObject

type MapObject interface {
	GetHash() Hash
	GetEncoded() []byte
	Encode() error
	Decode(Hash, []byte) error
}

func Map

func Map(ctx context.Context, req *MapRequest) (o MapObject, err error)

func MapExecute

func MapExecute(ctx context.Context, inHash Hash, req *MapRequest) (MapObject, error)

MapExecute() run the mapFunc() to find a new result and stores it in the map and object-store.

func MapExisting

func MapExisting(ctx context.Context, inHash Hash, req *MapRequest) (MapObject, error)

MapExisting() find the right outputs for a given input. Checks the cache to see if it finds any previously stored results.

type MapRequest

type MapRequest struct {
	Input MapObject

	MapFunc      func(MapObject) (MapObject, error)
	Validator    func(MapObject) (bool, error)
	OutputDecode func(hash Hash, content []byte) (MapObject, error)
	Store        entities.CASStore
	InvalidCount int
	CacheHit     bool
	StartTime    time.Time
	Duration     time.Duration
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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