interceptor:库可轻松拦截Elixir函数调用

时间:2021-03-19 20:57:26
【文件属性】:
文件名称:interceptor:库可轻松拦截Elixir函数调用
文件大小:96KB
文件格式:ZIP
更新时间:2021-03-19 20:57:26
Elixir Interceptor库允许您通过配置拦截函数并使用Interceptor.intercept/1宏或@intercept true批注来拦截函数调用。 安装 可以通过将interceptor添加到mix.exs中的依赖项列表中来安装该软件包: def deps do [ { :interceptor , " ~> 0.5.3 " } ] end 入门 使用Interceptor.Configurator模块创建一个模块: defmodule Interception . Config do use Interceptor . Configurator intercept " Intercepted.abc/1 " , before: " MyInterceptor.intercept_before/1 " , after: " MyInterc
【文件预览】:
interceptor-master
----mix.lock(3KB)
----.gitignore(593B)
----mix.exs(1KB)
----assets()
--------images()
----.formatter.exs(97B)
----LICENSE(1KB)
----CHANGELOG.md(4KB)
----.github()
--------workflows()
----README.md(5KB)
----config()
--------test.exs(144B)
--------config.exs(125B)
--------dev.exs(544B)
----lib()
--------debug.ex(480B)
--------configuration()
--------annotated_interceptor.ex(7KB)
--------interceptor.ex(22KB)
--------function_arguments.ex(5KB)
--------utils.ex(3KB)
----test()
--------function_arguments_test.exs(12KB)
--------intercepted_modules()
--------utils_test.exs(3KB)
--------support()
--------annotated()
--------test_helper.exs(15B)
--------configuration()
--------do_block()

网友评论