wrap

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnWarContext

func UnWarContext(parentCtx stdContext.Context) stdContext.Context

UnWarContext 解包基础context

Types

type Context

type Context struct {
	stdContext.Context
	// contains filtered or unexported fields
}

func (*Context) Abort

func (c *Context) Abort(err error)

func (*Context) Args

func (c *Context) Args(i int) interface{}

func (*Context) IsAbort

func (c *Context) IsAbort() error

func (*Context) Name

func (c *Context) Name() string

func (*Context) Next

func (c *Context) Next()

func (*Context) WithContext

func (c *Context) WithContext(ctx stdContext.Context) *Context

type Handler

type Handler func(ctx *Context)

type Wrap

type Wrap struct {
	// contains filtered or unexported fields
}

func New

func New() *Wrap

func (*Wrap) Run

func (w *Wrap) Run(sctx stdContext.Context, name string, args []interface{}, handler Handler) error

func (*Wrap) Wrap

func (w *Wrap) Wrap(f Handler) *Wrap

Jump to

Keyboard shortcuts

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