melissa

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: Apache-2.0 Imports: 10 Imported by: 2

README

melissa

melissa - это маленький движок на di от uber, который позволяет создавать gracefully приложения. Раньше была частью freya, но тащить каждый раз freya, когда нужен только di, не хочется. Да и размер freya очень уж большой. Поэтому была вытащена часть с di и сделана отдельной библиотекой. Пример можно глянуть в папке example или в проекте freya

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewShutdownContext added in v0.0.3

func NewShutdownContext() context.Context

Types

type App added in v0.0.3

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

func NewApp added in v0.0.3

func NewApp(
	servers *types.ServerPool,
	services *types.ServicePool,
) *App

func (*App) Run added in v0.0.3

func (c *App) Run(ctx context.Context) error

type Engine

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

func NewEngine

func NewEngine(mainFunc any, modules types.Module) *Engine

func (*Engine) Run

func (e *Engine) Run()

type MockEngine added in v0.0.3

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

func NewMockEngine added in v0.0.3

func NewMockEngine(modules types.Module, opts ...MockEngineOpt) *MockEngine

func (*MockEngine) Run added in v0.0.3

func (e *MockEngine) Run(f any) error

func (*MockEngine) RunBenchmark added in v0.0.3

func (e *MockEngine) RunBenchmark(tb *testing.B, name string, f any)

func (*MockEngine) RunTest added in v0.0.3

func (e *MockEngine) RunTest(tt *testing.T, name string, f any)

type MockEngineOpt added in v0.0.3

type MockEngineOpt func(engine *MockEngine)

type ServiceAdapterIn added in v0.0.3

type ServiceAdapterIn struct {
	dig.In

	Services []types.Runnable `group:"services"`
	Servers  []types.Runnable `group:"servers"`
}

type ServiceAdapterOut added in v0.0.3

type ServiceAdapterOut struct {
	dig.Out

	ServiceList types.ServiceList
	ServerList  types.ServerList
}

func ServiceAdapter added in v0.0.3

func ServiceAdapter(in ServiceAdapterIn) ServiceAdapterOut

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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