Skip to content

Commit

Permalink
BE-586 | Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
deividaspetraitis committed Oct 10, 2024
1 parent dbc37ec commit a629788
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions delivery/grpc/grpc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package grpc provides a custom gRPC client implementation for Cosmos SDK-based applications.
package grpc

import (
Expand Down Expand Up @@ -35,12 +36,15 @@ func (c customCodec) Name() string {
return "gogoproto"
}

// Client wraps a gRPC ClientConn, providing a custom connection.
// Connection is set up with custom options, including the use of a custom codec
// for gogoproto and OpenTelemetry instrumentation.
// Client addresses issue mentioned here: https://github.com/cosmos/cosmos-sdk/issues/18430
type Client struct {
*grpc.ClientConn
}

// connectGRPC dials up our grpc connection endpoint.
// See: https://github.com/cosmos/cosmos-sdk/issues/18430
// NewClient creates a new gRPC client connection to the specified endpoint.
func NewClient(grpcEndpoint string) (*Client, error) {
customCodec := &customCodec{parentCodec: encoding.GetCodec("proto")}

Expand Down

0 comments on commit a629788

Please sign in to comment.