hubble

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cell = cell.Module(
	"retina-hubble",
	"Retina-Hubble runs a Hubble server and observer within the Retina agent",
	cell.Provide(newRetinaHubble),
	cell.Invoke(func(l logrus.FieldLogger, lifecycle cell.Lifecycle, rh *RetinaHubble) {
		var wp *workerpool.WorkerPool
		lifecycle.Append(cell.Hook{
			OnStart: func(cell.HookContext) error {
				wp = workerpool.New(1)
				rh.log.Info("Starting Retina-Hubble")
				if err := wp.Submit("retina-hubble", rh.launchWithDefaultOptions); err != nil {
					rh.log.Fatalf("failed to submit retina-hubble to workerpool: %s", err)
					return errors.Wrap(err, "failed to submit retina-hubble to workerpool")
				}
				return nil
			},
			OnStop: func(cell.HookContext) error {
				if err := wp.Close(); err != nil {
					return errors.Wrap(err, "failed to close retina-hubble workerpool")
				}
				return nil
			},
		})
	}),
)

Functions

This section is empty.

Types

type RetinaHubble

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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