Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { SyslogPort int QueueSize int HttpPort int Prefix string CategoriserFile string // contains filtered or unexported fields }
func NewApplication ¶
func NewApplication(logger *log.Logger) *Application
func (*Application) ConfigureFlags ¶
func (a *Application) ConfigureFlags() error
func (*Application) Run ¶
func (a *Application) Run() error
type Categoriser ¶
type Categoriser struct {
// contains filtered or unexported fields
}
func NewCategoriser ¶
func NewCategoriser(log *log.Logger, config []CategoriserConfig) (cr *Categoriser, err error)
func (*Categoriser) Run ¶
func (cr *Categoriser) Run(ctx context.Context, input chan SyslogMessage, output chan NginxEvent) error
type CategoriserConfig ¶
type HttpServer ¶
type HttpServer struct { HttpPort int // contains filtered or unexported fields }
func NewHttpServer ¶
func NewHttpServer(log *log.Logger, httpPort int) (hs *HttpServer, err error)
func (*HttpServer) Run ¶
func (hs *HttpServer) Run() (err error)
type NginxEvent ¶
type NginxEvent struct { Mode string // access / error logs Category string // nginx event category Frontend string RequestId string `json:"request_id"` RequestLength string `json:"request_length"` RemoteAddr string `json:"request_addr"` RemoteUser string `json:"request_user"` RemotePort string `json:"remote_port"` Request string `json:"request"` RequestUri string `json:"request_uri"` RequestMethod string `json:"request_method"` Args string `json:"args"` Status string `json:"status"` BodyBytesSent string `json:"body_bytes_sent"` BytesSent string `json:"bytes_sent"` HttpHost string `json:"http_host"` ServerName string `json:"server_name"` Scheme string `json:"scheme"` RequestTime string `json:"request_time"` UpstreamAddr string `json:"upstream_addr"` UpstreamResponseTime string `json:"upstream_response_time"` UpstreamResponseLength string `json:"upstream_response_length"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.