lognats

package module
v0.0.0-...-0c7595a Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

README

krakend-lognats

Krakend plugin to dump request to nats streaming

Documentation

Index

Constants

View Source
const Namespace = "github_com/zean00/lognats"

Variables

This section is empty.

Functions

func New

func New(logger logging.Logger, config config.ExtraConfig) gin.HandlerFunc

New create middleware

Types

type NatsConfig

type NatsConfig struct {
	NatsURL     string
	ClusterName string
	ClientName  string
	EventName   string
	LogPayload  bool
	LogHeader   bool
	// contains filtered or unexported fields
}

NatsConfig log nats config

type Payload

type Payload struct {
	Method      string      `json:"method,omitempty" mapstructure:"method"`
	Path        string      `json:"path,omitempty" mapstructure:"path"`
	URL         string      `json:"url,omitempty" mapstructure:"url"`
	Data        interface{} `json:"data,omitempty" mapstructure:"data"`
	Headers     interface{} `json:"headers,omitempty" mapstructure:"headers"`
	Requestor   interface{} `json:"requestor,omitempty" mapstructure:"requestor"`
	StatusCode  int         `json:"status_code,omitempty" mapstructure:"status_code"`
	IPAddress   string      `json:"ip_address,omitempty" mapstructure:"ip_address"`
	ForwardedIP string      `json:"ip_forwarded,omitempty" mapstructure:"ip_forwarded"`
}

Payload message payload

Jump to

Keyboard shortcuts

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