ln: within.website/ln/opname Index | Files

package opname

import "within.website/ln/opname"

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.


Package Files


func Get Uses

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

Get fetches the operation name from the given context.

func With Uses

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.

Package opname imports 1 packages (graph) and is imported by 25 packages. Updated 2019-03-23. Refresh now. Tools for package owners.