log

package
v0.0.0-...-2f5b9ad Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogsTitleStyle = func() lipgloss.Style {
		b := lipgloss.RoundedBorder()
		b.Right = "├"
		return lipgloss.NewStyle().BorderStyle(b).Padding(0, 1)
	}()

	InfoStyle = func() lipgloss.Style {
		b := lipgloss.RoundedBorder()
		b.Left = "┤"
		return LogsTitleStyle.Copy().BorderStyle(b)
	}()
)

Functions

func CacheLogs

func CacheLogs(logs *Logs, newlogs chan interface{})

func JsonRendered

func JsonRendered(line string) string

func NewViewport

func NewViewport() viewport.Model

func Route

func Route(cmds ...tea.Cmd) []tea.Cmd

Types

type LogJson

type LogJson struct {
	Timestamp time.Time `json:"@timestamp"`
	Level     string    `json:"level"`
	Message   string    `json:"message"`
}

func (LogJson) Render

func (l LogJson) Render() string

type Logs

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

func NewLogs

func NewLogs() *Logs

func (*Logs) AppendLines

func (l *Logs) AppendLines(line string)

func (Logs) FilterAndTruncate

func (l Logs) FilterAndTruncate(filterBy string, length int) []string

func (Logs) FilterAndWrap

func (l Logs) FilterAndWrap(filterBy string, length int) []string

func (Logs) TruncatedLines

func (l Logs) TruncatedLines(length int) []string

type Message

type Message interface {
	// contains filtered or unexported methods
}

type MessageHandler

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

func NewHandler

func NewHandler(service k8mpasskube.ILogService) *MessageHandler

func (*MessageHandler) CloseLogs

func (handler *MessageHandler) CloseLogs()

func (*MessageHandler) FollowLogs

func (handler *MessageHandler) FollowLogs(namespace string, pod string, logs *Logs)

func (*MessageHandler) TickUpdateLogs

func (handler *MessageHandler) TickUpdateLogs() tea.Msg

type RoutedMsg

type RoutedMsg struct {
	Embedded tea.Msg
}

type UpdateLogsMsg

type UpdateLogsMsg struct{}

Jump to

Keyboard shortcuts

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