director

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package director launches a bunch of components and gets them restarted on failure.

Index

Constants

This section is empty.

Variables

View Source
var ErrDisabled = errors.New("disabled")
View Source
var ErrFinished = errors.New("finished successfully")

Functions

This section is empty.

Types

type Component

type Component struct {
	Name         string
	Critical     bool
	RestartDelay time.Duration
}

type Director

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

func New

func New() *Director

func (*Director) Start

func (dr *Director) Start(ctx context.Context, comp *Component, startf StartFunc) error

func (*Director) Wait

func (dr *Director) Wait()

type StartFunc

type StartFunc func(ctx context.Context, quitf func(err error)) error

Jump to

Keyboard shortcuts

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