application

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupLogger

func SetupLogger(config *configs.Config) error

SetupLogger sets up the logger for the application

Types

type App

type App struct {
	Router *gin.Engine

	Repositories struct {
		AlertRepository contracts.AlertRepository
	}

	WorkerPools struct {
		AlertPool *ants.Pool
	}

	Version string

	Monitoring monitoring.Monitor
	// contains filtered or unexported fields
}

App is the main application

func NewApplication

func NewApplication(_ context.Context, config *configs.Config) (*App, error)

NewApplication creates a new application instance

func (*App) RunHTTPServer

func (a *App) RunHTTPServer(ctx context.Context, wg *sync.WaitGroup)

RunHTTPServer runs the http server

func (*App) Shutdown

func (a *App) Shutdown() (err error)

Shutdown is used to gracefully shutdown the application

Jump to

Keyboard shortcuts

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