routerv1

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: LGPL-3.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_router_v1_router_proto protoreflect.FileDescriptor
View Source
var Msg_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "world.engine.router.v1.Msg",
	HandlerType: (*MsgServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendMessage",
			Handler:    _Msg_SendMessage_Handler,
		},
		{
			MethodName: "QueryShard",
			Handler:    _Msg_QueryShard_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "router/v1/router.proto",
}

Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMsgServer

func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer)

Types

type MsgClient

type MsgClient interface {
	SendMessage(ctx context.Context, in *SendMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error)
	QueryShard(ctx context.Context, in *QueryShardRequest, opts ...grpc.CallOption) (*QueryShardResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc.ClientConnInterface) MsgClient

type MsgServer

type MsgServer interface {
	SendMessage(context.Context, *SendMessageRequest) (*SendMessageResponse, error)
	QueryShard(context.Context, *QueryShardRequest) (*QueryShardResponse, error)
	// contains filtered or unexported methods
}

MsgServer is the server API for Msg service. All implementations must embed UnimplementedMsgServer for forward compatibility

type QueryShardRequest

type QueryShardRequest struct {

	// resource is the resource to query for.
	Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	// request is an ABI encoded request struct.
	Request []byte `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryShardRequest) Descriptor deprecated

func (*QueryShardRequest) Descriptor() ([]byte, []int)

Deprecated: Use QueryShardRequest.ProtoReflect.Descriptor instead.

func (*QueryShardRequest) GetRequest

func (x *QueryShardRequest) GetRequest() []byte

func (*QueryShardRequest) GetResource

func (x *QueryShardRequest) GetResource() string

func (*QueryShardRequest) ProtoMessage

func (*QueryShardRequest) ProtoMessage()

func (*QueryShardRequest) ProtoReflect

func (x *QueryShardRequest) ProtoReflect() protoreflect.Message

func (*QueryShardRequest) Reset

func (x *QueryShardRequest) Reset()

func (*QueryShardRequest) String

func (x *QueryShardRequest) String() string

type QueryShardResponse

type QueryShardResponse struct {

	// response is an ABI encoded response struct.
	Response []byte `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryShardResponse) Descriptor deprecated

func (*QueryShardResponse) Descriptor() ([]byte, []int)

Deprecated: Use QueryShardResponse.ProtoReflect.Descriptor instead.

func (*QueryShardResponse) GetResponse

func (x *QueryShardResponse) GetResponse() []byte

func (*QueryShardResponse) ProtoMessage

func (*QueryShardResponse) ProtoMessage()

func (*QueryShardResponse) ProtoReflect

func (x *QueryShardResponse) ProtoReflect() protoreflect.Message

func (*QueryShardResponse) Reset

func (x *QueryShardResponse) Reset()

func (*QueryShardResponse) String

func (x *QueryShardResponse) String() string

type SendMessageRequest

type SendMessageRequest struct {

	// sender is the identifier of the message sender.
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// persona_tag is the persona tag the requester is requesting to use for this message.
	PersonaTag string `protobuf:"bytes,2,opt,name=persona_tag,json=personaTag,proto3" json:"persona_tag,omitempty"`
	// message contains the underlying bytes of the message. typically, this is an abi encoded solidity struct.
	Message []byte `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// message_id is the id of the message. this is needed to indicate to the server which concrete type to deserialize
	// the message bytes into.
	MessageId string `protobuf:"bytes,4,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	// evm_tx_hash is the tx hash of the evm transaction that triggered the request.
	EvmTxHash string `protobuf:"bytes,5,opt,name=evm_tx_hash,json=evmTxHash,proto3" json:"evm_tx_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*SendMessageRequest) Descriptor deprecated

func (*SendMessageRequest) Descriptor() ([]byte, []int)

Deprecated: Use SendMessageRequest.ProtoReflect.Descriptor instead.

func (*SendMessageRequest) GetEvmTxHash

func (x *SendMessageRequest) GetEvmTxHash() string

func (*SendMessageRequest) GetMessage

func (x *SendMessageRequest) GetMessage() []byte

func (*SendMessageRequest) GetMessageId

func (x *SendMessageRequest) GetMessageId() string

func (*SendMessageRequest) GetPersonaTag

func (x *SendMessageRequest) GetPersonaTag() string

func (*SendMessageRequest) GetSender

func (x *SendMessageRequest) GetSender() string

func (*SendMessageRequest) ProtoMessage

func (*SendMessageRequest) ProtoMessage()

func (*SendMessageRequest) ProtoReflect

func (x *SendMessageRequest) ProtoReflect() protoreflect.Message

func (*SendMessageRequest) Reset

func (x *SendMessageRequest) Reset()

func (*SendMessageRequest) String

func (x *SendMessageRequest) String() string

type SendMessageResponse

type SendMessageResponse struct {

	// errs contain any errors that occurred during the transaction execution.
	Errs string `protobuf:"bytes,1,opt,name=errs,proto3" json:"errs,omitempty"`
	// result is an ABI encoded struct of the transaction type's result.
	Result []byte `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
	// evm_tx_hash is the tx hash of the evm transaction that triggered the request.
	EvmTxHash string `protobuf:"bytes,3,opt,name=evm_tx_hash,json=evmTxHash,proto3" json:"evm_tx_hash,omitempty"`
	// code is an arbitrary code that represents the result of the message execution. Refer to game shard documentation
	// for code definitions.
	Code uint32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*SendMessageResponse) Descriptor deprecated

func (*SendMessageResponse) Descriptor() ([]byte, []int)

Deprecated: Use SendMessageResponse.ProtoReflect.Descriptor instead.

func (*SendMessageResponse) GetCode

func (x *SendMessageResponse) GetCode() uint32

func (*SendMessageResponse) GetErrs

func (x *SendMessageResponse) GetErrs() string

func (*SendMessageResponse) GetEvmTxHash

func (x *SendMessageResponse) GetEvmTxHash() string

func (*SendMessageResponse) GetResult

func (x *SendMessageResponse) GetResult() []byte

func (*SendMessageResponse) ProtoMessage

func (*SendMessageResponse) ProtoMessage()

func (*SendMessageResponse) ProtoReflect

func (x *SendMessageResponse) ProtoReflect() protoreflect.Message

func (*SendMessageResponse) Reset

func (x *SendMessageResponse) Reset()

func (*SendMessageResponse) String

func (x *SendMessageResponse) String() string

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer must be embedded to have forward compatible implementations.

func (UnimplementedMsgServer) QueryShard

func (UnimplementedMsgServer) SendMessage

type UnsafeMsgServer

type UnsafeMsgServer interface {
	// contains filtered or unexported methods
}

UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MsgServer will result in compilation errors.

Jump to

Keyboard shortcuts

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