http

package
v0.0.0-...-04de4a5 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const TIME_FORMAT_RFC3339_MS = "2006-01-02T15:04:05.000Z07:00"

RFC3339 with millisecond resolution

Variables

This section is empty.

Functions

func NewHTTPAdapter

func NewHTTPAdapter(route *router.Route) (router.LogAdapter, error)

NewHTTPAdapter creates an HTTPAdapter

Types

type HTTPAdapter

type HTTPAdapter struct {
	// contains filtered or unexported fields
}

HTTPAdapter is an adapter that POSTs logs to an HTTP endpoint

func (*HTTPAdapter) Stream

func (a *HTTPAdapter) Stream(logstream chan *router.Message)

Stream implements the router.LogAdapter interface

type LogspoutData

type LogspoutData struct {
	Time     string `json:"time"`
	Source   string `json:"source"`
	Name     string `json:"docker_name"`
	ID       string `json:"docker_id"`
	Image    string `json:"docker_image"`
	Hostname string `json:"docker_hostname"`
}

LogspoutData is a simple JSON representation of the logspout message data.

Jump to

Keyboard shortcuts

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