web_pkg_controller

package
v0.51.6 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller implements the generic web pkg controller.

Wraps a getter function and resolves LookupWebPkg. Can be used with the static web pkg implementation.

func NewController

func NewController(
	le *logrus.Entry,
	info *controller.Info,
	getter WebPkgGetter,
	webPkgIds []string,
) *Controller

NewController constructs a new web pkg controller.

webPkgIds is the list of web package ids. if empty, passes all web pkg ids to the getter.

func NewControllerWithWebPkg

func NewControllerWithWebPkg(le *logrus.Entry, info *controller.Info, webPkg web_pkg.WebPkg) *Controller

NewControllerWithWebPkg constructs a new controller with a static WebPkg.

func NewControllerWithWebPkgList

func NewControllerWithWebPkgList(le *logrus.Entry, info *controller.Info, webPkgList []web_pkg.WebPkg) *Controller

NewControllerWithWebPkgList constructs a new controller with a list of WebPkg.

func NewControllerWithWebPkgMap

func NewControllerWithWebPkgMap(le *logrus.Entry, info *controller.Info, webPkgMap map[string]web_pkg.WebPkg) *Controller

NewControllerWithWebPkgMap constructs a new controller with a map of WebPkg.

func (*Controller) Close

func (c *Controller) Close() error

Close releases any resources used by the controller. Error indicates any issue encountered releasing.

func (*Controller) Execute

func (c *Controller) Execute(ctx context.Context) error

Execute executes the controller goroutine. Returning nil ends execution. Returning an error triggers a retry with backoff.

func (*Controller) GetControllerInfo

func (c *Controller) GetControllerInfo() *controller.Info

GetControllerInfo returns information about the controller.

func (*Controller) HandleDirective

func (c *Controller) HandleDirective(
	ctx context.Context,
	di directive.Instance,
) ([]directive.Resolver, error)

HandleDirective asks if the handler can resolve the directive.

type WebPkgGetter

WebPkgGetter is a function to resolve a web package.

release is a function to call if the web pkg is released. return nil, nil, nil for not found. return a release function if necessary

func(ctx context.Context, webPkgID string, release func()) (web_pkg.LookupWebPkgValue, func(), error)

Jump to

Keyboard shortcuts

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