Miroslav Zagorac | 70230c6 | 2020-12-09 16:54:31 +0100 | [diff] [blame] | 1 | /*** |
| 2 | * Copyright 2020 HAProxy Technologies |
| 3 | * |
| 4 | * This file is part of the HAProxy OpenTracing filter. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; either version 2 |
| 9 | * of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 19 | */ |
| 20 | #ifndef _OPENTRACING_VARS_H_ |
| 21 | #define _OPENTRACING_VARS_H_ |
| 22 | |
| 23 | #define FLT_OT_VARS_SCOPE "txn" |
| 24 | #define FLT_OT_VAR_CHAR_DASH 'D' |
| 25 | #define FLT_OT_VAR_CHAR_SPACE 'S' |
| 26 | |
| 27 | |
| 28 | #ifndef DEBUG_OT |
| 29 | # define flt_ot_vars_dump(...) while (0) |
| 30 | #else |
| 31 | void flt_ot_vars_dump(struct stream *s); |
| 32 | #endif |
| 33 | int flt_ot_var_register(const char *scope, const char *prefix, const char *name, char **err); |
| 34 | int flt_ot_var_set(struct stream *s, const char *scope, const char *prefix, const char *name, const char *value, uint opt, char **err); |
| 35 | int flt_ot_var_unset(struct stream *s, const char *scope, const char *prefix, const char *name, uint opt, char **err); |
| 36 | int flt_ot_vars_unset(struct stream *s, const char *scope, const char *prefix, uint opt, char **err); |
| 37 | int flt_ot_var_get(struct stream *s, const char *scope, const char *prefix, const char *name, char **value, uint opt, char **err); |
| 38 | struct otc_text_map *flt_ot_vars_get(struct stream *s, const char *scope, const char *prefix, uint opt, char **err); |
| 39 | |
| 40 | #endif /* _OPENTRACING_VARS_H_ */ |
| 41 | |
| 42 | /* |
| 43 | * Local variables: |
| 44 | * c-indent-level: 8 |
| 45 | * c-basic-offset: 8 |
| 46 | * End: |
| 47 | * |
| 48 | * vi: noexpandtab shiftwidth=8 tabstop=8 |
| 49 | */ |