module

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decorate added in v0.6.0

func Decorate(decorators ...any) opt.Option[app.Module]

func Handlers

func Handlers(handlerProviders ...any) opt.Option[app.Module]

func Private

func Private(providers ...any) opt.Option[app.Module]

func Public

func Public(providers ...any) opt.Option[app.Module]

func Service

func Service[T any]() opt.Option[app.Module]

func SubModules

func SubModules(modules ...func() app.Module) opt.Option[app.Module]

func Supply

func Supply(suppliers ...any) opt.Option[app.Module]

Types

type HealthCheck added in v0.6.5

type HealthCheck interface {
	OnStartStop
	Inspect() HealthCheckManifest
}

type HealthCheckManifest added in v0.6.5

type HealthCheckManifest struct {
	Name        string
	Description string
	StartedAt   time.Time
	CrashedAt   *time.Time
	LastError   error
}

type OnStart

type OnStart interface {
	OnStart(ctx context.Context) error
}

type OnStartStop

type OnStartStop interface {
	OnStart
	OnStop
}

type OnStop

type OnStop interface {
	OnStop(ctx context.Context) error
}

type ServiceRegistry added in v0.6.5

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

func NewServiceRegistry added in v0.6.5

func NewServiceRegistry(params ServiceRegistryParams) (*ServiceRegistry, error)

func (*ServiceRegistry) OnStart added in v0.6.5

func (s *ServiceRegistry) OnStart(context.Context) error

func (*ServiceRegistry) OnStop added in v0.6.5

func (s *ServiceRegistry) OnStop(context.Context) error

func (*ServiceRegistry) RestartService added in v0.6.5

func (s *ServiceRegistry) RestartService(ctx context.Context, name string) error

type ServiceRegistryParams added in v0.6.5

type ServiceRegistryParams struct {
	fx.In
	Services []HealthCheck
	Manifest *manifest.Manifest
}

Jump to

Keyboard shortcuts

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