l4tee

package
v0.0.0-...-9084104 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// Handlers is the list of handlers that constitute this
	// concurrent branch. Any handlers that do connection
	// matching (which involves recording and rewinding the
	// stream) are unsafe to tee, so do all connection
	// matching before teeing.
	HandlersRaw []json.RawMessage `json:"branch,omitempty" caddy:"namespace=layer4.handlers inline_key=handler"`
	// contains filtered or unexported fields
}

Handler is a layer4 handler that replicates a connection so that a branch of handlers can concurrently handle it. Reads happen in lock-step with all concurrent branches so as to avoid buffering: if one of the branches (including the main handler chain) stops reading from the connection, it will block all branches.

func (Handler) CaddyModule

func (Handler) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (Handler) Handle

func (t Handler) Handle(cx *layer4.Connection, next layer4.Handler) error

Handle handles the connection.

func (*Handler) Provision

func (t *Handler) Provision(ctx caddy.Context) error

Provision sets up the handler.

Jump to

Keyboard shortcuts

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