Skip to content

Commit

Permalink
refactor: clients now
Browse files Browse the repository at this point in the history
  • Loading branch information
w-h-a committed Sep 22, 2024
1 parent 2848d33 commit 6e10589
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
4 changes: 0 additions & 4 deletions client/grpcclient/grpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ func (c *grpcClient) Call(ctx context.Context, req client.Request, rsp interface
return errorutils.InternalServerError("client", "req is nil")
}

if rsp == nil {
return errorutils.InternalServerError("client", "rsp is nil")
}

callOptions := client.NewCallOptions(&c.options.CallOptions, opts...)

next, err := c.next(req, callOptions)
Expand Down
4 changes: 0 additions & 4 deletions client/httpclient/http_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ func (c *httpClient) Call(ctx context.Context, req client.Request, rsp interface
return errorutils.InternalServerError("client", "req is nil")
}

if rsp == nil {
return errorutils.InternalServerError("client", "rsp is nil")
}

callOptions := client.NewCallOptions(&c.options.CallOptions, opts...)

next, err := c.next(req, callOptions)
Expand Down
2 changes: 1 addition & 1 deletion sidecar/custom/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (s *customSidecar) sendEventToService(event *sidecar.Event) error {

req := s.options.Client.NewRequest(opts...)

rsp := &sidecar.Event{}
var rsp interface{}

if err := s.options.Client.Call(context.Background(), req, rsp, client.CallWithAddress(url)); err != nil {
return err
Expand Down

0 comments on commit 6e10589

Please sign in to comment.