engine

package
v0.0.0-...-3358503 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(m map[string]*Target, x string, h chan string, cache *Cache, proc chan bool, idx chan *string)

func BuildFile

func BuildFile(x string) string

func BuildLoop

func BuildLoop(m map[string]*Target, h chan string, cache *Cache, proc chan bool, idx chan *string)

func HashSlice

func HashSlice(sl []string, sum []byte) []byte

func InjectTarget

func InjectTarget(x, y string) string

func SetupVM

func SetupVM(v *otto.Otto, m map[string]*Target, b string, h chan string, cache *Cache, proc chan bool, idx chan *string)

Types

type Cache

type Cache struct {
	Local      map[string]map[string][]byte
	FileFolder *string
	Lock       sync.Mutex
}

func (*Cache) Activate

func (c *Cache) Activate(hs string)

func (*Cache) Get

func (c *Cache) Get(hs, k string) ([]byte, bool)

func (*Cache) Sync

func (c *Cache) Sync()

type Target

type Target struct {
	Name    string
	Content []byte
	Done    chan bool
	VM      *otto.Otto
}

func DependOn

func DependOn(m map[string]*Target, t_ string, h chan string, in string) *Target

Jump to

Keyboard shortcuts

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