memory

package
v0.0.0-...-841f565 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store an in memory implementation of the ark.Store

func NewCachedMemoryStore

func NewCachedMemoryStore() *Store

NewCachedMemoryStore returns a singleton memory store (idempotent)

func (*Store) AddTarget

func (s *Store) AddTarget(target ark.RawTarget) (artifact ark.RawArtifact, err error)

AddTarget adds a target to to the in memory storage

func (*Store) ConnectTargets

func (s *Store) ConnectTargets(edge ark.GraphEdge) error

ConnectTargets adds a graph edge to memory state

func (*Store) GetGraph

func (s *Store) GetGraph() (*dag.AcyclicGraph, error)

GetGraph calculates a DAG from the set of targets and edges

func (*Store) GetGraphEdges

func (s *Store) GetGraphEdges() (edges []ark.GraphEdge, err error)

GetGraphEdges returns the list of graph edges in memory

func (*Store) GetTargetByKey

func (s *Store) GetTargetByKey(key string) (target ark.RawTarget, err error)

GetTargetByKey returns a target by its key with an error if it doesn't exist or if we fail to cast a target to the correct type

func (*Store) GetTargets

func (s *Store) GetTargets() (targets []ark.RawTarget, err error)

GetTargets returns a list of []ark.RawTarget from the memory state

func (*Store) Migrate

func (s *Store) Migrate() error

Migrate is a noop in the memory Store

func (*Store) Open

func (s *Store) Open(_ string) error

Open is a noop in the memory Store

Jump to

Keyboard shortcuts

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