Documentation ¶
Index ¶
Constants ¶
View Source
const ( Dev string = "development" Prod string = "production" )
Variables ¶
This section is empty.
Functions ¶
func InitGlobalLogger ¶
func InitGlobalLogger(c LogConfig)
Types ¶
type LokiClient ¶
type LokiClient struct { Job string ApiUrl string ApiUser string ApiPwd string Debug bool BuffSize int // contains filtered or unexported fields }
func NewLokiClient ¶
func NewLokiClient(job, apiUrl, user, pwd string, buff int) *LokiClient
func (*LokiClient) Error ¶
func (c *LokiClient) Error(msg string)
func (*LokiClient) Info ¶
func (c *LokiClient) Info(msg string)
func (*LokiClient) Start ¶
func (c *LokiClient) Start()
func (*LokiClient) Stop ¶
func (c *LokiClient) Stop()
func (*LokiClient) Warn ¶
func (c *LokiClient) Warn(msg string)
type StreamObject ¶
type StreamObject struct { Stream map[string]string `json:"stream"` Values [][]string `json:"values"` }
func NewStreamObject ¶
func NewStreamObject(labels Labels) *StreamObject
func (*StreamObject) AddLogItem ¶
func (s *StreamObject) AddLogItem(log ...string)
type Streams ¶
type Streams struct {
Streams []*StreamObject `json:"streams"`
}
func NewStreams ¶
func NewStreams(streams ...*StreamObject) *Streams
Click to show internal directories.
Click to hide internal directories.