Versions in this module Expand all Collapse all v1 v1.0.0 Oct 10, 2023 Changes in this version + const EventTypeKey + const FieldsKey + const LevelKey + const Logs + const MessageKey + const StartStreaming + const StatusIdleLimitExceeded + const StatusInvalidCommand + const StatusSessionLimitExceeded + const StopStreaming + const TimeKey + const UnknownClientEventType + const UnknownServerEventType + func AsClosed(err error) *websocket.CloseError + func IntoClientEvent[T EventStartStreaming | EventStopStreaming](e *ClientEvent, eventType ClientEventType) (*T, bool) + func IntoServerEvent[T EventLog](e *ServerEvent, eventType ServerEventType) (*T, bool) + func IsClosed(err error, log *zerolog.Logger) bool + func ValidateAccessTokenQueryMiddleware(next http.Handler) http.Handler + func WriteEvent(c *websocket.Conn, ctx context.Context, event any) error + type ClientEvent struct + Type ClientEventType + func ReadClientEvent(c *websocket.Conn, ctx context.Context) (*ClientEvent, error) + type ClientEventType string + type EventLog struct + Logs []*Log + type EventStartStreaming struct + Filters *StreamingFilters + type EventStopStreaming struct + type Log struct + Event LogEventType + Fields map[string]interface{} + Level LogLevel + Message string + Time string + type LogEventType int8 + const HTTP + const Netscale + const TCP + const UDP + func ParseLogEventType(s string) (LogEventType, bool) + func (e *LogEventType) UnmarshalJSON(data []byte) error + func (l LogEventType) MarshalJSON() ([]byte, error) + func (l LogEventType) String() string + type LogLevel int8 + const Debug + const Error + const Info + const Warn + func ParseLogLevel(l string) (LogLevel, bool) + func (l *LogLevel) UnmarshalJSON(data []byte) error + func (l LogLevel) MarshalJSON() ([]byte, error) + func (l LogLevel) String() string + type Logger struct + Log *zerolog.Logger + func NewLogger() *Logger + func (l *Logger) ActiveSession(actor actor) *session + func (l *Logger) ActiveSessions() int + func (l *Logger) Listen(session *session) + func (l *Logger) Remove(session *session) + func (l *Logger) Write(p []byte) (int, error) + func (l *Logger) WriteLevel(level zerolog.Level, p []byte) (n int, err error) + type LoggerListener interface + ActiveSession func(actor) *session + ActiveSessions func() int + Listen func(*session) + Remove func(*session) + type ManagementService struct + Hostname string + func New(managementHostname string, enableDiagServices bool, serviceIP string, ...) *ManagementService + func (m *ManagementService) ServeHTTP(w http.ResponseWriter, r *http.Request) + type ServerEvent struct + Type ServerEventType + func ReadServerEvent(c *websocket.Conn, ctx context.Context) (*ServerEvent, error) + type ServerEventType string + type StreamingFilters struct + Events []LogEventType + Level *LogLevel + Sampling float64