opname

package
Version: v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: BSD-2-Clause Imports: 1 Imported by: 12

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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto