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); |
Miroslav Zagorac | 70230c6 | 2020-12-09 16:54:31 +0100 | [diff] [blame] | 35 | int flt_ot_vars_unset(struct stream *s, const char *scope, const char *prefix, uint opt, char **err); |
Miroslav Zagorac | 70230c6 | 2020-12-09 16:54:31 +0100 | [diff] [blame] | 36 | struct otc_text_map *flt_ot_vars_get(struct stream *s, const char *scope, const char *prefix, uint opt, char **err); |
| 37 | |
| 38 | #endif /* _OPENTRACING_VARS_H_ */ |
| 39 | |
| 40 | /* |
| 41 | * Local variables: |
| 42 | * c-indent-level: 8 |
| 43 | * c-basic-offset: 8 |
| 44 | * End: |
| 45 | * |
| 46 | * vi: noexpandtab shiftwidth=8 tabstop=8 |
| 47 | */ |