-
Notifications
You must be signed in to change notification settings - Fork 580
/
query.go
26 lines (22 loc) · 988 Bytes
/
query.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package types
import (
"github.com/gogo/protobuf/grpc"
client "github.com/cosmos/ibc-go/v4/modules/core/02-client"
clienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types"
connection "github.com/cosmos/ibc-go/v4/modules/core/03-connection"
connectiontypes "github.com/cosmos/ibc-go/v4/modules/core/03-connection/types"
channel "github.com/cosmos/ibc-go/v4/modules/core/04-channel"
channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types"
)
// QueryServer defines the IBC interfaces that the gRPC query server must implement
type QueryServer interface {
clienttypes.QueryServer
connectiontypes.QueryServer
channeltypes.QueryServer
}
// RegisterQueryService registers each individual IBC submodule query service
func RegisterQueryService(server grpc.Server, queryService QueryServer) {
client.RegisterQueryService(server, queryService)
connection.RegisterQueryService(server, queryService)
channel.RegisterQueryService(server, queryService)
}