app

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfApplicationName = ".name"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

func New

func New(name string, opts ...BuilderOption) (*App, error)

func (*App) SetEngine

func (a *App) SetEngine(engine *Engine) error

func (*App) SetRegistry

func (a *App) SetRegistry(registry *service.Registry)

func (*App) Start

func (a *App) Start(ctx context.Context) error

func (*App) Wait

func (a *App) Wait(ctx context.Context) error

type Builder

type Builder struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Builder) Apply

func (b *Builder) Apply(opts ...BuilderOption) error

func (*Builder) Build

func (b *Builder) Build() (*App, error)

type BuilderOption

type BuilderOption func(builder *Builder) error

func WithBus

func WithBus(bus message.Mailbox) BuilderOption

func WithModules

func WithModules(modules ...dep.Module) BuilderOption

type Context

type Context struct {
	context.Context
	Cancel context.CancelFunc
}

type Engine

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

func (*Engine) Manifest

func (e *Engine) Manifest() async.Manifest

type EngineBuilder

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

func NewEngineBuilder

func NewEngineBuilder() *EngineBuilder

func (*EngineBuilder) Background

func (e *EngineBuilder) Background(manifests ...async.Manifest) *EngineBuilder

func (*EngineBuilder) Build

func (e *EngineBuilder) Build() (*Engine, error)

func (*EngineBuilder) HealthCheck

func (e *EngineBuilder) HealthCheck(service any, interval time.Duration, fn func(ctx context.Context) error) *EngineBuilder

Jump to

Keyboard shortcuts

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