MCPcopy Create free account
hub / github.com/apache/skywalking-php / hook_memcache_server

Method hook_memcache_server

src/plugin/plugin_memcache.rs:141–161  ·  view source on GitHub ↗
(
        &self, class_name: Option<String>, function_name: String, style: ApiStyle,
    )

Source from the content-addressed store, hash-verified

139
140impl MemcachePlugin {
141 fn hook_memcache_server(
142 &self, class_name: Option<String>, function_name: String, style: ApiStyle,
143 ) -> (Box<BeforeExecuteHook>, Box<AfterExecuteHook>) {
144 (
145 Box::new(move |_, execute_data| {
146 let this = style.get_this_mut(execute_data)?;
147 let handle = this.handle();
148 PEER_MAP.remove(&handle);
149
150 debug!(
151 handle,
152 ?class_name,
153 function_name,
154 "remove peers cache when server added"
155 );
156
157 Ok(Box::new(()))
158 }),
159 Noop::noop(),
160 )
161 }
162
163 #[instrument(skip_all)]
164 fn hook_memcache_empty_methods(

Callers 1

hookMethod · 0.80

Calls 1

get_this_mutMethod · 0.80

Tested by

no test coverage detected