winterfx

package module
v0.0.0-...-3b96a7a Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: MIT Imports: 11 Imported by: 0

README

winterFx

A minimalist mesh-native microservice framework with Fx

Donation

View https://guoyk.xyz/donation

Credits

Guo Y.K., MIT License

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Module is the fx module for winterfx
	Module = fx.Module(
		"winterfx",
		flagfx.Module,
		probefx.Module,
		otelfx.Module,
		fx.Provide(
			flagfx.AsDecoderFunc(DecodeParams),
			New,
		),
	)
)

Functions

This section is empty.

Types

type App

type App interface {
	// Handler inherit [http.Handler]
	http.Handler
}

App the main interface of [summer]

func New

func New(opts Options) App

New create an App with [Option]

type Options

type Options struct {
	fx.In

	*Params

	probefx.Probe
	routerfx.Router
}

type Params

type Params struct {
	// Listen listen address
	Listen string

	// PathReadiness readiness check path
	PathReadiness string

	// PathLiveness liveness path
	PathLiveness string

	// PathMetrics metrics path
	PathMetrics string

	// DelayStart delay start
	DelayStart time.Duration

	// DelayStop delay stop
	DelayStop time.Duration
}

Params params

func DecodeParams

func DecodeParams(fset *flag.FlagSet) (p *Params)

DecodeParams create Params from flag.FlagSet

Directories

Path Synopsis
core
example

Jump to

Keyboard shortcuts

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