app

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context) (*application, error)

Init initialise new app

func New

func New(_ context.Context, cfg config.Config) *application

New app constructor

Types

type Application

type Application interface {
	Config() config.Config
	WithMW(mw mw.GrpcServerInterceptor) Application
	RunDebug(ctx context.Context) (*http.Server, error)
	Run(ctx context.Context, services ...IService) error
	Close() error
}

Application main application interface

type IService

type IService interface {
	Register(srv grpc.ServiceRegistrar)
}

IService is the interface for all services

type RegisterFunc

type RegisterFunc func(srv grpc.ServiceRegistrar)

RegisterFunc ...

func (RegisterFunc) Register

func (f RegisterFunc) Register(srv grpc.ServiceRegistrar)

Register default implementation

Jump to

Keyboard shortcuts

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