sse

package
v0.0.0-...-92766a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

package sse for v1alpha uses the old SSE implemenation from the ESR log listener and the old version of the ETOS client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFrom

func GetFrom(ctx context.Context, url string) ([]string, error)

GetFrom gets all events from an ESR instance

func New

New returns a new SSEApplication object/struct

Types

type SSEApplication

type SSEApplication struct {
	// contains filtered or unexported fields
}

func (*SSEApplication) Close

func (a *SSEApplication) Close()

Close cancels the application context

func (SSEApplication) LoadRoutes

func (a SSEApplication) LoadRoutes(router *httprouter.Router)

LoadRoutes loads all the v1alpha routes.

type SSEHandler

type SSEHandler struct {
	// contains filtered or unexported fields
}

func (SSEHandler) GetEvents

func (h SSEHandler) GetEvents(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

GetEvents is an endpoint for streaming events and logs from an ESR instance.

func (SSEHandler) Selftest

Selftest is a handler to just return 204.

func (SSEHandler) Subscribe

func (h SSEHandler) Subscribe(ch chan<- events.Event, logger *logrus.Entry, ctx context.Context, counter int, identifier string, url string)

Subscribe subscribes to an ETOS suite runner instance and gets logs and events from it and writes them to a channel.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL