Skip to content

Commit

Permalink
go docs
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Feb 29, 2024
1 parent 37c08d2 commit ad4ec72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions core/router/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
)

// Service is the interface that wraps the basic methods for a router service.
// This service allows to invoke messages and queries via a message router.
type Service interface {
InvokeTyped(ctx context.Context, req, res protoiface.MessageV1) error
InvokeUntyped(ctx context.Context, req protoiface.MessageV1) (res protoiface.MessageV1, err error)
Expand Down
4 changes: 1 addition & 3 deletions runtime/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"github.com/cosmos/gogoproto/proto"
protov2 "google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoregistry"
"google.golang.org/protobuf/runtime/protoiface"

"cosmossdk.io/core/router"
Expand All @@ -16,18 +15,17 @@ import (
"github.com/cosmos/cosmos-sdk/baseapp"
)

// NewMsgRouterService creates a router.Service which allows to invoke messages and queries using the msg router.
func NewMsgRouterService(storeService store.KVStoreService, router baseapp.MessageRouter) router.Service {
return &msgRouterService{
storeService: storeService,
router: router,
resolver: protoregistry.GlobalTypes,
}
}

type msgRouterService struct {
storeService store.KVStoreService
router baseapp.MessageRouter
resolver protoregistry.MessageTypeResolver
}

// InvokeTyped execute a message and fill-in a response.
Expand Down

0 comments on commit ad4ec72

Please sign in to comment.