common

package
v0.0.0-...-3dbc725 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLogLines = 100
)

Variables

This section is empty.

Functions

func HandleError

func HandleError(c *gin.Context, err error, id string, operation string, logger *slog.Logger, notFoundMsg string) bool

func HandleStreamingOutput

func HandleStreamingOutput(
	ctx context.Context,
	c *gin.Context,
	outputCh <-chan string,
	errCh <-chan error,
	id string,
	logger *slog.Logger,
)

HandleStreamingOutput handles streaming output from a channel to SSE events

func ParseLogQueryParams

func ParseLogQueryParams(c *gin.Context, logger *slog.Logger) int

ParseLogQueryParams parses the 'lines' query parameter with a default value

func SetupSSE

func SetupSSE(c *gin.Context)

SetupSSE configures response headers for Server-Sent Events

Types

This section is empty.

Jump to

Keyboard shortcuts

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