Documentation ¶
Index ¶
- func AddUniqueEventsToResult(eventsSubSet []Event, uniqEvents map[Event]bool) map[Event]bool
- func ConvertRuntimeObjToSubscription(sObj runtime.Object) (*emeventingv2alpha1.Subscription, error)
- func GenerateSubscriptionInfFactory(k8sConfig *rest.Config) dynamicinformer.DynamicSharedInformerFactory
- func RespondWithBody(w http.ResponseWriter, events Events, httpCode int)
- func RespondWithErrorAndLog(e error, w http.ResponseWriter)
- func SubscriptionGVR() schema.GroupVersionResource
- type Event
- type Events
- type Processor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddUniqueEventsToResult ¶
AddUniqueEventsToResult returns a map of unique Events which also contains the events eventsSubSet.
func ConvertRuntimeObjToSubscription ¶
func ConvertRuntimeObjToSubscription(sObj runtime.Object) (*emeventingv2alpha1.Subscription, error)
ConvertRuntimeObjToSubscription converts a runtime.Object to a Subscription object by converting to unstructured in between.
func GenerateSubscriptionInfFactory ¶
func GenerateSubscriptionInfFactory(k8sConfig *rest.Config) dynamicinformer.DynamicSharedInformerFactory
GenerateSubscriptionInfFactory generates DynamicSharedInformerFactory for Subscription.
func RespondWithBody ¶
func RespondWithBody(w http.ResponseWriter, events Events, httpCode int)
RespondWithBody sends http response with json body.
func RespondWithErrorAndLog ¶
func RespondWithErrorAndLog(e error, w http.ResponseWriter)
RespondWithErrorAndLog logs error and sends http response with error json body.
func SubscriptionGVR ¶
func SubscriptionGVR() schema.GroupVersionResource
Types ¶
type Event ¶
Event represents basic information about event.
func ConvertEventsMapToSlice ¶
ConvertEventsMapToSlice converts a map of Events to a slice of Events.
func FilterEventTypeVersions ¶
func FilterEventTypeVersions(eventTypePrefix, appName string, subscription *emeventingv2alpha1.Subscription) []Event
FilterEventTypeVersions returns a slice of Events: if the event source matches the appName for typeMatching standard if the <eventTypePrefix>.<appName> is present in the eventType for typeMatching exact.
type Events ¶
type Events struct {
EventsInfo []Event `json:"eventsInfo"`
}
Events represents collection of all events with subscriptions.
type Processor ¶
type Processor struct { SubscriptionLister *cache.GenericLister Prefix string Namespace string Logger *logger.Logger }
func (Processor) ExtractEventsFromSubscriptions ¶
func (p Processor) ExtractEventsFromSubscriptions(writer http.ResponseWriter, request *http.Request)
func (Processor) ExtractEventsFromSubscriptionsV1alpha1 ¶
func (p Processor) ExtractEventsFromSubscriptionsV1alpha1(writer http.ResponseWriter, request *http.Request)