reqctx

package
v1.1.19 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WithLogger = logging.WithLogger

Functions

func Logger

func Logger(ctx context.Context) *zap.Logger

func ModuleExecutionTracing added in v1.1.4

func ModuleExecutionTracing(ctx context.Context) bool

func ReqStats

func ReqStats(ctx context.Context) *metrics.Stats

func Tracer

func Tracer(ctx context.Context) ttrace.Tracer

func WithModuleExecutionTracing added in v1.1.4

func WithModuleExecutionTracing(ctx context.Context) context.Context

func WithReqStats

func WithReqStats(ctx context.Context, stats *metrics.Stats) context.Context

func WithRequest

func WithRequest(ctx context.Context, req *RequestDetails) context.Context

func WithTracer

func WithTracer(ctx context.Context, tracer ttrace.Tracer) context.Context

Types

type ISpan

type ISpan interface {
	ttrace.Span

	EndWithErr(e *error)
}

func Span

func Span(ctx context.Context) ISpan

func WithModuleExecutionSpan added in v1.1.4

func WithModuleExecutionSpan(ctx context.Context, name string) (context.Context, ISpan)

func WithSpan

func WithSpan(ctx context.Context, name string) (context.Context, ISpan)

type IsOutputModuleFunc added in v0.1.0

type IsOutputModuleFunc func(name string) bool

type RequestDetails added in v0.1.0

type RequestDetails struct {
	Modules *pbsubstreams.Modules

	DebugInitialStoreSnapshotForModules []string
	OutputModule                        string
	// What the user requested, derived from either the Request.StartBlockNum or Request.Cursor
	ResolvedStartBlockNum uint64
	ResolvedCursor        string

	LinearHandoffBlockNum uint64
	LinearGateBlockNum    uint64
	StopBlockNum          uint64
	MaxParallelJobs       uint64
	CacheTag              string
	UniqueID              uint64

	ProductionMode bool
	IsTier2Request bool
	Tier2Stage     int
}

func Details

func Details(ctx context.Context) *RequestDetails

func (*RequestDetails) IsOutputModule added in v0.1.0

func (d *RequestDetails) IsOutputModule(modName string) bool

func (*RequestDetails) ShouldReturnWrittenPartials added in v1.0.2

func (d *RequestDetails) ShouldReturnWrittenPartials(modName string) bool

func (*RequestDetails) ShouldStreamCachedOutputs added in v0.1.0

func (d *RequestDetails) ShouldStreamCachedOutputs() bool

func (*RequestDetails) UniqueIDString added in v1.1.4

func (d *RequestDetails) UniqueIDString() string

type TracingConf added in v1.1.4

type TracingConf struct {
	ModuleExecution bool
}

func NewTracingConf added in v1.1.4

func NewTracingConf(
	moduleExecution bool,
) *TracingConf

Jump to

Keyboard shortcuts

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