diff options
author | robot-ydb-importer <robot-ydb-importer@yandex-team.com> | 2024-02-14 19:47:36 +0300 |
---|---|---|
committer | Innokentii Mokin <innokentii@ydb.tech> | 2024-02-16 18:35:13 +0000 |
commit | d6ee6054676c603f8afb27b5bd8ce7fe0a5bfbc0 (patch) | |
tree | 4aa69116e7818a4aae0bfedbfa29639b0f0b90e8 /library/python/monlib/labels.pxd | |
parent | 59ded8ecfcd805c109471346a0d4d1f269bdaa59 (diff) | |
download | ydb-d6ee6054676c603f8afb27b5bd8ce7fe0a5bfbc0.tar.gz |
YDB Import 566
96265cd0cc64e1b9bb31fe97b915ed2a09caf1cb
Diffstat (limited to 'library/python/monlib/labels.pxd')
-rw-r--r-- | library/python/monlib/labels.pxd | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/library/python/monlib/labels.pxd b/library/python/monlib/labels.pxd new file mode 100644 index 0000000000..cc782433c4 --- /dev/null +++ b/library/python/monlib/labels.pxd @@ -0,0 +1,47 @@ +from libcpp cimport bool + +from util.generic.maybe cimport TMaybe +from util.generic.string cimport TStringBuf, TString + + +cdef extern from "library/cpp/monlib/metrics/labels.h" namespace "NMonitoring" nogil: + cdef cppclass ILabel: + const TStringBuf Name() const + const TStringBuf Value() const + + cdef cppclass ILabels: + bool Add(TStringBuf name, TStringBuf value) + bool Add(const TString& name, const TString& value) + + size_t Size() const + + cdef cppclass TLabel: + TLabel() except + + TLabel(TStringBuf name, TStringBuf value) except + + const TString& Name() const + const TString& Value() const + + TString ToString() const + bool operator!=(const TLabel&) const + bool operator==(const TLabel&) const + + cdef cppclass TLabels: + cppclass const_iterator: + const TLabel& operator*() const + bool operator!=(const_iterator) const + bool operator==(const_iterator) const + + TLabels() except + + + bool Add(const TLabel&) except + + bool Add(TStringBuf name, TStringBuf value) except + + bool Add(const TString& name, const TString& value) except + + bool operator==(const TLabels&) const + + TMaybe[TLabel] Find(TStringBuf name) const + TMaybe[TLabel] Extract(TStringBuf name) except + + + size_t Size() const + + const_iterator begin() const + const_iterator end() const |