Execute PLAN_CLI.md
This commit is contained in:
15
cmd/cli/client.go
Normal file
15
cmd/cli/client.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
pb "git.ipng.ch/ipng/nginx-logtail/proto/logtailpb"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
)
|
||||
|
||||
func dial(addr string) (*grpc.ClientConn, pb.LogtailServiceClient, error) {
|
||||
conn, err := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
return conn, pb.NewLogtailServiceClient(conn), nil
|
||||
}
|
||||
Reference in New Issue
Block a user