model

package
v0.0.0-...-bc49051 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EdgesFromINode

func EdgesFromINode(n incr.INode) []types.Edge

EdgesFromINode returns the edges to a given INode.

func INodeFromNode

func INodeFromNode(graph *incr.Graph, apiNode *types.Node) (incr.INode, error)

INodeFromNode returns an incremental node from a given api node.

func NodeFromINode

func NodeFromINode(g *incr.Graph, n incr.INode) types.Node

NodeFromINode returns a node from an incr inode.

Types

type GraphStore

type GraphStore interface {
	Save(context.Context) (*types.GraphFull, error)
	Load(context.Context, *types.GraphFull) (id incr.Identifier, err error)

	Graph(context.Context) (*types.Graph, error)
	Logs(ctx context.Context) (string, error)
	SetViewport(context.Context, types.Viewport) error

	Stabilize(ctx context.Context, parallel bool) (uint64, error)

	AddNode(context.Context, *types.Node) (incr.Identifier, error)
	RemoveNode(context.Context, incr.Identifier) (bool, error)
	Nodes(context.Context) ([]types.Node, error)
	Node(context.Context, incr.Identifier) (types.Node, bool, error)

	PatchNodes(context.Context, types.PatchSet) error
	PatchNode(context.Context, incr.Identifier, types.PatchSet) (bool, error)

	NodeValue(context.Context, incr.Identifier) (any, bool, error)
	NodeValues(context.Context, ...incr.Identifier) ([]types.NodeValue, error)
	SetNodeValue(context.Context, incr.Identifier, any) (bool, error)

	MarkNodeStale(context.Context, incr.Identifier) (bool, error)

	Edges(context.Context) ([]types.Edge, error)
	LinkInput(context.Context, types.Edge) error
	UnlinkInput(context.Context, types.Edge) error

	PatchNodeTable(context.Context, incr.Identifier, ...types.TableOp) (bool, error)
}

GraphStore is an interface that a graph store implementation must satisfy.

Generally a graph store should implicitly control a single graph.

Directories

Path Synopsis
File generated by nodegen.
File generated by nodegen.

Jump to

Keyboard shortcuts

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