weave

package
v0.24.5 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

type Catalog struct {
	*mdl.Modeler     // db output
	Env          Env // generic storage for command processing
	// contains filtered or unexported fields
}

Catalog - receives ephemera from the importer.

func NewCatalog

func NewCatalog(db *sql.DB) *Catalog

func NewCatalogWithWarnings

func NewCatalogWithWarnings(db *sql.DB, run rt.Runtime, warn func(error)) *Catalog

func (*Catalog) AssembleCatalog

func (cat *Catalog) AssembleCatalog() (err error)

walk the domains and run the commands remaining in their queues

func (*Catalog) BeginFile

func (cat *Catalog) BeginFile(name string) (err error)

func (*Catalog) CurrentDomain

func (cat *Catalog) CurrentDomain() (ret string)

return the uniformly named domain ( if it exists )

func (*Catalog) DomainEnd

func (cat *Catalog) DomainEnd() (err error)

func (*Catalog) DomainStart

func (cat *Catalog) DomainStart(name string, requires []string) (err error)

calls to schedule() between begin/end domain write to this newly declared domain. names dont have to be normalized.

func (*Catalog) EndFile

func (cat *Catalog) EndFile()

func (*Catalog) GetDomain

func (cat *Catalog) GetDomain(n string) (*Domain, bool)

return the uniformly named domain ( if it exists )

func (*Catalog) GetRuntime

func (cat *Catalog) GetRuntime() rt.Runtime

func (*Catalog) NewCounter

func (cat *Catalog) NewCounter(name string) (ret string)

func (*Catalog) Schedule

func (cat *Catalog) Schedule(when weaver.Phase, cb func(weaver.Weaves, rt.Runtime) error) (err error)

run the passed function now or in the future.

func (*Catalog) Step

func (cat *Catalog) Step(cb StepFunction) (err error)

run passed function until it returns true or errors if currently processing, the first step will execute next phase.

type Domain

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

func (*Domain) Name

func (d *Domain) Name() string

type DomainStack

type DomainStack []*Domain

DomainStack - tracks the current target of calls to schedule().

func (*DomainStack) Pop

func (k *DomainStack) Pop() (ret *Domain, okay bool)

return false if empty

func (*DomainStack) Push

func (k *DomainStack) Push(b *Domain)

func (*DomainStack) Top

func (k *DomainStack) Top() (ret *Domain, okay bool)

type Env

type Env map[string]any

custom storage for importers ( ie. package story ) alt: could use context and pass through all functions to be more go like.

func (Env) Inc

func (m Env) Inc(name string, inc int) int

can inc with zero to retrieve the current value

type ScheduledCallback

type ScheduledCallback func(weaver.Weaves, rt.Runtime) error

type StepFunction

type StepFunction func(weaver.Phase) (bool, error)

Directories

Path Synopsis
Package mdl provides an api for building the database used by the tapestry runtime.
Package mdl provides an api for building the database used by the tapestry runtime.

Jump to

Keyboard shortcuts

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