handlers

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Exchange   = "logproxy"
	RoutingKey = "new.rfc5424"
)

Functions

func EncodeString added in v1.1.0

func EncodeString(s string, charactersToEncode string) string

EncodeString encodes all characters from the characterstoEncode set

func VersionHandler

func VersionHandler(version string) echo.HandlerFunc

Types

type DHPLogData

type DHPLogData struct {
	Message string `json:"message"`
}

DHPLogData represents the payload of DHPLogMessage

type DHPLogMessage

type DHPLogMessage struct {
	Category            string          `json:"cat"`
	EventID             string          `json:"evt"`
	ApplicationVersion  string          `json:"ver"`
	Component           string          `json:"cmp"`
	ApplicationName     string          `json:"app"`
	ApplicationInstance string          `json:"inst"`
	ServerName          string          `json:"srv"`
	TransactionID       string          `json:"trns"`
	ServiceName         string          `json:"service"`
	LogTime             string          `json:"time"`
	OriginatingUser     string          `json:"usr"`
	Severity            string          `json:"sev"`
	LogData             DHPLogData      `json:"val"`
	Custom              json.RawMessage `json:"custom,omitempty"`
}

DHPLogMessage describes a structured log message from applications

type HealthHandler

type HealthHandler struct {
}

func (HealthHandler) Handler

func (h HealthHandler) Handler() echo.HandlerFunc

type IronIOHandler added in v1.1.0

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

func NewIronIOHandler added in v1.1.0

func NewIronIOHandler(token string, producer rabbitmq.Producer) (*IronIOHandler, error)

func (*IronIOHandler) Handler added in v1.1.0

func (h *IronIOHandler) Handler() echo.HandlerFunc

type Logger

type Logger interface {
	Debugf(format string, args ...interface{})
}

Logger implements logging interface

type PHLogger

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

PHLogger implements all processing logic for parsing and forwarding logs

func NewPHLogger

func NewPHLogger(storer logging.Storer, log Logger, buildVersion string) (*PHLogger, error)

NewPHLogger returns a new configured PHLogger instance

func (*PHLogger) RFC5424QueueName

func (pl *PHLogger) RFC5424QueueName() string

RFC5424QueueName returns the queue name to use

func (*PHLogger) RFC5424Worker

func (pl *PHLogger) RFC5424Worker(deliveries <-chan amqp.Delivery, done <-chan bool)

RFC5424Worker implements the worker process for parsing RabbitMQ queues

type SyslogHandler

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

func NewSyslogHandler

func NewSyslogHandler(token string, producer rabbitmq.Producer) (*SyslogHandler, error)

func (*SyslogHandler) Handler

func (h *SyslogHandler) Handler() echo.HandlerFunc

Jump to

Keyboard shortcuts

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