coprocessor

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoProcessor

type CoProcessor struct {
	HookType   coprocess.HookType
	Middleware *models.CoProcessMiddleware
}

CoProcessor represents a CoProcess during the request.

func (*CoProcessor) Dispatch

func (c *CoProcessor) Dispatch(object *coprocess.Object) (*coprocess.Object, error)

Dispatch prepares a CoProcessMessage, sends it to the GlobalDispatcher and gets a reply.

func (*CoProcessor) ObjectFromRequest

func (c *CoProcessor) ObjectFromRequest(r *http.Request, session *user.SessionState) *coprocess.Object

ObjectFromRequest constructs a CoProcessObject from a given http.Request.

func (*CoProcessor) ObjectPostProcess

func (c *CoProcessor) ObjectPostProcess(object *coprocess.Object, r *http.Request)

ObjectPostProcess does CoProcessObject post-processing (adding/removing headers or params, etc.).

Jump to

Keyboard shortcuts

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