Documentation ¶
Index ¶
Constants ¶
View Source
const (
LogEntry = "%s %s\n"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntryWriter ¶
type Push ¶
type Push struct {
// contains filtered or unexported fields
}
Push is a io.Writer, that writes given log entries by pushing directly to the given loki server URL. Each `Push` instance handles for a single tenant. No batching of log lines happens when sending to Loki.
func NewPush ¶
func NewPush( lokiAddr, tenantID string, timeout time.Duration, cfg config.HTTPClientConfig, labelName, labelValue string, streamName, streamValue string, useTLS bool, tlsCfg *tls.Config, caFile, certFile, keyFile string, username, password string, backoffCfg *backoff.Config, logger log.Logger, ) (*Push, error)
NewPush creates an instance of `Push` which writes logs directly to given `lokiAddr`
type StreamWriter ¶
type StreamWriter struct {
// contains filtered or unexported fields
}
func NewStreamWriter ¶
func NewStreamWriter(w io.Writer, logger log.Logger) *StreamWriter
func (*StreamWriter) Stop ¶
func (s *StreamWriter) Stop()
func (*StreamWriter) WriteEntry ¶
func (s *StreamWriter) WriteEntry(ts time.Time, entry string)
Click to show internal directories.
Click to hide internal directories.