processor

package
v0.0.0-alpha5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	CustomID  string   `json:"custom_id"`
	CreatedAt int64    `json:"created_at"`
	ID        string   `json:"id"`
	Tags      []string `json:"tags"`
	Username  string   `json:"username"`
}

type EventMapper

type EventMapper struct {
}

EventMapper -

type EventProcessor

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

EventProcessor - represents the processor for received event to generate event(s) for AMPLIFY Central The event processing can be done either when the beat input receives the log entry or before the beat transport publishes the event to transport. When processing the received log entry on input, the log entry is mapped to structure expected for AMPLIFY Central Observer and then beat.Event is published to beat output that produces the event over the configured transport. When processing the log entry on output, the log entry is published to output as beat.Event. The output transport invokes the Process(events []publisher.Event) method which is set as output event processor. The Process() method processes the received log entry and performs the mapping to structure expected for AMPLIFY Central Observer. The method returns the converted Events to transport publisher which then produces the events over the transport.

func NewEventProcessor

func NewEventProcessor() *EventProcessor

NewEventProcessor - return a new EventProcessor

func (*EventProcessor) ProcessRaw

func (p *EventProcessor) ProcessRaw(rawEventData []byte) []beat.Event

ProcessRaw - process the received log entry and returns the event to be published to AMPLIFY ingestion service

type KongTrafficLogEntry

type KongTrafficLogEntry struct {
	ClientIP    string     `json:"client_ip"`
	StartedAt   int64      `json:"started_at"`
	UpstreamURI string     `json:"upstream_uri"`
	Latencies   *Latencies `json:"latencies"`
	Request     *Request   `json:"request"`
	Response    *Response  `json:"response"`
	Route       *Route     `json:"route"`
	Service     *Service   `json:"service"`
	Consumer    *Consumer  `json:"consumer"`
}

KongTrafficLogEntry - Represents the structure of log entry the agent will receive from Kong's HTTP Log Plugin

type Latencies

type Latencies struct {
	Request int `json:"request"`
	Kong    int `json:"kong"`
	Proxy   int `json:"proxy"`
}

type Request

type Request struct {
	QueryString map[string]string `json:"querystring"`
	Size        int               `json:"size"`
	URI         string            `json:"uri"`
	URL         string            `json:"url"`
	Headers     map[string]string `json:"headers"`
	Method      string            `json:"method"`
	TLS         *TLS              `json:"tls"`
}

type Response

type Response struct {
	Headers map[string]string `json:"headers"`
	Status  int               `json:"status"`
	Size    int               `json:"size"`
}

type Route

type Route struct {
	ID                      string            `json:"id"`
	UpdatedAt               int64             `json:"updated_at"`
	Protocols               []string          `json:"protocols"`
	StripPath               bool              `json:"strip_path"`
	CreatedAt               int64             `json:"created_at"`
	WsID                    string            `json:"ws_id"`
	Service                 map[string]string `json:"service"`
	Name                    string            `json:"name"`
	Hosts                   []string          `json:"hosts"`
	PreserveHost            bool              `json:"preserve_host"`
	RegexPriority           int               `json:"regex_priority"`
	Paths                   []string          `json:"paths"`
	ResponseBuffering       bool              `json:"response_buffering"`
	HttpsRedirectStatusCode int               `json:"https_redirect_status_code"`
	PathHandling            string            `json:"path_handling"`
	RequestBuffering        bool              `json:"request_buffering"`
}

type Service

type Service struct {
	Host           string `json:"host"`
	CreatedAt      int64  `json:"created_at"`
	ConnectTimeout int    `json:"connect_timeout"`
	ID             string `json:"id"`
	Protocol       string `json:"protocol"`
	Name           string `json:"name"`
	ReadTimeout    int    `json:"read_timeout"`
	Port           int    `json:"port"`
	Path           string `json:"path"`
	UpdatedAt      int64  `json:"updated_at"`
	WriteTimeout   int    `json:"write_timeout"`
	Retries        int    `json:"retries"`
	WsID           string `json:"ws_id"`
}

type TLS

type TLS struct {
	Version                string `json:"version"`
	Cipher                 string `json:"cipher"`
	SupportedClientCiphers string `json:"supported_client_ciphers"`
	ClientVerify           string `json:"client_verify"`
}

Jump to

Keyboard shortcuts

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