logging

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogSessions = SessionMap{Sessions: make(map[string]LogSession)}

Functions

func CreateLoggingHandler

func CreateLoggingHandler(path string) http.Handler

func GenLoggingSessionId

func GenLoggingSessionId() (string, error)

func WaitForLoggingStream

func WaitForLoggingStream(k8sClient kubernetes.Interface, namespace string, pod string, container string, tailLines int, follow bool, sessionId string)

Types

type LogMessage

type LogMessage struct {
	SessionID string
	Data      string
}

type LogSession

type LogSession struct {
	Id    string
	Bound chan error
	// contains filtered or unexported fields
}

type SessionMap

type SessionMap struct {
	Sessions map[string]LogSession
	Lock     sync.Mutex
}

func (*SessionMap) Close

func (sm *SessionMap) Close(sessionId, reason string, status uint32)

func (*SessionMap) Get

func (sm *SessionMap) Get(sessionId string) LogSession

func (*SessionMap) Set

func (sm *SessionMap) Set(sessionId string, session LogSession)

Jump to

Keyboard shortcuts

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