Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatUsageLines ¶
FormatUsageLines returns the canonical two-line CLI output for usage info.
Types ¶
type Options ¶
type Options struct {
Debug bool
MaxAttempts int
// Command overrides GROK_SHOW_USAGE_COMMAND.
Command string
// TimeoutSeconds overrides GROK_SHOW_USAGE_TIMEOUT when > 0.
TimeoutSeconds int
}
Options configures FetchUsage. Command/TimeoutSeconds override env hooks so tests need not Setenv under Parallel.
type UsageInfo ¶
UsageInfo holds parsed grok /usage show output.
func FetchUsage ¶
FetchUsage launches grok in a PTY, submits /usage show, and parses the response.
func FetchUsageWithOptions ¶
FetchUsageWithOptions launches grok with optional verbose logging and retries.
func ParseShowUsageOutput ¶
ParseShowUsageOutput extracts weekly limit and next reset from grok scrollback or stdout.
Click to show internal directories.
Click to hide internal directories.