config

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultKeys = []string{
	"request_id",
	"req_id",
	"trace_id",
	"correlation_id",
}

Functions

func GetConfigPath added in v0.7.0

func GetConfigPath(path string) (string, error)

Types

type Config

type Config struct {
	Version     bool
	Dir         string
	SearchValue string
	IgnoreCase  bool
	Keys        []string
	Since       string
	Limit       int
	Recursive   bool
	Services    []string
	Latest      bool
	Context     int
	Fields      []string
	Verbose     bool

	Source Source
	Follow bool

	Output OutputFormat
	Format LogFormat

	Host   string
	Config *SSH
}

type Defaults added in v0.7.0

type Defaults struct {
	Key     string        `yaml:"key"`
	Timeout time.Duration `yaml:"timeout"`
}

type Host added in v0.7.0

type Host struct {
	Host    string        `yaml:"host"`
	User    string        `yaml:"user"`
	Port    int           `yaml:"port"`
	Key     string        `yaml:"key"`
	Timeout time.Duration `yaml:"timeout"`
}

type LogFormat

type LogFormat string
const (
	FormatAuto LogFormat = "auto"
	FormatJSON LogFormat = "json"
	FormatText LogFormat = "text"
)

type OutputFormat

type OutputFormat string
const (
	OutputPretty OutputFormat = "pretty"
	OutputJSON   OutputFormat = "json"
)

type SSH added in v0.7.0

type SSH struct {
	Defaults Defaults        `yaml:"defaults"`
	Hosts    map[string]Host `yaml:"hosts"`
}

func NewSSH added in v0.7.0

func NewSSH(path string) (*SSH, error)

func ParseSSH added in v0.7.0

func ParseSSH(data []byte) (*SSH, error)

type Source

type Source string
const (
	SourceFile   Source = "file"
	SourceDocker Source = "docker"
)

Jump to

Keyboard shortcuts

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