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

Method hook

src/plugin/plugin_memcached.rs:155–179  ·  view source on GitHub ↗
(
        &self, class_name: Option<&str>, function_name: &str,
    )

Source from the content-addressed store, hash-verified

153 }
154
155 fn hook(
156 &self, class_name: Option<&str>, function_name: &str,
157 ) -> Option<(
158 Box<crate::execute::BeforeExecuteHook>,
159 Box<crate::execute::AfterExecuteHook>,
160 )> {
161 match (class_name, function_name) {
162 (Some(class_name @ "Memcached"), f)
163 if MEMCACHE_EMPTY_METHOD_MAPPING.contains_key(&*f.to_ascii_lowercase()) =>
164 {
165 Some(self.hook_memcached_empty_methods(class_name, function_name))
166 }
167 (Some(class_name @ "Memcached"), f)
168 if MEMCACHE_KEY_METHOD_MAPPING.contains_key(&*f.to_ascii_lowercase()) =>
169 {
170 Some(self.hook_memcached_key_methods(class_name, function_name))
171 }
172 (Some(class_name @ "Memcached"), f)
173 if MEMCACHE_SERVER_KEY_METHOD_MAPPING.contains_key(&*f.to_ascii_lowercase()) =>
174 {
175 Some(self.hook_memcached_server_key_methods(class_name, function_name))
176 }
177 _ => None,
178 }
179 }
180}
181
182impl MemcachedPlugin {

Callers

nothing calls this directly

Tested by

no test coverage detected