Versions in this module Expand all Collapse all v0 v0.0.1 Oct 16, 2022 Changes in this version + const BlockTypeConfiguration + const BlockTypeDirective + const BlockTypeGenerator + const BlockTypeMain + const BlockTypeTask + const ClassifierAnnotation + const ClassifierNone + const FunctionNameRegExpPattern + const LogTimeFormat + var EvalStages = map[string]EvalStage + var Keywords = []string + var Version = "v0.0.0" + func Evaluate(parseCtx *ParseContext, context context.Context, userContext interface{}, ...) (interface{}, error) + func ParseFile(ctx *ParseContext, p parsley.Parser, path string) (parsley.Node, error) + func ParseFiles(ctx *ParseContext, p parsley.Parser, ...) error + func ParseText(ctx *ParseContext, p parsley.Parser, input string) (parsley.Node, error) + func RetryableError(err error, duration time.Duration) error + type Block interface + type BlockCloser interface + Close func(ctx context.Context) error + type BlockContainer interface + EvalStage func() EvalStage + Param func(ID) interface{} + SetChild func(Container) + SetError func(parsley.Error) + type BlockContext struct + func NewBlockContext(evalContext *EvalContext, blockPublisher BlockPublisher) *BlockContext + func (b *BlockContext) BlockPublisher() BlockPublisher + func (b *BlockContext) JobScheduler() JobScheduler + func (b *BlockContext) Logger() Logger + func (b *BlockContext) Stdout() io.Writer + func (b *BlockContext) UserContext() interface{} + type BlockDirective interface + type BlockInitialiser interface + Init func(context.Context) (skipped bool, err error) + type BlockInterpreter interface + CreateBlock func(ID, *BlockContext) Block + Param func(b Block, name ID) interface{} + ParseContext func(*ParseContext) *ParseContext + Schema func() schema.Schema + SetBlock func(b Block, name ID, key string, value interface{}) error + SetParam func(b Block, name ID, value interface{}) error + ValueParamName func() ID + type BlockNode interface + BlockType func() ID + Children func() []Node + GetPropertySchema func(ID) (schema.Schema, bool) + Interpreter func() BlockInterpreter + Key func() *string + ParameterName func() ID + SetSchema func(schema.Schema) + type BlockNodeRegistry interface + AddBlockNode func(BlockNode) error + BlockNode func(ID) (BlockNode, bool) + type BlockProvider interface + BlockInterpreters func(*ParseContext) (map[ID]BlockInterpreter, error) + type BlockPublisher interface + PublishBlock func(block Block, onScheduled func() error) (published bool, err error) + type BlockRunner interface + Run func(ctx context.Context) (Result, error) + type BlockTransformerRegistryAware interface + BlockTransformerRegistry func() parsley.NodeTransformerRegistry + type Container interface + Close func() + Node func() Node + Value func() (interface{}, parsley.Error) + WaitGroups func() []WaitGroup + func NewNilContainer(node Node, wgs []WaitGroup, pending bool) Container + type Contexter interface + Context func(ctx context.Context) (context.Context, context.CancelFunc) + type Dependencies map[ID]VariableNode + func (d Dependencies) Add(d2 Dependencies) + type DirectiveTransformerRegistryAware interface + DirectiveTransformerRegistry func() parsley.NodeTransformerRegistry + type EvalContext struct + InputParams map[ID]interface{} + Logger Logger + Stdout io.Writer + UserContext interface{} + func NewEvalContext(ctx context.Context, userContext interface{}, logger Logger, ...) *EvalContext + func (e *EvalContext) BlockContainer(id ID) (BlockContainer, bool) + func (e *EvalContext) Cancel() bool + func (e *EvalContext) Deadline() (deadline time.Time, ok bool) + func (e *EvalContext) Done() <-chan struct{} + func (e *EvalContext) Err() error + func (e *EvalContext) HasSubscribers(id ID) bool + func (e *EvalContext) JobScheduler() JobScheduler + func (e *EvalContext) New(ctx context.Context, cancel context.CancelFunc, ...) *EvalContext + func (e *EvalContext) Publish(c Container) + func (e *EvalContext) Run() bool + func (e *EvalContext) SetStdout(stdout io.Writer) + func (e *EvalContext) Subscribe(container *NodeContainer, id ID) + func (e *EvalContext) Unsubscribe(container *NodeContainer, id ID) + func (e *EvalContext) Value(key interface{}) interface{} + type EvalStage int8 + const EvalStageClose + const EvalStageIgnore + const EvalStageInit + const EvalStageMain + const EvalStageParse + const EvalStageResolve + const EvalStageUndefined + func (e EvalStage) String() string + type FunctionInterpreter interface + Eval func(ctx interface{}, args []interface{}) (interface{}, error) + Schema func() schema.Schema + type FunctionNode interface + ArgumentNodes func() []parsley.Node + Name func() ID + type FunctionTransformerRegistryAware interface + FunctionTransformerRegistry func() parsley.NodeTransformerRegistry + type ID string + func (i ID) Concat(s string) ID + func (i ID) String() string + type IDNode struct + func NewIDNode(id ID, classifier rune, pos parsley.Pos, readerPos parsley.Pos) *IDNode + func (i *IDNode) Classifier() rune + func (i *IDNode) ID() ID + func (i *IDNode) Pos() parsley.Pos + func (i *IDNode) ReaderPos() parsley.Pos + func (i *IDNode) Schema() interface{} + func (i *IDNode) SetReaderPos(f func(parsley.Pos) parsley.Pos) + func (i *IDNode) String() string + func (i *IDNode) Token() string + func (i *IDNode) Value() interface{} + type IDRegistry interface + GenerateID func() ID + IDExists func(id ID) bool + RegisterID func(id ID) error + func NewIDRegistry(minLength int, maxLength int) IDRegistry + type Identifiable interface + ID func() ID + type Job interface + JobID func() int + JobName func() ID + Lightweight func() bool + Run func() + SetJobID func(int) + type JobContainer interface + Cancel func() bool + EvalStage func() EvalStage + Pending func() bool + type JobScheduler interface + ScheduleJob func(job Job) error + type LogArray interface + Bool func(b bool) LogArray + Bytes func(val []byte) LogArray + Dur func(d time.Duration) LogArray + Err func(err error) LogArray + Float32 func(f float32) LogArray + Float64 func(f float64) LogArray + Hex func(val []byte) LogArray + ID func(val ID) LogArray + IPAddr func(ip net.IP) LogArray + IPPrefix func(pfx net.IPNet) LogArray + Int func(i int) LogArray + Int16 func(i int16) LogArray + Int32 func(i int32) LogArray + Int64 func(i int64) LogArray + Int8 func(i int8) LogArray + Interface func(i interface{}) LogArray + MACAddr func(ha net.HardwareAddr) LogArray + Object func(obj LogObjectMarshaler) LogArray + Str func(val string) LogArray + Time func(t time.Time) LogArray + Uint func(i uint) LogArray + Uint16 func(i uint16) LogArray + Uint32 func(i uint32) LogArray + Uint64 func(i uint64) LogArray + Uint8 func(i uint8) LogArray + type LogArrayMarshaler interface + MarshalLogArray func(a LogArray) + type LogEvent interface + AnErr func(key string, err error) LogEvent + Array func(key string, arr LogArrayMarshaler) LogEvent + Bool func(key string, b bool) LogEvent + Bools func(key string, b []bool) LogEvent + Bytes func(key string, val []byte) LogEvent + Caller func() LogEvent + Dict func(key string, dict LogEvent) LogEvent + Discard func() LogEvent + Dur func(key string, d time.Duration) LogEvent + Durs func(key string, d []time.Duration) LogEvent + EmbedObject func(obj LogObjectMarshaler) LogEvent + Enabled func() bool + Err func(err error) LogEvent + Errs func(key string, errs []error) LogEvent + Fields func(fields map[string]interface{}) LogEvent + Float32 func(key string, f float32) LogEvent + Float64 func(key string, f float64) LogEvent + Floats32 func(key string, f []float32) LogEvent + Floats64 func(key string, f []float64) LogEvent + Hex func(key string, val []byte) LogEvent + ID func(key string, val ID) LogEvent + IPAddr func(key string, ip net.IP) LogEvent + IPPrefix func(key string, pfx net.IPNet) LogEvent + Int func(key string, i int) LogEvent + Int16 func(key string, i int16) LogEvent + Int32 func(key string, i int32) LogEvent + Int64 func(key string, i int64) LogEvent + Int8 func(key string, i int8) LogEvent + Interface func(key string, i interface{}) LogEvent + Ints func(key string, i []int) LogEvent + Ints16 func(key string, i []int16) LogEvent + Ints32 func(key string, i []int32) LogEvent + Ints64 func(key string, i []int64) LogEvent + Ints8 func(key string, i []int8) LogEvent + MACAddr func(key string, ha net.HardwareAddr) LogEvent + Msg func(msg string) + Msgf func(format string, v ...interface{}) + Object func(key string, obj LogObjectMarshaler) LogEvent + RawJSON func(key string, b []byte) LogEvent + Stack func() LogEvent + Str func(key, val string) LogEvent + Strs func(key string, vals []string) LogEvent + Time func(key string, t time.Time) LogEvent + TimeDiff func(key string, t time.Time, start time.Time) LogEvent + Times func(key string, t []time.Time) LogEvent + Timestamp func() LogEvent + Uint func(key string, i uint) LogEvent + Uint16 func(key string, i uint16) LogEvent + Uint32 func(key string, i uint32) LogEvent + Uint64 func(key string, i uint64) LogEvent + Uint8 func(key string, i uint8) LogEvent + Uints func(key string, i []uint) LogEvent + Uints16 func(key string, i []uint16) LogEvent + Uints32 func(key string, i []uint32) LogEvent + Uints64 func(key string, i []uint64) LogEvent + Uints8 func(key string, i []uint8) LogEvent + type LogObjectMarshaler interface + MarshalLogObject func(e LogEvent) + type Logger interface + Array func() LogArray + Debug func() LogEvent + Error func() LogEvent + Fatal func() LogEvent + Info func() LogEvent + Log func() LogEvent + Panic func() LogEvent + Print func(v ...interface{}) + Printf func(format string, v ...interface{}) + Warn func() LogEvent + With func() LoggerContext + type LoggerContext interface + AnErr func(key string, err error) LoggerContext + Array func(key string, arr LogArrayMarshaler) LoggerContext + Bool func(key string, b bool) LoggerContext + Bools func(key string, b []bool) LoggerContext + Bytes func(key string, val []byte) LoggerContext + Caller func() LoggerContext + CallerWithSkipFrameCount func(skipFrameCount int) LoggerContext + Dict func(key string, dict LogEvent) LoggerContext + Dur func(key string, d time.Duration) LoggerContext + Durs func(key string, d []time.Duration) LoggerContext + EmbedObject func(obj LogObjectMarshaler) LoggerContext + Err func(err error) LoggerContext + Errs func(key string, errs []error) LoggerContext + Fields func(fields map[string]interface{}) LoggerContext + Float32 func(key string, f float32) LoggerContext + Float64 func(key string, f float64) LoggerContext + Floats32 func(key string, f []float32) LoggerContext + Floats64 func(key string, f []float64) LoggerContext + Hex func(key string, val []byte) LoggerContext + ID func(key string, val ID) LoggerContext + IPAddr func(key string, ip net.IP) LoggerContext + IPPrefix func(key string, pfx net.IPNet) LoggerContext + Int func(key string, i int) LoggerContext + Int16 func(key string, i int16) LoggerContext + Int32 func(key string, i int32) LoggerContext + Int64 func(key string, i int64) LoggerContext + Int8 func(key string, i int8) LoggerContext + Interface func(key string, i interface{}) LoggerContext + Ints func(key string, i []int) LoggerContext + Ints16 func(key string, i []int16) LoggerContext + Ints32 func(key string, i []int32) LoggerContext + Ints64 func(key string, i []int64) LoggerContext + Ints8 func(key string, i []int8) LoggerContext + Logger func() Logger + MACAddr func(key string, ha net.HardwareAddr) LoggerContext + Object func(key string, obj LogObjectMarshaler) LoggerContext + RawJSON func(key string, b []byte) LoggerContext + Stack func() LoggerContext + Str func(key, val string) LoggerContext + Strs func(key string, vals []string) LoggerContext + Time func(key string, t time.Time) LoggerContext + Times func(key string, t []time.Time) LoggerContext + Timestamp func() LoggerContext + Uint func(key string, i uint) LoggerContext + Uint16 func(key string, i uint16) LoggerContext + Uint32 func(key string, i uint32) LoggerContext + Uint64 func(key string, i uint64) LoggerContext + Uint8 func(key string, i uint8) LoggerContext + Uints func(key string, i []uint) LoggerContext + Uints16 func(key string, i []uint16) LoggerContext + Uints32 func(key string, i []uint32) LoggerContext + Uints64 func(key string, i []uint64) LoggerContext + Uints8 func(key string, i []uint8) LoggerContext + type Loggerer interface + Logger func(logger Logger) Logger + type NameNode struct + func NewNameNode(selector *IDNode, sep parsley.LiteralNode, name *IDNode) *NameNode + func (t *NameNode) NameNode() *IDNode + func (t *NameNode) Pos() parsley.Pos + func (t *NameNode) ReaderPos() parsley.Pos + func (t *NameNode) Schema() interface{} + func (t *NameNode) SelectorNode() *IDNode + func (t *NameNode) SetReaderPos(f func(parsley.Pos) parsley.Pos) + func (t *NameNode) String() string + func (t *NameNode) Token() string + func (t *NameNode) Value() interface{} + type NilContainer struct + func (n NilContainer) Close() + func (n NilContainer) Node() Node + func (n NilContainer) Pending() bool + func (n NilContainer) Value() (interface{}, parsley.Error) + func (n NilContainer) WaitGroups() []WaitGroup + type Node interface + CreateContainer func(ctx *EvalContext, runtimeConfig RuntimeConfig, parent BlockContainer, ...) JobContainer + Dependencies func() Dependencies + Directives func() []BlockNode + EvalStage func() EvalStage + Generates func() []ID + Provides func() []ID + Value func(userCtx interface{}) (interface{}, parsley.Error) + type NodeContainer struct + func NewNodeContainer(ctx *EvalContext, parent BlockContainer, node Node, scheduler JobScheduler) (*NodeContainer, parsley.Error) + func (n *NodeContainer) Close() + func (n *NodeContainer) CreateContainer(value interface{}, wgs []WaitGroup) (JobContainer, parsley.Error) + func (n *NodeContainer) Node() Node + func (n *NodeContainer) Run() (pending bool, err parsley.Error) + func (n *NodeContainer) SetDependency(dep Container) + type ParameterConfig struct + Input *bool + Output *bool + Required *bool + Schema schema.Schema + func (p ParameterConfig) ApplyToParameterConfig(p2 *ParameterConfig) + type ParameterConfigOption interface + ApplyToParameterConfig func(*ParameterConfig) + type ParameterContainer interface + BlockContainer func() BlockContainer + type ParameterDirective interface + ApplyToParameterConfig func(*ParameterConfig) + type ParameterNode interface + IsDeclaration func() bool + Name func() ID + SetSchema func(schema.Schema) + ValueNode func() parsley.Node + type ParseContext struct + func NewParseContext(fileset *parsley.FileSet, idRegistry IDRegistry, ...) *ParseContext + func (p *ParseContext) AddBlockNode(node BlockNode) error + func (p *ParseContext) BlockNode(id ID) (BlockNode, bool) + func (p *ParseContext) BlockTransformerRegistry() parsley.NodeTransformerRegistry + func (p *ParseContext) DirectiveTransformerRegistry() parsley.NodeTransformerRegistry + func (p *ParseContext) FileSet() *parsley.FileSet + func (p *ParseContext) FunctionTransformerRegistry() parsley.NodeTransformerRegistry + func (p *ParseContext) GenerateID() ID + func (p *ParseContext) IDExists(id ID) bool + func (p *ParseContext) New(config ParseContextOverride) *ParseContext + func (p *ParseContext) NewForModule() *ParseContext + func (p *ParseContext) RegisterID(id ID) error + type ParseContextOverride struct + BlockTransformerRegistry parsley.NodeTransformerRegistry + DirectiveTransformerRegistry parsley.NodeTransformerRegistry + FunctionTransformerRegistry parsley.NodeTransformerRegistry + type ParseContextOverrider interface + ParseContextOverride func() ParseContextOverride + type PubSub struct + func NewPubSub() *PubSub + func (p *PubSub) HasSubscribers(id ID) bool + func (p *PubSub) Publish(c Container) + func (p *PubSub) Subscribe(c *NodeContainer, id ID) + func (p *PubSub) Unsubscribe(c *NodeContainer, id ID) + type Result interface + RetryReason func() string + func RetryAfter(duration time.Duration, reason string) Result + type Retry string + func (r Retry) Retry() bool + func (r Retry) RetryAfter() time.Duration + func (r Retry) RetryReason() string + type RetryConfig struct + Limit int + type Retryable interface + Retry func() bool + RetryAfter func() time.Duration + type RuntimeConfig struct + RetryConfig *RetryConfig + Skip *bool + Timeout *time.Duration + Triggers []ID + func (r *RuntimeConfig) ApplyToRuntimeConfig(r2 *RuntimeConfig) + func (r *RuntimeConfig) IsTrigger(trigger ID) bool + type RuntimeConfigOption interface + ApplyToRuntimeConfig func(*RuntimeConfig) + type UserContexter interface + UserContext func(ctx interface{}) interface{} + type VariableNode interface + ParamName func() ID + ParentID func() ID + type WaitGroup interface + Add func(delta int) + Done func(err error) + Err func() error + Wait func() <-chan struct{}