contexts

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildContext

func BuildContext(ctx context.Context, ctxFns ...PartialContextFn) context.Context

func GetRequestID

func GetRequestID(ctx context.Context) string

Types

type ContextKey

type ContextKey int
const (
	OperationKey ContextKey = iota
	DefaultErrsKindKey
	DefaultErrsSeverityKey
)

type Operation

type Operation string

func (Operation) String

func (o Operation) String() string

type Operations

type Operations struct {
	Stack []Operation
}

func GetContextOperations

func GetContextOperations(ctx context.Context) Operations

func (*Operations) Add

func (ops *Operations) Add(op Operation)

func (Operations) Contains

func (ops Operations) Contains(wanted Operation) (result bool)

func (Operations) Empty

func (ops Operations) Empty() bool

func (Operations) Equal

func (ops Operations) Equal(ops2 Operations) bool

func (Operations) First

func (ops Operations) First() Operation

func (Operations) Last

func (ops Operations) Last() Operation

func (Operations) String

func (ops Operations) String() string

type PartialContextFn

type PartialContextFn func(context.Context) context.Context

func AddContextOperation

func AddContextOperation(op Operation) PartialContextFn

func SetContextOperation

func SetContextOperation(op Operation) PartialContextFn

Jump to

Keyboard shortcuts

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