Documentation ¶
Index ¶
- Variables
- type Config
- type JobStateGetter
- type LogAggregatorSink
- func (s *LogAggregatorSink) Close()
- func (s *LogAggregatorSink) Connect() error
- func (s *LogAggregatorSink) GetCursor(hostID string) (*utils.HostCursor, error)
- func (s *LogAggregatorSink) Info() *SinkInfo
- func (s *LogAggregatorSink) Name() string
- func (s *LogAggregatorSink) Shutdown()
- func (s *LogAggregatorSink) ShutdownCh() chan struct{}
- func (s *LogAggregatorSink) Write(m message) error
- type LogStream
- type Mux
- func (m *Mux) Follow(r io.ReadCloser, buffer string, msgID logagg.MsgID, config *Config) *LogStream
- func (m *Mux) Logger(msgID logagg.MsgID, config *Config, ctx ...interface{}) *MuxLogger
- func (m *Mux) StreamLog(appID, jobID string, history, follow bool, ch chan<- *rfc5424.Message) (stream.Stream, error)
- type MuxLogger
- type Sink
- type SinkHTTPAPI
- type SinkInfo
- type SinkManager
- func (sm *SinkManager) AddSink(id string, s *SinkInfo) error
- func (sm *SinkManager) CloseDB() error
- func (sm *SinkManager) OpenDB() error
- func (sm *SinkManager) RegisterRoutes(r *httprouter.Router)
- func (sm *SinkManager) RemoveSink(id string) error
- func (sm *SinkManager) StreamToAggregators(s discoverd.Service) error
- type SyslogSink
- func (s *SyslogSink) Close()
- func (s *SyslogSink) Connect() error
- func (s *SyslogSink) GetCursor(_ string) (*utils.HostCursor, error)
- func (s *SyslogSink) Info() *SinkInfo
- func (s *SyslogSink) Name() string
- func (s *SyslogSink) Shutdown()
- func (s *SyslogSink) ShutdownCh() chan struct{}
- func (s *SyslogSink) Write(m message) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDBClosed = errors.New("sink DB closed")
View Source
var SinkExistsError = errors.New("sink with that id already exists")
View Source
var SinkNotFoundError = errors.New("sink with that id couldn't be found")
Functions ¶
This section is empty.
Types ¶
type JobStateGetter ¶
type LogAggregatorSink ¶
type LogAggregatorSink struct {
// contains filtered or unexported fields
}
func NewLogAggregatorSink ¶
func NewLogAggregatorSink(sm *SinkManager, info *SinkInfo) (*LogAggregatorSink, error)
func (*LogAggregatorSink) Close ¶
func (s *LogAggregatorSink) Close()
func (*LogAggregatorSink) Connect ¶
func (s *LogAggregatorSink) Connect() error
func (*LogAggregatorSink) GetCursor ¶
func (s *LogAggregatorSink) GetCursor(hostID string) (*utils.HostCursor, error)
func (*LogAggregatorSink) Info ¶
func (s *LogAggregatorSink) Info() *SinkInfo
func (*LogAggregatorSink) Name ¶
func (s *LogAggregatorSink) Name() string
func (*LogAggregatorSink) Shutdown ¶
func (s *LogAggregatorSink) Shutdown()
func (*LogAggregatorSink) ShutdownCh ¶
func (s *LogAggregatorSink) ShutdownCh() chan struct{}
func (*LogAggregatorSink) Write ¶
func (s *LogAggregatorSink) Write(m message) error
type Mux ¶
type Mux struct {
// contains filtered or unexported fields
}
LogMux collects log lines from multiple leaders and forwards them to logaggregator instances and local files.
func (*Mux) Follow ¶
Follow starts a goroutine that reads log lines from the reader into the mux. It runs until the reader is closed or an error occurs. If an error occurs, the reader may still be open.
type SinkHTTPAPI ¶
type SinkHTTPAPI struct {
// contains filtered or unexported fields
}
func (*SinkHTTPAPI) AddSink ¶
func (s *SinkHTTPAPI) AddSink(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
func (*SinkHTTPAPI) GetSinks ¶
func (s *SinkHTTPAPI) GetSinks(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
func (*SinkHTTPAPI) RemoveSink ¶
func (s *SinkHTTPAPI) RemoveSink(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
type SinkInfo ¶
type SinkInfo struct { ID string `json:"id"` Kind ct.SinkKind `json:"kind"` Cursor *utils.HostCursor `json:"cursor,omitempty"` Config json.RawMessage `json:"config"` HostManaged bool `json:"host_managed"` }
type SinkManager ¶
type SinkManager struct {
// contains filtered or unexported fields
}
func NewSinkManager ¶
func NewSinkManager(dbPath string, mux *Mux, state JobStateGetter, logger log15.Logger) *SinkManager
func (*SinkManager) CloseDB ¶
func (sm *SinkManager) CloseDB() error
func (*SinkManager) OpenDB ¶
func (sm *SinkManager) OpenDB() error
func (*SinkManager) RegisterRoutes ¶
func (sm *SinkManager) RegisterRoutes(r *httprouter.Router)
func (*SinkManager) RemoveSink ¶
func (sm *SinkManager) RemoveSink(id string) error
func (*SinkManager) StreamToAggregators ¶
func (sm *SinkManager) StreamToAggregators(s discoverd.Service) error
type SyslogSink ¶
type SyslogSink struct {
// contains filtered or unexported fields
}
SyslogSink is a flexible sink that can connect to TCP/TLS endpoints that use syslog framing. The prefix of the message can be customised using a template.
func NewSyslogSink ¶
func NewSyslogSink(sm *SinkManager, info *SinkInfo) (sink *SyslogSink, err error)
func (*SyslogSink) Close ¶
func (s *SyslogSink) Close()
func (*SyslogSink) Connect ¶
func (s *SyslogSink) Connect() error
func (*SyslogSink) GetCursor ¶
func (s *SyslogSink) GetCursor(_ string) (*utils.HostCursor, error)
func (*SyslogSink) Info ¶
func (s *SyslogSink) Info() *SinkInfo
func (*SyslogSink) Name ¶
func (s *SyslogSink) Name() string
func (*SyslogSink) Shutdown ¶
func (s *SyslogSink) Shutdown()
func (*SyslogSink) ShutdownCh ¶
func (s *SyslogSink) ShutdownCh() chan struct{}
func (*SyslogSink) Write ¶
func (s *SyslogSink) Write(m message) error
Click to show internal directories.
Click to hide internal directories.