processors

package
v0.0.0-...-c772d2a Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

README

Processors

Processors are responsible for handling incoming connections.

Processors include routers. They proxy requests to backend implementations. They also audit the request in parallel(or in a synchronized way).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionProcessor

type ConnectionProcessor interface {
	// handleConnection reads the connection and extract the incoming message
	// note that this may be a long connection so take care of the connection reuse.
	ProcessConnection(conn net.Conn) error
	// Do not return until ready
	Start()
	Stop()
}

type DataProcessor

type DataProcessor interface {
	ParseCommand(bytes []byte) ([]*LogEvent, error)
}

type LogEvent

type LogEvent struct {
	Identity   string      `json:"identity"`
	Type       string      `json:"type"`
	Ip         string      `json:"ip"`
	PrimaryKey string      `json:"primary_key"`
	Timestamp  int64       `json:"timestamp"`
	Data       interface{} `json:"data"`
	Before     string      `json:"before"`
	After      string      `json:"after"`
}

func (*LogEvent) String

func (e *LogEvent) String() string

Jump to

Keyboard shortcuts

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