Documentation
¶
Overview ¶
Package client builds a Loki client from the connection options logcli takes.
Index ¶
Constants ¶
const DefaultAddr = "http://localhost:3100"
DefaultAddr is where logcli looks for Loki without an address.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Info ¶
type Info struct {
Addr string
Tenant string
Auth string // how requests authenticate: basic as a user, a bearer token, or none
}
Info describes the connection for the header.
type Options ¶
type Options struct {
Addr string
Username string
Password string
OrgID string
BearerToken string
BearerTokenFile string
AuthHeader string
CACert string
Cert string
Key string
TLSSkipVerify bool
ServerName string
}
Options are the connection settings, named after the logcli flags and environment variables.
func OptionsFromEnv ¶
func OptionsFromEnv() Options
OptionsFromEnv reads the environment variables logcli reads.