state

package
v0.13.8 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware() parapet.Middleware

Middleware injects empty state context to request and set all state values to logger

func NewContext

func NewContext(parent context.Context, s State) context.Context

NewContext creates new value context with given State

Types

type State

type State map[string]string

State holds request state

It's not safe for concurrent use by multiple goroutines.

func Get

func Get(ctx context.Context) State

Get gets state from context

Jump to

Keyboard shortcuts

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