Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultHttpListenerPort = "1234"
DefaultHttpListenerPort is used to set the URL where the logs will be sent by Logs API
View Source
const (
MaxRetries = 3
)
Variables ¶
This section is empty.
Functions ¶
func ListenOnAddress ¶
func ListenOnAddress() string
Types ¶
type FluentdLogger ¶
type FluentdLogger struct {
// contains filtered or unexported fields
}
func NewFluentdLogger ¶
func NewFluentdLogger() (*FluentdLogger, error)
func (*FluentdLogger) PushLog ¶
func (l *FluentdLogger) PushLog(log string) error
func (*FluentdLogger) Shutdown ¶
func (l *FluentdLogger) Shutdown() error
type HttpAgent ¶
type HttpAgent struct {
// contains filtered or unexported fields
}
HttpAgent has the listener that receives the logs and the logger that handles the received logs
func NewHttpAgent ¶
func NewHttpAgent(fluentdLogger *FluentdLogger, jq *queue.Queue) (*HttpAgent, error)
NewHttpAgent returns an agent to listen and handle logs coming from Logs API for HTTP Make sure the agent is initialized by calling Init(agentId) before subscription for the Logs API.
type LogsApiHttpListener ¶
type LogsApiHttpListener struct {
// contains filtered or unexported fields
}
LogsApiHttpListener is used to listen to the Logs API using HTTP
func NewLogsApiHttpListener ¶
func NewLogsApiHttpListener(lq *queue.Queue) (*LogsApiHttpListener, error)
NewLogsApiHttpListener returns a LogsApiHttpListener with the given log queue
func (*LogsApiHttpListener) Shutdown ¶
func (s *LogsApiHttpListener) Shutdown()
Shutdown terminates the HTTP server listening for logs
func (*LogsApiHttpListener) Start ¶
func (s *LogsApiHttpListener) Start() (bool, error)
Start initiates the server in a goroutine where the logs will be sent
Click to show internal directories.
Click to hide internal directories.