service

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: BSD-3-Clause Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppName

func AppName() (string, string)

Types

type Apps

type Apps []appscore

func (*Apps) Apps

func (a *Apps) Apps() []application

func (*Apps) Len

func (a *Apps) Len() int

Len is the number of elements in the collection.

func (*Apps) Less

func (a *Apps) Less(i int, j int) bool

Less reports whether the element with index i

func (*Apps) Register

func (a *Apps) Register(score int, app application) (none struct{})

func (*Apps) Swap

func (a *Apps) Swap(i int, j int)

Swap swaps the elements with indexes i and j.

type Harness

type Harness struct {
	Services []any
	// contains filtered or unexported fields
}

func (*Harness) Add

func (s *Harness) Add(svcs ...any)

func (*Harness) OnRunning

func (s *Harness) OnRunning() <-chan struct{}

func (*Harness) OnStart

func (s *Harness) OnStart(fn func(context.Context) error)

func (*Harness) OnStop

func (s *Harness) OnStop(fn func(context.Context) error)

func (*Harness) Run

func (s *Harness) Run(ctx context.Context, appName, version string) error

func (*Harness) Setup

func (s *Harness) Setup(ctx context.Context, apps ...application) error

Jump to

Keyboard shortcuts

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