labels.pxd 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. from libcpp cimport bool
  2. from util.generic.maybe cimport TMaybe
  3. from util.generic.string cimport TStringBuf, TString
  4. cdef extern from "library/cpp/monlib/metrics/labels.h" namespace "NMonitoring" nogil:
  5. cdef cppclass ILabel:
  6. const TStringBuf Name() const
  7. const TStringBuf Value() const
  8. cdef cppclass ILabels:
  9. bool Add(TStringBuf name, TStringBuf value)
  10. bool Add(const TString& name, const TString& value)
  11. size_t Size() const
  12. cdef cppclass TLabel:
  13. TLabel() except +
  14. TLabel(TStringBuf name, TStringBuf value) except +
  15. const TString& Name() const
  16. const TString& Value() const
  17. TString ToString() const
  18. bool operator!=(const TLabel&) const
  19. bool operator==(const TLabel&) const
  20. cdef cppclass TLabels:
  21. cppclass const_iterator:
  22. const TLabel& operator*() const
  23. bool operator!=(const_iterator) const
  24. bool operator==(const_iterator) const
  25. TLabels() except +
  26. bool Add(const TLabel&) except +
  27. bool Add(TStringBuf name, TStringBuf value) except +
  28. bool Add(const TString& name, const TString& value) except +
  29. bool operator==(const TLabels&) const
  30. TMaybe[TLabel] Find(TStringBuf name) const
  31. TMaybe[TLabel] Extract(TStringBuf name) except +
  32. size_t Size() const
  33. const_iterator begin() const
  34. const_iterator end() const