Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 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"`
}