opname

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2019 License: BSD-2-Clause Imports: 1 Imported by: 6

Documentation

Overview

Package opname contains an extensible "operation name" construct for go applications. This allows a user to create a base operation, eg: "createWidget" and then sub-operations such as "pgSaveWidget" and they will get composed such as "createWidget.pgSaveWidget" in log lines. Each operation name adds a lightweight "layer" to the context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx context.Context) (string, bool)

Get fetches the operation name from the given context.

func With

func With(ctx context.Context, name string) context.Context

With stores the current operation name to the context, optionally prepending the existing operation name in the context if it exists.

Types

This section is empty.

Jump to

Keyboard shortcuts

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