You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fuzzy_backend_redis.h 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*-
  2. * Copyright 2016 Vsevolod Stakhov
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef SRC_LIBSERVER_FUZZY_BACKEND_REDIS_H_
  17. #define SRC_LIBSERVER_FUZZY_BACKEND_REDIS_H_
  18. #include "config.h"
  19. #include "fuzzy_backend.h"
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. /*
  24. * Subroutines for fuzzy_backend
  25. */
  26. void *rspamd_fuzzy_backend_init_redis(struct rspamd_fuzzy_backend *bk,
  27. const ucl_object_t *obj,
  28. struct rspamd_config *cfg,
  29. GError **err);
  30. void rspamd_fuzzy_backend_check_redis(struct rspamd_fuzzy_backend *bk,
  31. const struct rspamd_fuzzy_cmd *cmd,
  32. rspamd_fuzzy_check_cb cb, void *ud,
  33. void *subr_ud);
  34. void rspamd_fuzzy_backend_update_redis(struct rspamd_fuzzy_backend *bk,
  35. GArray *updates, const char *src,
  36. rspamd_fuzzy_update_cb cb, void *ud,
  37. void *subr_ud);
  38. void rspamd_fuzzy_backend_count_redis(struct rspamd_fuzzy_backend *bk,
  39. rspamd_fuzzy_count_cb cb, void *ud,
  40. void *subr_ud);
  41. void rspamd_fuzzy_backend_version_redis(struct rspamd_fuzzy_backend *bk,
  42. const char *src,
  43. rspamd_fuzzy_version_cb cb, void *ud,
  44. void *subr_ud);
  45. const char *rspamd_fuzzy_backend_id_redis(struct rspamd_fuzzy_backend *bk,
  46. void *subr_ud);
  47. void rspamd_fuzzy_backend_expire_redis(struct rspamd_fuzzy_backend *bk,
  48. void *subr_ud);
  49. void rspamd_fuzzy_backend_close_redis(struct rspamd_fuzzy_backend *bk,
  50. void *subr_ud);
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54. #endif /* SRC_LIBSERVER_FUZZY_BACKEND_REDIS_H_ */