arbitrary

package
v0.0.0-...-5b8b77a Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerPlacement

type HandlerPlacement struct {
	AppendAfter string
	Handler     firecracker.Handler
}

HandlerPlacement provides a firecracker handler placement instruction. The handler will be placed after the requirement.

func NewHandlerPlacement

func NewHandlerPlacement(handler firecracker.Handler, requirement string) *HandlerPlacement

NewHandlerPlacement creates a new handler placement.

type PlacingStrategy

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

PlacingStrategy inserts the handlers at the arbitrary required position.

func NewStrategy

func NewStrategy(handlerPlacement ...func() *HandlerPlacement) PlacingStrategy

NewStrategy returns a new PlacingStrategy.

func (PlacingStrategy) AdaptHandlers

func (s PlacingStrategy) AdaptHandlers(handlers *firecracker.Handlers) error

AdaptHandlers will inject the LinkFilesHandler into the handler list.

func (PlacingStrategy) AddRequirements

func (s PlacingStrategy) AddRequirements(handlerPlacement ...func() *HandlerPlacement) PlacingStrategy

AddRequirements adds more arbitrary handlers with requirements.

Jump to

Keyboard shortcuts

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