refactor: replace deprecated grpc.Dial with grpc.NewClient in code and docs

This commit is contained in:
2026-07-17 17:00:21 +09:00
parent 78d29b033e
commit cfefef5478
3 changed files with 7 additions and 9 deletions
+1 -1
View File
@@ -229,7 +229,7 @@ protoc --go_out=. --go-grpc_out=. protoapi.proto
* **원격 서비스 클라이언트 기동 (`NewIoTServiceClient`)**:
```go
conn, _ := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, _ := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
client := protoapi.NewIoTServiceClient(conn)
```
서버와의 TCP 채널(`conn`)을 평문 전송(insecure) 기반으로 바인딩한 뒤, 해당 채널을 통해 원격 서비스를 호출할 수 있는 전송용 클라이언트 인스턴스를 확보합니다.