grayzero

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NopWriteCloser

func NopWriteCloser(w io.Writer) io.WriteCloser

NopWriteCloser returns a WriteCloser with a no-op Close method wrapping the provided Writer w.

Types

type GraylogWriter

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

func NewGraylogWriter

func NewGraylogWriter(url string, nextWriter io.Writer, serviceName, instanceID string) (*GraylogWriter, error)

NewGraylogWriter returns new writer

func (*GraylogWriter) Close

func (w *GraylogWriter) Close() error

Close closes GrayLog client

func (*GraylogWriter) Write

func (w *GraylogWriter) Write(p []byte) (n int, err error)

Write extracts the message from the JSON and sends it in GELF format to GrayLog

Jump to

Keyboard shortcuts

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