microservice

package
v0.0.0-...-5f57c41 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseApiPath        = "/geoip"
	APIKey             = "GEOS-API-Key"
	APIKeyMetaKey      = "api-key"
	GrpcAddressMetaKey = "grpc-address"
	ServiceName        = config.ServiceName
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcMicroservice

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

func NewGrpcMicroservice

func NewGrpcMicroservice(address string, geoIpService controller.GeoIpService, geoNameService controller.GeoNameService) *GrpcMicroservice

func (*GrpcMicroservice) Run

func (s *GrpcMicroservice) Run() error

func (*GrpcMicroservice) Stop

func (s *GrpcMicroservice) Stop(ctx context.Context) error

type Microservice

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

func NewMicroservice

func NewMicroservice(config config.Config) *Microservice

func (*Microservice) ApiKeyMiddleware

func (m *Microservice) ApiKeyMiddleware() func(next http.Handler) http.Handler

func (*Microservice) BuildRoutes

func (m *Microservice) BuildRoutes(router chi.Router)

func (*Microservice) GetAsyncRunners

func (m *Microservice) GetAsyncRunners() []server.AsyncRunner

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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