MCPcopy Index your code
hub / github.com/1Panel-dev/KubePi / GenLoggingSessionId

Function GenLoggingSessionId

pkg/logging/logging.go:19–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17)
18
19func GenLoggingSessionId() (string, error) {
20 bytes := make([]byte, 16)
21 if _, err := rand.Read(bytes); err != nil {
22 return "", err
23 }
24 id := make([]byte, hex.EncodedLen(len(bytes)))
25 hex.Encode(id, bytes)
26 return string(id), nil
27}
28
29type LogSession struct {
30 Id string

Callers 1

LoggingHandlerMethod · 0.92

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected