shardv2

package
v1.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_shard_v2_shard_proto protoreflect.FileDescriptor
View Source
var TransactionHandler_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "world.engine.shard.v2.TransactionHandler",
	HandlerType: (*TransactionHandlerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RegisterGameShard",
			Handler:    _TransactionHandler_RegisterGameShard_Handler,
		},
		{
			MethodName: "Submit",
			Handler:    _TransactionHandler_Submit_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "shard/v2/shard.proto",
}

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

Functions

func RegisterTransactionHandlerServer

func RegisterTransactionHandlerServer(s grpc.ServiceRegistrar, srv TransactionHandlerServer)

Types

type RegisterGameShardRequest

type RegisterGameShardRequest struct {

	// namespace is the namespace of the game shard.
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// router_address is the address of the game shard's router service.
	RouterAddress string `protobuf:"bytes,2,opt,name=router_address,json=routerAddress,proto3" json:"router_address,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterGameShardRequest) Descriptor deprecated

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

Deprecated: Use RegisterGameShardRequest.ProtoReflect.Descriptor instead.

func (*RegisterGameShardRequest) GetNamespace

func (x *RegisterGameShardRequest) GetNamespace() string

func (*RegisterGameShardRequest) GetRouterAddress

func (x *RegisterGameShardRequest) GetRouterAddress() string

func (*RegisterGameShardRequest) ProtoMessage

func (*RegisterGameShardRequest) ProtoMessage()

func (*RegisterGameShardRequest) ProtoReflect

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

func (*RegisterGameShardRequest) Reset

func (x *RegisterGameShardRequest) Reset()

func (*RegisterGameShardRequest) String

func (x *RegisterGameShardRequest) String() string

type RegisterGameShardResponse

type RegisterGameShardResponse struct {
	// contains filtered or unexported fields
}

func (*RegisterGameShardResponse) Descriptor deprecated

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

Deprecated: Use RegisterGameShardResponse.ProtoReflect.Descriptor instead.

func (*RegisterGameShardResponse) ProtoMessage

func (*RegisterGameShardResponse) ProtoMessage()

func (*RegisterGameShardResponse) ProtoReflect

func (*RegisterGameShardResponse) Reset

func (x *RegisterGameShardResponse) Reset()

func (*RegisterGameShardResponse) String

func (x *RegisterGameShardResponse) String() string

type SubmitTransactionsRequest

type SubmitTransactionsRequest struct {

	// epoch is the period in which the transactions occurred. For loop driven runtimes, such as cardinal,
	// this is often referred to as "tick number".
	Epoch         uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"`
	UnixTimestamp uint64 `protobuf:"varint,2,opt,name=unix_timestamp,json=unixTimestamp,proto3" json:"unix_timestamp,omitempty"`
	// namespace is the namespace of the game shard in which the transactions were executed in.
	Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// transactions is a mapping of game shard transaction ID's to the transactions themselves.
	//
	//	NOTE: if this message is being consumed via Golang, the transaction mapping MUST be converted to a
	//
	// slice with the transaction ID's sorted. Maps in Golang are NOT deterministic.
	Transactions map[uint64]*Transactions `` /* 166-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*SubmitTransactionsRequest) Descriptor deprecated

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

Deprecated: Use SubmitTransactionsRequest.ProtoReflect.Descriptor instead.

func (*SubmitTransactionsRequest) GetEpoch

func (x *SubmitTransactionsRequest) GetEpoch() uint64

func (*SubmitTransactionsRequest) GetNamespace

func (x *SubmitTransactionsRequest) GetNamespace() string

func (*SubmitTransactionsRequest) GetTransactions

func (x *SubmitTransactionsRequest) GetTransactions() map[uint64]*Transactions

func (*SubmitTransactionsRequest) GetUnixTimestamp

func (x *SubmitTransactionsRequest) GetUnixTimestamp() uint64

func (*SubmitTransactionsRequest) ProtoMessage

func (*SubmitTransactionsRequest) ProtoMessage()

func (*SubmitTransactionsRequest) ProtoReflect

func (*SubmitTransactionsRequest) Reset

func (x *SubmitTransactionsRequest) Reset()

func (*SubmitTransactionsRequest) String

func (x *SubmitTransactionsRequest) String() string

type SubmitTransactionsResponse

type SubmitTransactionsResponse struct {
	// contains filtered or unexported fields
}

func (*SubmitTransactionsResponse) Descriptor deprecated

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

Deprecated: Use SubmitTransactionsResponse.ProtoReflect.Descriptor instead.

func (*SubmitTransactionsResponse) ProtoMessage

func (*SubmitTransactionsResponse) ProtoMessage()

func (*SubmitTransactionsResponse) ProtoReflect

func (*SubmitTransactionsResponse) Reset

func (x *SubmitTransactionsResponse) Reset()

func (*SubmitTransactionsResponse) String

func (x *SubmitTransactionsResponse) String() string

type Transaction

type Transaction struct {
	PersonaTag string `protobuf:"bytes,1,opt,name=PersonaTag,proto3" json:"PersonaTag,omitempty"`
	Namespace  string `protobuf:"bytes,2,opt,name=Namespace,proto3" json:"Namespace,omitempty"`
	Nonce      uint64 `protobuf:"varint,3,opt,name=Nonce,proto3" json:"Nonce,omitempty"`
	Signature  string `protobuf:"bytes,4,opt,name=Signature,proto3" json:"Signature,omitempty"`
	Body       []byte `protobuf:"bytes,5,opt,name=Body,proto3" json:"Body,omitempty"`
	// contains filtered or unexported fields
}

func (*Transaction) Descriptor deprecated

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

Deprecated: Use Transaction.ProtoReflect.Descriptor instead.

func (*Transaction) GetBody

func (x *Transaction) GetBody() []byte

func (*Transaction) GetNamespace

func (x *Transaction) GetNamespace() string

func (*Transaction) GetNonce

func (x *Transaction) GetNonce() uint64

func (*Transaction) GetPersonaTag

func (x *Transaction) GetPersonaTag() string

func (*Transaction) GetSignature

func (x *Transaction) GetSignature() string

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) ProtoReflect

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

func (*Transaction) Reset

func (x *Transaction) Reset()

func (*Transaction) String

func (x *Transaction) String() string

type TransactionHandlerClient

type TransactionHandlerClient interface {
	RegisterGameShard(ctx context.Context, in *RegisterGameShardRequest, opts ...grpc.CallOption) (*RegisterGameShardResponse, error)
	// SubmitCardinalBatch handles receiving transactions from a game shard and persisting them to the chain.
	Submit(ctx context.Context, in *SubmitTransactionsRequest, opts ...grpc.CallOption) (*SubmitTransactionsResponse, error)
}

TransactionHandlerClient is the client API for TransactionHandler 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.

type TransactionHandlerServer

type TransactionHandlerServer interface {
	RegisterGameShard(context.Context, *RegisterGameShardRequest) (*RegisterGameShardResponse, error)
	// SubmitCardinalBatch handles receiving transactions from a game shard and persisting them to the chain.
	Submit(context.Context, *SubmitTransactionsRequest) (*SubmitTransactionsResponse, error)
	// contains filtered or unexported methods
}

TransactionHandlerServer is the server API for TransactionHandler service. All implementations must embed UnimplementedTransactionHandlerServer for forward compatibility

type Transactions

type Transactions struct {
	Txs []*Transaction `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
	// contains filtered or unexported fields
}

func (*Transactions) Descriptor deprecated

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

Deprecated: Use Transactions.ProtoReflect.Descriptor instead.

func (*Transactions) GetTxs

func (x *Transactions) GetTxs() []*Transaction

func (*Transactions) ProtoMessage

func (*Transactions) ProtoMessage()

func (*Transactions) ProtoReflect

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

func (*Transactions) Reset

func (x *Transactions) Reset()

func (*Transactions) String

func (x *Transactions) String() string

type UnimplementedTransactionHandlerServer

type UnimplementedTransactionHandlerServer struct {
}

UnimplementedTransactionHandlerServer must be embedded to have forward compatible implementations.

func (UnimplementedTransactionHandlerServer) RegisterGameShard

type UnsafeTransactionHandlerServer

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

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

Jump to

Keyboard shortcuts

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