service

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package service manage the service controllers and the HTTP server.

Index

Constants

View Source
const (
	MusicResearcher = "music-researcher"
	Downloader      = "downloader"
)

Keys used to retrieve controller configuration and set the routes

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service holds the server helper from the framework, the HTTP server/router, the list of active controllers and a logger.

It manages the initialization of the controllers from the configuration, and closing them when it shuts down.

func NewService

func NewService(opt ServiceOptions) (*Service, error)

@title Gateway Front API @version 0.0.1 @description This application provides a front gateway allowing you @description to interact with multiple GRPC microservices hosted @description in Google Cloud @termsOfService No terms @contact.name Support @contact.email florian.charpentier67@gmail.com @license.name MIT @license.url http://opensource.org/licenses/MIT @host api.dadard.fr @BasePath / @accept json @produce json @schemes https

func (*Service) Start

func (s *Service) Start(port string) error

Start runs the HTTP server. It runs until the Interrupt signal are received. Then, the HTTP server is gracefully shutdown. The service.Close call is deferred.

type ServiceOptions

type ServiceOptions struct {
	// Srv builer parameter
	Srv *server.Server

	// ProjectID builder parameter
	ProjectID string

	// Insecure builder parameter
	Insecure bool
}

ServiceOptions holds the service builder parameters

Jump to

Keyboard shortcuts

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