server

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventBroker added in v1.2.0

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

func NewEventBroker added in v1.2.0

func NewEventBroker(logger *slog.Logger) *EventBroker

func (*EventBroker) Broadcast added in v1.2.0

func (b *EventBroker) Broadcast(event SSEEvent)

func (*EventBroker) ClientCount added in v1.2.0

func (b *EventBroker) ClientCount() int

func (*EventBroker) ServeHTTP added in v1.2.0

func (b *EventBroker) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*EventBroker) Subscribe added in v1.2.0

func (b *EventBroker) Subscribe() *sseClient

func (*EventBroker) Unsubscribe added in v1.2.0

func (b *EventBroker) Unsubscribe(c *sseClient)

type RequestLogWriter

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

func NewRequestLogWriter

func NewRequestLogWriter(store storage.Store, logger *slog.Logger) *RequestLogWriter

func (*RequestLogWriter) Run

func (w *RequestLogWriter) Run(ctx context.Context)

func (*RequestLogWriter) Send

func (w *RequestLogWriter) Send(log *storage.RequestLog)

type SSEEvent added in v1.2.0

type SSEEvent struct {
	Type string `json:"type"`
	Data any    `json:"data"`
}

type Server

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

func NewServer

func NewServer(cfg *config.Config, store storage.Store, pipeline *monitor.Pipeline, dispatcher *notifier.Dispatcher, subNotifier *notifier.SubscriberNotifier, logger *slog.Logger, version string) *Server

func (*Server) EventBroker added in v1.2.0

func (s *Server) EventBroker() *EventBroker

func (*Server) RequestLogWriter

func (s *Server) RequestLogWriter() *RequestLogWriter

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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