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 ¶
- func BuildGRPCAptxService(pool *pgxpool.Pool, rds redis.Cmdable, domain string) *handler.AptxService
- func BuildGRPCHealthService(pool *pgxpool.Pool, rds redis.Cmdable) *handler.HealthService
- func BuildGRPCServer(port string, aptx *handler.AptxService, health *handler.HealthService, ...) (*server.GRPC, error)
- func BuildPostgresConnPool(cfg config.Postgres) (*pgxpool.Pool, error)
- func BuildRedisClient(cfg config.Redis) (*redis.Client, error)
- func BuildRestServer(restPort, grpcPort string, options ...grpc.DialOption) (*server.Rest, error)
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 ¶
BuildPostgresConnPool builds a SQL client.
func BuildRedisClient ¶
BuildRedisClient builds a redis client.
func BuildRestServer ¶
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.