聊聊promtail的Client
序 本文主要研究一下promtail的Client Client loki/pkg/promtail/client/client.go // Client pushes entries to Loki and can be stopped type Client interface { api.EntryHandler // Stop goroutine sending batch of entries. Stop() } Client接口内嵌了api.EntryHandler接口,定义了Stop方法 EntryHandler loki/pkg/promtail/api/types.go // EntryHandler is something that can "handle" entries. type EntryHandler interface { Handle(labels model.LabelSet, time time.Time, entry string) error } EntryHandler接口定义了Handle方法 client loki/pkg/promtail/client/client.go // Client for pushing logs in snappy-compressed protos over HTTP. type client