ctex

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyCore ctxKey = iota
	KeySessionStore
	KeyInstanceStore
	KeyRouter
)

Variables

This section is empty.

Functions

func AfterFrame

func AfterFrame(ctx context.Context) (*shredder.AfterFrame, bool)

func ClearFreeCtx

func ClearFreeCtx(ctx context.Context) context.Context

func Frame

func FrameInfect

func FrameInfect(source context.Context, target context.Context) context.Context

func FrameInsert

func FrameInsert(ctx context.Context) (context.Context, *shredder.AfterFrame)

func FrameRemove

func FrameRemove(ctx context.Context) context.Context

func IsFreeCtx

func IsFreeCtx(ctx context.Context) bool

func LogCanceled

func LogCanceled(ctx context.Context, action string)

func LogFreeWarning

func LogFreeWarning(ctx context.Context, entity string, operation string)

func NewFreeContext

func NewFreeContext(ctx context.Context, runtime context.Context) context.Context

Types

type Store

type Store = *store

Store is goroutine-safe key-value storage.

func NewStore

func NewStore() Store

NewStore creates an empty Store.

func (Store) Init

func (c Store) Init(key any, new func() any) any

Init returns the value stored under key, creating it with new if needed.

func (Store) Load

func (c Store) Load(key any) any

Load returns the value stored under key or nil if key is absent.

func (Store) Remove

func (c Store) Remove(key any) any

Remove deletes the value stored under key and returns it.

func (Store) Save

func (c Store) Save(key any, value any) any

Save stores value under key and returns the previous value.

Jump to

Keyboard shortcuts

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