Versions in this module Expand all Collapse all v0 v0.22.0 Apr 16, 2024 Changes in this version + type JS struct + Now NowFunc + Output io.Writer + Runtime *goja.Runtime + ScanFn ScanFunc + ScanRequest *v1.Scan + func New() *JS + func (o *JS) GetNow() time.Time + func (o *JS) Print(args ...any) + func (o *JS) PrintLn(args ...any) + func (o *JS) Release() + func (o *JS) RenderMetricsData(data *metricsv1.MetricsData, opts render.MetricsFormatOption) + func (o *JS) RenderMetricsDataJSON(data *metricsv1.MetricsData, opts render.JSONOptions) error + func (o *JS) Reset() + func (o *JS) Run(program *goja.Program) error + func (o *JS) WithData(data *v1.Data) *JS + func (o *JS) WithNow(now NowFunc) *JS + func (o *JS) WithOutput(w io.Writer) *JS + func (o *JS) WithScan(f ScanFunc) *JS + func (r *JS) Scan(a *v1.Scan) (*v1.Data, error) + type NowFunc func() time.Time + type Scan struct + func (s *Scan) Ago(duration string) error + func (s *Scan) Attr(key, value string) + func (s *Scan) Create(resource string) *Scan + func (s *Scan) Limit(limit int64) + func (s *Scan) LogLevel(lvl string) + func (s *Scan) Name(name string) + func (s *Scan) Now(ms int64) + func (s *Scan) Offset(duration string) error + func (s *Scan) ParentSpanID(id string) + func (s *Scan) Resource(resource string) + func (s *Scan) ResourceAttr(key, value string) + func (s *Scan) ResourceSchema(schema string) + func (s *Scan) Reverse() + func (s *Scan) Scan() *v1.Scan + func (s *Scan) ScopeAttr(key, value string) + func (s *Scan) ScopeName(name string) + func (s *Scan) ScopeSchema(schema string) + func (s *Scan) ScopeVersion(version string) + func (s *Scan) SpanID(id string) + func (s *Scan) ThisMonth() + func (s *Scan) ThisWeek() + func (s *Scan) ThisYear() + func (s *Scan) TimeRange(from, to int64) + func (s *Scan) Today() + func (s *Scan) TraceID(id string) + type ScanFunc func(*v1.Scan) (*v1.Data, error)