diff

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActorStateLoader

type ActorStateLoader = func(adt.Store, *types.Actor) (interface{}, error)

type ActorStateMapLoader

type ActorStateMapLoader = func(interface{}) (adt.Map, *adt.MapOpts, error)

type GenericMapDiff

type GenericMapDiff struct {
	Added    MapModifications
	Modified MapModifications
	Removed  MapModifications
}

func (*GenericMapDiff) Add

func (t *GenericMapDiff) Add(key string, val *typegen.Deferred) error

func (*GenericMapDiff) AsKey

func (t *GenericMapDiff) AsKey(key string) (abi.Keyer, error)

func (*GenericMapDiff) AsMapModifications

func (t *GenericMapDiff) AsMapModifications() (MapModifications, error)

func (*GenericMapDiff) Modify

func (t *GenericMapDiff) Modify(key string, from, to *typegen.Deferred) error

func (*GenericMapDiff) Remove

func (t *GenericMapDiff) Remove(key string, val *typegen.Deferred) error

type MapModification

type MapModification struct {
	Key      []byte
	Type     tasks.ChangeType
	Previous *typegen.Deferred
	Current  *typegen.Deferred
}

type MapModifications

type MapModifications []*MapModification

func DiffActorMap

func DiffActorMap(ctx context.Context, api actorstate.ActorStateAPI, act actorstate.ActorInfo, actorStateLoader ActorStateLoader, actorMapLoader ActorStateMapLoader) (MapModifications, error)

func DiffMap

func DiffMap(ctx context.Context, store adt.Store, child, parent adt.Map, childOpts, parentOpts *adt.MapOpts) (MapModifications, error)

type StringKey

type StringKey string

An adt.Map key that just preserves the underlying string.

func (StringKey) Key

func (k StringKey) Key() string

Jump to

Keyboard shortcuts

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