Documentation ¶
Index ¶
- type DerivedField
- type Loki
- type Option
- func BasicAuth(username string, password string) Option
- func Default() Option
- func DerivedFields(fields ...DerivedField) Option
- func ForwardCookies(cookies ...string) Option
- func ForwardOauthIdentity() Option
- func MaximumLines(max int) Option
- func SkipTLSVerify() Option
- func Timeout(timeout time.Duration) Option
- func WithCertificate(certificate string) Option
- func WithCredentials() Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DerivedField ¶
type DerivedField struct { Name string `json:"name"` URL string `json:"url"` // Used to parse and capture some part of the log message. You can use the captured groups in the template. Regex string `json:"matcherRegex"` // Used to override the button label when this derived field is found in a log. // Optional. URLDisplayLabel string `json:"urlDisplayLabel,omitempty"` // For internal links // Optional. DatasourceUID string `json:"datasourceUid,omitempty"` }
type Loki ¶
type Loki struct {
// contains filtered or unexported fields
}
func (Loki) MarshalJSON ¶
type Option ¶
type Option func(datasource *Loki)
func DerivedFields ¶
func DerivedFields(fields ...DerivedField) Option
DerivedFields defines fields can be used to extract new fields from a log message and create a link from its value.
func ForwardCookies ¶
ForwardCookies configures a list of cookies that should be forwarded to the datasource.
func ForwardOauthIdentity ¶
func ForwardOauthIdentity() Option
ForwardOauthIdentity forward the user's upstream OAuth identity to the data source (Their access token gets passed along).
func MaximumLines ¶
MaximumLines sets the maximum number of lines returned by Loki (default: 1000). Increase this value to have a bigger result set for ad-hoc analysis. Decrease this limit if your browser becomes sluggish when displaying the log results.
func SkipTLSVerify ¶
func SkipTLSVerify() Option
SkipTLSVerify disables verification of SSL certificates.
func WithCertificate ¶
WithCertificate sets a self-signed certificate that can be verified against.
func WithCredentials ¶
func WithCredentials() Option
WithCredentials joins credentials such as cookies or auth headers to cross-site requests.