ctx

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2017 License: MIT Imports: 3 Imported by: 2

Documentation

Overview

Package ctx defines the context types, which carry information defined for a specific scope (application, request, ...) A context can be passed across API boundaries and between processes.

Incoming requests to a server should create a Context, and outgoing calls to servers should accept a Context. The chain of function calls between must propagate the Context, optionally replacing it with a modified copy.

Programs that use Contexts should follow these rules to keep interfaces consistent across packages and enable static analysis tools to check context propagation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ctx

type Ctx interface {
	netCtx.Context

	Logger
	Stats
}

Ctx is the root interface that defines a context

type Logger

type Logger interface {
	Trace(tag, msg string, fields ...log.Field)
	Warning(tag, msg string, fields ...log.Field)
	Error(tag, msg string, fields ...log.Field)
}

Logger provides the core interface for logging

type Stats

type Stats interface {
	Stats() stats.Stats
}

Stats provides the core interface for stats

Directories

Path Synopsis
Package app defines an application context, which carries information about the application environment.
Package app defines an application context, which carries information about the application environment.
Package journey defines a context type, which carries information about a specific inbound request.
Package journey defines a context type, which carries information about a specific inbound request.

Jump to

Keyboard shortcuts

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