didagle

package module
v0.0.0-...-bb66366 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: BSD-2-Clause Imports: 9 Imported by: 0

README

go-didagle

didagle = Dependency Injection Directed Acyclic Graph Lightweight Engine this is a golang lib for didagle to process toml didagle scripts.

Documentation

Index

Constants

View Source
const V_RESULT_ALL int = 3
View Source
const V_RESULT_ERR int = 2
View Source
const V_RESULT_OK int = 1

Variables

This section is empty.

Functions

func CheckCyclic

func CheckCyclic(v *Vertex, visited map[string]bool, recursionStack map[string]bool) bool

Types

type CondParams

type CondParams struct {
	Match string                 `toml:"match"`
	Args  map[string]interface{} `toml:"args"`
}

type ConfigSetting

type ConfigSetting struct {
	Name      string `toml:"name"`
	Cond      string `toml:"cond"`
	Processor string `toml:"processor"`
}

type DAGConfig

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

func NewDAGConfigByContent

func NewDAGConfigByContent(opMeta string, tomlScript string) (*DAGConfig, error)

func NewDAGConfigByFile

func NewDAGConfigByFile(opMetaFile string, tomlScript string) (*DAGConfig, error)

func (*DAGConfig) DumpDot

func (p *DAGConfig) DumpDot() string

func (*DAGConfig) GenPng

func (p *DAGConfig) GenPng(filePath string) error

type FieldFlags

type FieldFlags struct {
	Extern    int `json:"is_extern"`
	InOut     int `json:"is_in_out"`
	Agrregate int `json:"is_aggregate"`
}

type FieldMeta

type FieldMeta struct {
	Name  string     `json:"name"`
	ID    int64      `json:"id"`
	Type  string     `json:"type"`
	Flags FieldFlags `json:"flags"`
}

type Graph

type Graph struct {
	Name   string   `toml:"name"`
	Vertex []Vertex `toml:"vertex"`
	// contains filtered or unexported fields
}

type GraphCluster

type GraphCluster struct {
	Desc                   string          `toml:"desc"`
	StrictDsl              bool            `toml:"strict_dsl"`
	DefaultExprProcessor   string          `toml:"default_expr_processor"`
	DefaultDefaultPoolSize string          `toml:"default_context_pool_size"`
	Graph                  []Graph         `toml:"graph"`
	ConfigSetting          []ConfigSetting `toml:"config_setting"`
	// contains filtered or unexported fields
}

func (*GraphCluster) ContainsConfigSetting

func (p *GraphCluster) ContainsConfigSetting(name string) bool

type GraphData

type GraphData struct {
	ID         string   `toml:"id"`
	Field      string   `toml:"field"`
	Aggregate  []string `toml:"aggregate"`
	Cond       string   `toml:"cond"`
	Required   bool     `toml:"required"`
	Move       bool     `toml:"move"`
	IsExtern   bool     `toml:"extern"`
	IsInOut    bool
	IsMapInput bool
}

type OperatorMeta

type OperatorMeta struct {
	Name   string      `json:"name"`
	Input  []FieldMeta `json:"input"`
	Output []FieldMeta `json:"output"`
}

type Vertex

type Vertex struct {
	ID           string       `toml:"id"`
	Processor    string       `toml:"processor"`
	Cond         string       `toml:"cond"`
	Expect       string       `toml:"expect"`
	ExpectConfig string       `toml:"expect_config"`
	SelectArgs   []CondParams `toml:"select_args"`

	Cluster        string   `toml:"cluster"`
	Graph          string   `toml:"graph"`
	Successor      []string `toml:"successor"`
	SuccessorOnOk  []string `toml:"if"`
	SuccessorOnErr []string `toml:"else"`
	Deps           []string `toml:"deps"`
	DepsOnOk       []string `toml:"deps_on_ok"`
	DepsOnErr      []string `toml:"deps_on_err"`

	Input  []GraphData `toml:"input"`
	Output []GraphData `toml:"output"`
	Start  bool        `toml:"start"`
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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