mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
refactor/internal (#1216)
* refactor: update import paths in gateway handlers * refactor: remove obsolete devtools Makefile and README * build: optimize build process for improved efficiency * refactor: remove obsolete pkl files related to Matrix and Sonr network configurations * refactor: move embed code to x/dwn/types
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/onsonr/sonr/internal/chain/transaction"
|
||||
)
|
||||
|
||||
// Service is the interface that wraps the basic methods for a router.
|
||||
// A router can be a query router or a message router.
|
||||
type Service interface {
|
||||
// CanInvoke returns an error if the given request cannot be invoked.
|
||||
CanInvoke(ctx context.Context, typeURL string) error
|
||||
// Invoke execute a message or query. The response should be type casted by the caller to the expected response.
|
||||
Invoke(ctx context.Context, req transaction.Msg) (res transaction.Msg, err error)
|
||||
}
|
||||
Reference in New Issue
Block a user