fix go builds after deleting pkg internal
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
parent
dff246a3d7
commit
61cf05844d
13 changed files with 56 additions and 57 deletions
|
@ -9,7 +9,9 @@ RUN go get -d github.com/google/uuid \
|
|||
github.com/sirupsen/logrus \
|
||||
google.golang.org/grpc \
|
||||
google.golang.org/grpc/codes \
|
||||
google.golang.org/grpc/status
|
||||
google.golang.org/grpc/status \
|
||||
go.opencensus.io/plugin/ochttp \
|
||||
go.opencensus.io/plugin/ochttp/propagation/b3
|
||||
|
||||
# copy go-only part of the build
|
||||
COPY *.go ./
|
||||
|
|
|
@ -7,11 +7,10 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
"microservices-demo/src/internal"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"go.opencensus.io/plugin/ocgrpc"
|
||||
"go.opencensus.io/plugin/ochttp"
|
||||
"go.opencensus.io/plugin/ochttp/propagation/b3"
|
||||
"google.golang.org/grpc"
|
||||
|
@ -117,7 +116,10 @@ func mustMapEnv(target *string, envKey string) {
|
|||
|
||||
func mustConnGRPC(ctx context.Context, conn **grpc.ClientConn, addr string) {
|
||||
var err error
|
||||
*conn, err = grpc.DialContext(ctx, addr, grpc.WithTimeout(time.Second*3), internal.DefaultDialOptions()...)
|
||||
*conn, err = grpc.DialContext(ctx, addr,
|
||||
grpc.WithInsecure(),
|
||||
grpc.WithTimeout(time.Second*3),
|
||||
grpc.WithStatsHandler(&ocgrpc.ClientHandler{}))
|
||||
if err != nil {
|
||||
panic(errors.Wrapf(err, "grpc: failed to connect %s", addr))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue