traverse

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enter

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

func NewEnter

func NewEnter(names []string, exprs []expr.Evaluator) *Enter

type Exit

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

func NewExit

func NewExit(scope *Scope, nvar int) *Exit

func (*Exit) Pull

func (e *Exit) Pull(done bool) (zbuf.Batch, error)

type Expr added in v1.1.0

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

Expr provides provides glue to run a traversal subquery in expression context. It implements zbuf.Puller so it can serve as the data source to the subquery as well as expr.Evalulator so it can be called from an expression. Each time its Eval method is called, it propagates the value to the batch channel to be pulled into the scope. If there is just one result, then the value is returned. If there are multiple results then they are returned in an array (with union elements if the type varies).

func NewExpr added in v1.1.0

func NewExpr(ctx context.Context, zctx *zed.Context) *Expr

func (*Expr) Eval added in v1.1.0

func (e *Expr) Eval(ectx expr.Context, this *zed.Value) *zed.Value

func (*Expr) Pull added in v1.1.0

func (e *Expr) Pull(done bool) (zbuf.Batch, error)

func (*Expr) SetExit added in v1.1.0

func (e *Expr) SetExit(exit *Exit)

type Over

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

func NewOver

func NewOver(pctx *op.Context, parent zbuf.Puller, exprs []expr.Evaluator) *Over

func (*Over) AddScope

func (o *Over) AddScope(ctx context.Context, names []string, exprs []expr.Evaluator) *Scope

func (*Over) Pull

func (o *Over) Pull(done bool) (zbuf.Batch, error)

type Scope

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

func (*Scope) NewExit

func (s *Scope) NewExit(subgraph zbuf.Puller) *Exit

func (*Scope) Pull

func (s *Scope) Pull(done bool) (zbuf.Batch, error)

Pull is called by the scoped subgraph. Parent's batch will already be scoped by Over or Into.

Jump to

Keyboard shortcuts

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