Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add golangci lint to github action workflow #1068

Merged
merged 15 commits into from
Aug 31, 2023
Prev Previous commit
update grpc related change
  • Loading branch information
suchen-sci committed Aug 29, 2023
commit 34d41742f8d0c54cb38bc7cd2a7b4e0c8327b0ad
3 changes: 2 additions & 1 deletion pkg/filters/proxies/grpcproxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ var (
defaultDialOpts = []grpc.DialOption{
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDefaultCallOptions(grpc.ForceCodec(&GrpcCodec{})),
grpc.WithBlock()}
grpc.WithBlock(),
}
)

var _ filters.Filter = (*Proxy)(nil)
Expand Down
5 changes: 4 additions & 1 deletion pkg/object/grpcserver/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ import (
"google.golang.org/grpc/keepalive"
)

func init() {
encoding.RegisterCodec(&grpcproxy.GrpcCodec{})
}

const (
stateNil stateType = "nil"
stateFailed stateType = "failed"
Expand Down Expand Up @@ -220,7 +224,6 @@ func (r *runtime) startServer() {
r.setError(err)
return
}
encoding.RegisterCodec(&grpcproxy.GrpcCodec{})
opts := []grpc.ServerOption{grpc.UnknownServiceHandler(r.mux.handler)}
keepaliveOpts := r.buildServerKeepaliveOpt()

Expand Down