Class EventListFilter


  • public class EventListFilter
    extends Object
    • Constructor Detail

      • EventListFilter

        public EventListFilter​(EventList events)
    • Method Detail

      • ofEventTypes

        public EventListFilter ofEventTypes​(String... types)
        Filter events of types defined in the array (case insensitive). For example: Warning, Normal, ...
      • ofObjKinds

        public EventListFilter ofObjKinds​(String... kinds)
        Filter events with involved object kind defined in the array (case insensitive). For example: Warning, Normal, ...
      • atLeastOneRegexMessages

        public boolean atLeastOneRegexMessages​(String... messagesRegex)
        Return true if there is at least one event that match one of the given messages (reg. expressions)
      • ofMessages

        public EventListFilter ofMessages​(String... messagesRegex)
        Filter events with messages (reg. expressions) defined in the array.
      • ofObjNames

        public EventListFilter ofObjNames​(String... regexNames)
        Filter events with involved object name defined in the array of reg. expressions.
      • inOneOfTimeWindows

        public EventListFilter inOneOfTimeWindows​(ZonedDateTime... dates)
        Filter events that are last seen in any if given time windows. A structure of the array should be: [from date], [until date], [from date] [until date],... Event needs to be seen strictly after from date and before or at the same time as until date. ZonedDateTime is used because a OpenShift cluster is distributed and time is provided in DateTimeFormatter.ISO_DATE_TIME format that consider time zones. Therefore wee need to compare it against ZonedDateTime.now() (for example)
        See Also:
        ZonedDateTime
      • getStream

        public Stream<io.fabric8.kubernetes.api.model.Event> getStream()
      • ofReasons

        public EventListFilter ofReasons​(String... reasons)
        Filter events with involved object kind defined in the array (case insensitive).
      • count

        public long count()