Go workspace (go.work) with 5 microservices + shared library: - gateway (8080), auth-service (8081), purchaser-service (8082) - textile-service (8083), washing-service (8084) - shared: proto definitions, common packages Infrastructure: docker-compose for local dev, K8s manifests for K3s cluster deployment (mysql/redis/etcd + traefik ingress). Frontend (iloom-flatten) added as git submodule. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
484 B
Go
19 lines
484 B
Go
package grpc
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"google.golang.org/grpc"
|
|
"google.golang.org/grpc/credentials/insecure"
|
|
)
|
|
|
|
// Dial creates a gRPC client connection to the given address.
|
|
// Uses insecure credentials (no TLS) for internal service communication.
|
|
func Dial(addr string) (*grpc.ClientConn, error) {
|
|
conn, err := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
|
|
if err != nil {
|
|
return nil, fmt.Errorf("grpc dial %s: %w", addr, err)
|
|
}
|
|
return conn, nil
|
|
}
|