microservice

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: MIT Imports: 20 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

micro-service

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunService

func RunService(ss ...ServiceHandler)

func WithAPI added in v0.3.0

func WithAPI(apis ...apitool.GinAPI) options

func WithErrorHandler added in v0.3.0

func WithErrorHandler(errHandler err.GinServiceErrorHandler) options

func WithMiddle added in v0.3.0

func WithMiddle(mids ...mid.GinMiddle) options

func WithPromhttp added in v0.3.0

func WithPromhttp(c ...prometheus.Collector) options

Types

type MicroService

type MicroService[T cfg.ModelCfg, R di.ServiceDI] interface {
	GetModelCfgMgr() cfg.ModelCfgMgr
	GetDI() R
	NewLog(name string) (log.Logger, error)
	NewCfg(name string) (T, error)
}

func New added in v0.0.4

func New[T cfg.ModelCfg, R di.ServiceDI](mycfg T, mydi R) (MicroService[T, R], error)

type ServiceHandler

type ServiceHandler func(ctx context.Context)

func NewApiWithViper added in v0.3.0

func NewApiWithViper(opts ...options) (ServiceHandler, error)

Directories

Path Synopsis
err
mid

Jump to

Keyboard shortcuts

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