Documentation
¶
Index ¶
Constants ¶
View Source
const ( LevelDebug = "debug" LevelInfo = "info" LevelWarn = "warn" LevelError = "error" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerSource ¶
type DockerSource struct {
// contains filtered or unexported fields
}
DockerSource streams logs from one or more Docker containers.
func NewDockerSource ¶
func NewDockerSource(services []string) (*DockerSource, error)
func (*DockerSource) Close ¶
func (d *DockerSource) Close() error
func (*DockerSource) Name ¶
func (d *DockerSource) Name() string
func (*DockerSource) Stream ¶
func (d *DockerSource) Stream(ctx context.Context) (<-chan LogEntry, error)
func (*DockerSource) WatchNewContainers ¶
func (d *DockerSource) WatchNewContainers(ctx context.Context)
type FileSource ¶
type FileSource struct {
// contains filtered or unexported fields
}
func NewFileSource ¶
func NewFileSource(patterns []string) (*FileSource, error)
NewFileSource creates a FileSource that tails from EOF — for live watch/tail commands.
func NewFileSourceFromStart ¶
func NewFileSourceFromStart(patterns []string) (*FileSource, error)
NewFileSourceFromStart creates a FileSource that reads from the beginning of each file — for query commands that need to scan historical log data.
func (*FileSource) Close ¶
func (f *FileSource) Close() error
func (*FileSource) Name ¶
func (f *FileSource) Name() string
type KubeOptions ¶
type KubeSource ¶
type KubeSource struct {
// contains filtered or unexported fields
}
func NewKubeSource ¶
func NewKubeSource(opts KubeOptions) (*KubeSource, error)
func (*KubeSource) Close ¶
func (k *KubeSource) Close() error
func (*KubeSource) Name ¶
func (k *KubeSource) Name() string
type LogEntry ¶
type LogEntry struct {
Timestamp time.Time
Service string
Level string
Message string
Fields map[string]any
Raw string
}
LogEntry is the normalized log line from any source
type Source ¶
type Source interface {
Name() string
Stream(ctx context.Context) (<-chan LogEntry, error)
Close() error
}
Source is implemented by docker, k8s, file, stdin
type StdinSource ¶
type StdinSource struct {
// contains filtered or unexported fields
}
func NewStdinSource ¶
func NewStdinSource() *StdinSource
func (*StdinSource) Close ¶
func (s *StdinSource) Close() error
func (*StdinSource) Name ¶
func (s *StdinSource) Name() string
Click to show internal directories.
Click to hide internal directories.