builder

package
v0.0.0-...-4e1f151 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Overview

Package builder provides functionality to build the representative flows. Imagine this package as an implementation of builder design pattern. Read more: https://sourcemaking.com/design_patterns/builder.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildGRPCAptxService

func BuildGRPCAptxService(pool *pgxpool.Pool, rds redis.Cmdable, domain string) *handler.AptxService

BuildGRPCAptxService builds AptxService handler together with all of its dependencies.

func BuildGRPCHealthService

func BuildGRPCHealthService(pool *pgxpool.Pool, rds redis.Cmdable) *handler.HealthService

BuildGRPCHealthService builds HealthService handler together with all of its dependencies.

func BuildGRPCServer

func BuildGRPCServer(port string, aptx *handler.AptxService, health *handler.HealthService, options ...grpc.ServerOption) (*server.GRPC, error)

BuildGRPCServer builds gRPC server along with all services that needs it. For this project, the services are APTX and Health Checker. It also sets the Prometheus and Zap Logger.

func BuildPostgresConnPool

func BuildPostgresConnPool(cfg config.Postgres) (*pgxpool.Pool, error)

BuildPostgresConnPool builds a SQL client.

func BuildRedisClient

func BuildRedisClient(cfg config.Redis) (*redis.Client, error)

BuildRedisClient builds a redis client.

func BuildRestServer

func BuildRestServer(restPort, grpcPort string, options ...grpc.DialOption) (*server.Rest, error)

BuildRestServer builds REST server along with all services that needs it. For this project, there is only one service: APTX. Health Checker service is not included because it will only run on gRPC port. It also sets the Prometheus endpoint in /metrics.

Types

This section is empty.

Jump to

Keyboard shortcuts

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