trap

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2025 License: MIT Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFuncInterceptor added in v1.0.23

func AddFuncInterceptor(f interface{}, interceptor *Interceptor) func()

AddFuncInterceptor add func interceptor

func AddInterceptor

func AddInterceptor(interceptor *Interceptor) func()

AddInterceptor add a general interceptor

Types

type Interceptor

type Interceptor struct {
	Pre  func(ctx context.Context, f *core.FuncInfo, args core.Object, result core.Object) (data interface{}, err error)
	Post func(ctx context.Context, f *core.FuncInfo, args core.Object, result core.Object, data interface{}) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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