intermodule

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	grpc.ClientConnInterface

	// InvokerByMethod resolves an invoker for the provided method or returns an error.
	InvokerByMethod(method string) (Invoker, error)

	// InvokerByRequest resolves an invoker for the provided request type or returns an error.
	// This only works for Msg's as they are routed based on type name in transactions already.
	// For queries use InvokerByMethod instead.
	InvokerByRequest(request any) (Invoker, error)

	// DerivedClient returns an inter-module client for the ADR-028 derived
	// module address for the provided key.
	DerivedClient(key []byte) Client

	// Address is the ADR-028 address of this client against which messages will be authenticated.
	Address() []byte
}

Client is an inter-module client as specified in ADR-033. It allows one module to send msg's and queries to other modules provided that the request is valid and can be properly authenticated.

type Invoker

type Invoker func(ctx context.Context, request any, opts ...grpc.CallOption) (res any, err error)

Invoker is an inter-module invoker that has already been resolved to a specific method route.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL