context

package
v0.0.0-...-79153e9 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxPoolSize = 1000

MaxPoolSize is max amount of contexts inside pool

Functions

This section is empty.

Types

type Interface

type Interface interface {
	wd.Watchdog

	// Closes context and marks it as finished
	Close()

	// StartedAt returns time, this context was created
	StartedAt() time.Time

	// GetID returns context ID, unique for each one
	ID() rays.RayID

	// WithMarker returns clone of context (with same ID), but with new marker
	WithMarker(marker string) Interface

	// With returns clone of context (with same ID), but with new marker and metrics prefix
	With(marker, metricsPrefix string) Interface
}

Interface describes application execution context

func ListActive

func ListActive() []Interface

ListActive returns list of currently active tokens

func New

func New(marker, metricsPrefix string) Interface

New builds new pooled context

Jump to

Keyboard shortcuts

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