handler

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package handler contains all handlers for serving POST requests. The payload should have at least one key: message. And it contains the log entry for writing. If a "type" for the entry is not provided, it falls back to "info". If the "timestamp" is not provided, it uses the current time it receives the payload.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Writer io.Writer
	Logger internal.FieldLogger
}

Service listens to the incoming http requests and decides how to route the payload to be written.

func (*Service) RecieveHandler

func (l *Service) RecieveHandler(w http.ResponseWriter, r *http.Request)

RecieveHandler handles the logs coming from the endpoint

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL