chore: add all
This commit is contained in:
773
third_party/shreder_protos/shreder.pb.go
vendored
Normal file
773
third_party/shreder_protos/shreder.pb.go
vendored
Normal file
@@ -0,0 +1,773 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v6.33.1
|
||||
// source: shreder.proto
|
||||
|
||||
package shreder_protos
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type SubscribeEntriesRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SubscribeEntriesRequest) Reset() {
|
||||
*x = SubscribeEntriesRequest{}
|
||||
mi := &file_shreder_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SubscribeEntriesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SubscribeEntriesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SubscribeEntriesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_shreder_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SubscribeEntriesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SubscribeEntriesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_shreder_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type SubscribeTransactionsRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Transactions map[string]*SubscribeRequestFilterTransactions `protobuf:"bytes,3,rep,name=transactions,proto3" json:"transactions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SubscribeTransactionsRequest) Reset() {
|
||||
*x = SubscribeTransactionsRequest{}
|
||||
mi := &file_shreder_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SubscribeTransactionsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SubscribeTransactionsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SubscribeTransactionsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_shreder_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SubscribeTransactionsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SubscribeTransactionsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_shreder_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *SubscribeTransactionsRequest) GetTransactions() map[string]*SubscribeRequestFilterTransactions {
|
||||
if x != nil {
|
||||
return x.Transactions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SubscribeTransactionsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Filters []string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
|
||||
Transaction *SubscribeUpdateTransaction `protobuf:"bytes,4,opt,name=transaction,proto3" json:"transaction,omitempty"`
|
||||
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SubscribeTransactionsResponse) Reset() {
|
||||
*x = SubscribeTransactionsResponse{}
|
||||
mi := &file_shreder_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SubscribeTransactionsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SubscribeTransactionsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SubscribeTransactionsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_shreder_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SubscribeTransactionsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SubscribeTransactionsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_shreder_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *SubscribeTransactionsResponse) GetFilters() []string {
|
||||
if x != nil {
|
||||
return x.Filters
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SubscribeTransactionsResponse) GetTransaction() *SubscribeUpdateTransaction {
|
||||
if x != nil {
|
||||
return x.Transaction
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SubscribeTransactionsResponse) GetCreatedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SubscribeUpdateTransaction struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
|
||||
Slot uint64 `protobuf:"varint,2,opt,name=slot,proto3" json:"slot,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SubscribeUpdateTransaction) Reset() {
|
||||
*x = SubscribeUpdateTransaction{}
|
||||
mi := &file_shreder_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SubscribeUpdateTransaction) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SubscribeUpdateTransaction) ProtoMessage() {}
|
||||
|
||||
func (x *SubscribeUpdateTransaction) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_shreder_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SubscribeUpdateTransaction.ProtoReflect.Descriptor instead.
|
||||
func (*SubscribeUpdateTransaction) Descriptor() ([]byte, []int) {
|
||||
return file_shreder_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *SubscribeUpdateTransaction) GetTransaction() *Transaction {
|
||||
if x != nil {
|
||||
return x.Transaction
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SubscribeUpdateTransaction) GetSlot() uint64 {
|
||||
if x != nil {
|
||||
return x.Slot
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type SubscribeRequestFilterTransactions struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
AccountInclude []string `protobuf:"bytes,3,rep,name=account_include,json=accountInclude,proto3" json:"account_include,omitempty"`
|
||||
AccountExclude []string `protobuf:"bytes,4,rep,name=account_exclude,json=accountExclude,proto3" json:"account_exclude,omitempty"`
|
||||
AccountRequired []string `protobuf:"bytes,6,rep,name=account_required,json=accountRequired,proto3" json:"account_required,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SubscribeRequestFilterTransactions) Reset() {
|
||||
*x = SubscribeRequestFilterTransactions{}
|
||||
mi := &file_shreder_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SubscribeRequestFilterTransactions) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SubscribeRequestFilterTransactions) ProtoMessage() {}
|
||||
|
||||
func (x *SubscribeRequestFilterTransactions) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_shreder_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SubscribeRequestFilterTransactions.ProtoReflect.Descriptor instead.
|
||||
func (*SubscribeRequestFilterTransactions) Descriptor() ([]byte, []int) {
|
||||
return file_shreder_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *SubscribeRequestFilterTransactions) GetAccountInclude() []string {
|
||||
if x != nil {
|
||||
return x.AccountInclude
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SubscribeRequestFilterTransactions) GetAccountExclude() []string {
|
||||
if x != nil {
|
||||
return x.AccountExclude
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SubscribeRequestFilterTransactions) GetAccountRequired() []string {
|
||||
if x != nil {
|
||||
return x.AccountRequired
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Entry struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// the slot that the entry is from
|
||||
Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"`
|
||||
// Serialized bytes of Vec<Entry>: https://docs.rs/solana-entry/latest/solana_entry/entry/struct.Entry.html
|
||||
Entries []byte `protobuf:"bytes,2,opt,name=entries,proto3" json:"entries,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Entry) Reset() {
|
||||
*x = Entry{}
|
||||
mi := &file_shreder_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Entry) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Entry) ProtoMessage() {}
|
||||
|
||||
func (x *Entry) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_shreder_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Entry.ProtoReflect.Descriptor instead.
|
||||
func (*Entry) Descriptor() ([]byte, []int) {
|
||||
return file_shreder_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *Entry) GetSlot() uint64 {
|
||||
if x != nil {
|
||||
return x.Slot
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Entry) GetEntries() []byte {
|
||||
if x != nil {
|
||||
return x.Entries
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type MessageHeader struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
NumRequiredSignatures uint32 `protobuf:"varint,1,opt,name=num_required_signatures,json=numRequiredSignatures,proto3" json:"num_required_signatures,omitempty"`
|
||||
NumReadonlySignedAccounts uint32 `protobuf:"varint,2,opt,name=num_readonly_signed_accounts,json=numReadonlySignedAccounts,proto3" json:"num_readonly_signed_accounts,omitempty"`
|
||||
NumReadonlyUnsignedAccounts uint32 `protobuf:"varint,3,opt,name=num_readonly_unsigned_accounts,json=numReadonlyUnsignedAccounts,proto3" json:"num_readonly_unsigned_accounts,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *MessageHeader) Reset() {
|
||||
*x = MessageHeader{}
|
||||
mi := &file_shreder_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *MessageHeader) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MessageHeader) ProtoMessage() {}
|
||||
|
||||
func (x *MessageHeader) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_shreder_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use MessageHeader.ProtoReflect.Descriptor instead.
|
||||
func (*MessageHeader) Descriptor() ([]byte, []int) {
|
||||
return file_shreder_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *MessageHeader) GetNumRequiredSignatures() uint32 {
|
||||
if x != nil {
|
||||
return x.NumRequiredSignatures
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MessageHeader) GetNumReadonlySignedAccounts() uint32 {
|
||||
if x != nil {
|
||||
return x.NumReadonlySignedAccounts
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MessageHeader) GetNumReadonlyUnsignedAccounts() uint32 {
|
||||
if x != nil {
|
||||
return x.NumReadonlyUnsignedAccounts
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type CompiledInstruction struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
ProgramIdIndex uint32 `protobuf:"varint,1,opt,name=program_id_index,json=programIdIndex,proto3" json:"program_id_index,omitempty"`
|
||||
Accounts []byte `protobuf:"bytes,2,opt,name=accounts,proto3" json:"accounts,omitempty"`
|
||||
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CompiledInstruction) Reset() {
|
||||
*x = CompiledInstruction{}
|
||||
mi := &file_shreder_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CompiledInstruction) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CompiledInstruction) ProtoMessage() {}
|
||||
|
||||
func (x *CompiledInstruction) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_shreder_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CompiledInstruction.ProtoReflect.Descriptor instead.
|
||||
func (*CompiledInstruction) Descriptor() ([]byte, []int) {
|
||||
return file_shreder_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *CompiledInstruction) GetProgramIdIndex() uint32 {
|
||||
if x != nil {
|
||||
return x.ProgramIdIndex
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CompiledInstruction) GetAccounts() []byte {
|
||||
if x != nil {
|
||||
return x.Accounts
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CompiledInstruction) GetData() []byte {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type MessageAddressTableLookup struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
AccountKey []byte `protobuf:"bytes,1,opt,name=account_key,json=accountKey,proto3" json:"account_key,omitempty"`
|
||||
WritableIndexes []byte `protobuf:"bytes,2,opt,name=writable_indexes,json=writableIndexes,proto3" json:"writable_indexes,omitempty"`
|
||||
ReadonlyIndexes []byte `protobuf:"bytes,3,opt,name=readonly_indexes,json=readonlyIndexes,proto3" json:"readonly_indexes,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *MessageAddressTableLookup) Reset() {
|
||||
*x = MessageAddressTableLookup{}
|
||||
mi := &file_shreder_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *MessageAddressTableLookup) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MessageAddressTableLookup) ProtoMessage() {}
|
||||
|
||||
func (x *MessageAddressTableLookup) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_shreder_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use MessageAddressTableLookup.ProtoReflect.Descriptor instead.
|
||||
func (*MessageAddressTableLookup) Descriptor() ([]byte, []int) {
|
||||
return file_shreder_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *MessageAddressTableLookup) GetAccountKey() []byte {
|
||||
if x != nil {
|
||||
return x.AccountKey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *MessageAddressTableLookup) GetWritableIndexes() []byte {
|
||||
if x != nil {
|
||||
return x.WritableIndexes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *MessageAddressTableLookup) GetReadonlyIndexes() []byte {
|
||||
if x != nil {
|
||||
return x.ReadonlyIndexes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Message struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Header *MessageHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
AccountKeys [][]byte `protobuf:"bytes,2,rep,name=account_keys,json=accountKeys,proto3" json:"account_keys,omitempty"`
|
||||
RecentBlockhash []byte `protobuf:"bytes,3,opt,name=recent_blockhash,json=recentBlockhash,proto3" json:"recent_blockhash,omitempty"`
|
||||
Instructions []*CompiledInstruction `protobuf:"bytes,4,rep,name=instructions,proto3" json:"instructions,omitempty"`
|
||||
Versioned bool `protobuf:"varint,5,opt,name=versioned,proto3" json:"versioned,omitempty"`
|
||||
AddressTableLookups []*MessageAddressTableLookup `protobuf:"bytes,6,rep,name=address_table_lookups,json=addressTableLookups,proto3" json:"address_table_lookups,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Message) Reset() {
|
||||
*x = Message{}
|
||||
mi := &file_shreder_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Message) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Message) ProtoMessage() {}
|
||||
|
||||
func (x *Message) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_shreder_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Message.ProtoReflect.Descriptor instead.
|
||||
func (*Message) Descriptor() ([]byte, []int) {
|
||||
return file_shreder_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *Message) GetHeader() *MessageHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Message) GetAccountKeys() [][]byte {
|
||||
if x != nil {
|
||||
return x.AccountKeys
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Message) GetRecentBlockhash() []byte {
|
||||
if x != nil {
|
||||
return x.RecentBlockhash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Message) GetInstructions() []*CompiledInstruction {
|
||||
if x != nil {
|
||||
return x.Instructions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Message) GetVersioned() bool {
|
||||
if x != nil {
|
||||
return x.Versioned
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Message) GetAddressTableLookups() []*MessageAddressTableLookup {
|
||||
if x != nil {
|
||||
return x.AddressTableLookups
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Transaction struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Signatures [][]byte `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"`
|
||||
Message *Message `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Transaction) Reset() {
|
||||
*x = Transaction{}
|
||||
mi := &file_shreder_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Transaction) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Transaction) ProtoMessage() {}
|
||||
|
||||
func (x *Transaction) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_shreder_proto_msgTypes[10]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
|
||||
func (*Transaction) Descriptor() ([]byte, []int) {
|
||||
return file_shreder_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *Transaction) GetSignatures() [][]byte {
|
||||
if x != nil {
|
||||
return x.Signatures
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Transaction) GetMessage() *Message {
|
||||
if x != nil {
|
||||
return x.Message
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_shreder_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_shreder_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\rshreder.proto\x12\vshredstream\x1a\x1fgoogle/protobuf/timestamp.proto\"\x19\n" +
|
||||
"\x17SubscribeEntriesRequest\"\xf1\x01\n" +
|
||||
"\x1cSubscribeTransactionsRequest\x12_\n" +
|
||||
"\ftransactions\x18\x03 \x03(\v2;.shredstream.SubscribeTransactionsRequest.TransactionsEntryR\ftransactions\x1ap\n" +
|
||||
"\x11TransactionsEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12E\n" +
|
||||
"\x05value\x18\x02 \x01(\v2/.shredstream.SubscribeRequestFilterTransactionsR\x05value:\x028\x01\"\xbf\x01\n" +
|
||||
"\x1dSubscribeTransactionsResponse\x12\x18\n" +
|
||||
"\afilters\x18\x01 \x03(\tR\afilters\x12I\n" +
|
||||
"\vtransaction\x18\x04 \x01(\v2'.shredstream.SubscribeUpdateTransactionR\vtransaction\x129\n" +
|
||||
"\n" +
|
||||
"created_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\"l\n" +
|
||||
"\x1aSubscribeUpdateTransaction\x12:\n" +
|
||||
"\vtransaction\x18\x01 \x01(\v2\x18.shredstream.TransactionR\vtransaction\x12\x12\n" +
|
||||
"\x04slot\x18\x02 \x01(\x04R\x04slot\"\xa1\x01\n" +
|
||||
"\"SubscribeRequestFilterTransactions\x12'\n" +
|
||||
"\x0faccount_include\x18\x03 \x03(\tR\x0eaccountInclude\x12'\n" +
|
||||
"\x0faccount_exclude\x18\x04 \x03(\tR\x0eaccountExclude\x12)\n" +
|
||||
"\x10account_required\x18\x06 \x03(\tR\x0faccountRequired\"5\n" +
|
||||
"\x05Entry\x12\x12\n" +
|
||||
"\x04slot\x18\x01 \x01(\x04R\x04slot\x12\x18\n" +
|
||||
"\aentries\x18\x02 \x01(\fR\aentries\"\xcd\x01\n" +
|
||||
"\rMessageHeader\x126\n" +
|
||||
"\x17num_required_signatures\x18\x01 \x01(\rR\x15numRequiredSignatures\x12?\n" +
|
||||
"\x1cnum_readonly_signed_accounts\x18\x02 \x01(\rR\x19numReadonlySignedAccounts\x12C\n" +
|
||||
"\x1enum_readonly_unsigned_accounts\x18\x03 \x01(\rR\x1bnumReadonlyUnsignedAccounts\"o\n" +
|
||||
"\x13CompiledInstruction\x12(\n" +
|
||||
"\x10program_id_index\x18\x01 \x01(\rR\x0eprogramIdIndex\x12\x1a\n" +
|
||||
"\baccounts\x18\x02 \x01(\fR\baccounts\x12\x12\n" +
|
||||
"\x04data\x18\x03 \x01(\fR\x04data\"\x92\x01\n" +
|
||||
"\x19MessageAddressTableLookup\x12\x1f\n" +
|
||||
"\vaccount_key\x18\x01 \x01(\fR\n" +
|
||||
"accountKey\x12)\n" +
|
||||
"\x10writable_indexes\x18\x02 \x01(\fR\x0fwritableIndexes\x12)\n" +
|
||||
"\x10readonly_indexes\x18\x03 \x01(\fR\x0freadonlyIndexes\"\xcb\x02\n" +
|
||||
"\aMessage\x122\n" +
|
||||
"\x06header\x18\x01 \x01(\v2\x1a.shredstream.MessageHeaderR\x06header\x12!\n" +
|
||||
"\faccount_keys\x18\x02 \x03(\fR\vaccountKeys\x12)\n" +
|
||||
"\x10recent_blockhash\x18\x03 \x01(\fR\x0frecentBlockhash\x12D\n" +
|
||||
"\finstructions\x18\x04 \x03(\v2 .shredstream.CompiledInstructionR\finstructions\x12\x1c\n" +
|
||||
"\tversioned\x18\x05 \x01(\bR\tversioned\x12Z\n" +
|
||||
"\x15address_table_lookups\x18\x06 \x03(\v2&.shredstream.MessageAddressTableLookupR\x13addressTableLookups\"]\n" +
|
||||
"\vTransaction\x12\x1e\n" +
|
||||
"\n" +
|
||||
"signatures\x18\x01 \x03(\fR\n" +
|
||||
"signatures\x12.\n" +
|
||||
"\amessage\x18\x02 \x01(\v2\x14.shredstream.MessageR\amessage2\xd4\x01\n" +
|
||||
"\x0eShrederService\x12N\n" +
|
||||
"\x10SubscribeEntries\x12$.shredstream.SubscribeEntriesRequest\x1a\x12.shredstream.Entry0\x01\x12r\n" +
|
||||
"\x15SubscribeTransactions\x12).shredstream.SubscribeTransactionsRequest\x1a*.shredstream.SubscribeTransactionsResponse(\x010\x01b\x06proto3"
|
||||
|
||||
var (
|
||||
file_shreder_proto_rawDescOnce sync.Once
|
||||
file_shreder_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_shreder_proto_rawDescGZIP() []byte {
|
||||
file_shreder_proto_rawDescOnce.Do(func() {
|
||||
file_shreder_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_shreder_proto_rawDesc), len(file_shreder_proto_rawDesc)))
|
||||
})
|
||||
return file_shreder_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_shreder_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||
var file_shreder_proto_goTypes = []any{
|
||||
(*SubscribeEntriesRequest)(nil), // 0: shredstream.SubscribeEntriesRequest
|
||||
(*SubscribeTransactionsRequest)(nil), // 1: shredstream.SubscribeTransactionsRequest
|
||||
(*SubscribeTransactionsResponse)(nil), // 2: shredstream.SubscribeTransactionsResponse
|
||||
(*SubscribeUpdateTransaction)(nil), // 3: shredstream.SubscribeUpdateTransaction
|
||||
(*SubscribeRequestFilterTransactions)(nil), // 4: shredstream.SubscribeRequestFilterTransactions
|
||||
(*Entry)(nil), // 5: shredstream.Entry
|
||||
(*MessageHeader)(nil), // 6: shredstream.MessageHeader
|
||||
(*CompiledInstruction)(nil), // 7: shredstream.CompiledInstruction
|
||||
(*MessageAddressTableLookup)(nil), // 8: shredstream.MessageAddressTableLookup
|
||||
(*Message)(nil), // 9: shredstream.Message
|
||||
(*Transaction)(nil), // 10: shredstream.Transaction
|
||||
nil, // 11: shredstream.SubscribeTransactionsRequest.TransactionsEntry
|
||||
(*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp
|
||||
}
|
||||
var file_shreder_proto_depIdxs = []int32{
|
||||
11, // 0: shredstream.SubscribeTransactionsRequest.transactions:type_name -> shredstream.SubscribeTransactionsRequest.TransactionsEntry
|
||||
3, // 1: shredstream.SubscribeTransactionsResponse.transaction:type_name -> shredstream.SubscribeUpdateTransaction
|
||||
12, // 2: shredstream.SubscribeTransactionsResponse.created_at:type_name -> google.protobuf.Timestamp
|
||||
10, // 3: shredstream.SubscribeUpdateTransaction.transaction:type_name -> shredstream.Transaction
|
||||
6, // 4: shredstream.Message.header:type_name -> shredstream.MessageHeader
|
||||
7, // 5: shredstream.Message.instructions:type_name -> shredstream.CompiledInstruction
|
||||
8, // 6: shredstream.Message.address_table_lookups:type_name -> shredstream.MessageAddressTableLookup
|
||||
9, // 7: shredstream.Transaction.message:type_name -> shredstream.Message
|
||||
4, // 8: shredstream.SubscribeTransactionsRequest.TransactionsEntry.value:type_name -> shredstream.SubscribeRequestFilterTransactions
|
||||
0, // 9: shredstream.ShrederService.SubscribeEntries:input_type -> shredstream.SubscribeEntriesRequest
|
||||
1, // 10: shredstream.ShrederService.SubscribeTransactions:input_type -> shredstream.SubscribeTransactionsRequest
|
||||
5, // 11: shredstream.ShrederService.SubscribeEntries:output_type -> shredstream.Entry
|
||||
2, // 12: shredstream.ShrederService.SubscribeTransactions:output_type -> shredstream.SubscribeTransactionsResponse
|
||||
11, // [11:13] is the sub-list for method output_type
|
||||
9, // [9:11] is the sub-list for method input_type
|
||||
9, // [9:9] is the sub-list for extension type_name
|
||||
9, // [9:9] is the sub-list for extension extendee
|
||||
0, // [0:9] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_shreder_proto_init() }
|
||||
func file_shreder_proto_init() {
|
||||
if File_shreder_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_shreder_proto_rawDesc), len(file_shreder_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 12,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_shreder_proto_goTypes,
|
||||
DependencyIndexes: file_shreder_proto_depIdxs,
|
||||
MessageInfos: file_shreder_proto_msgTypes,
|
||||
}.Build()
|
||||
File_shreder_proto = out.File
|
||||
file_shreder_proto_goTypes = nil
|
||||
file_shreder_proto_depIdxs = nil
|
||||
}
|
||||
75
third_party/shreder_protos/shreder.proto
vendored
Normal file
75
third_party/shreder_protos/shreder.proto
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package shredstream;
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
|
||||
service ShrederService {
|
||||
rpc SubscribeEntries(SubscribeEntriesRequest) returns (stream Entry);
|
||||
rpc SubscribeTransactions(stream SubscribeTransactionsRequest) returns (stream SubscribeTransactionsResponse);
|
||||
}
|
||||
|
||||
message SubscribeEntriesRequest {
|
||||
// tbd: we may want to add filters here
|
||||
}
|
||||
|
||||
message SubscribeTransactionsRequest {
|
||||
map<string, SubscribeRequestFilterTransactions> transactions = 3;
|
||||
}
|
||||
|
||||
message SubscribeTransactionsResponse {
|
||||
repeated string filters = 1;
|
||||
SubscribeUpdateTransaction transaction = 4;
|
||||
google.protobuf.Timestamp created_at = 11;
|
||||
}
|
||||
|
||||
message SubscribeUpdateTransaction {
|
||||
Transaction transaction = 1;
|
||||
uint64 slot = 2;
|
||||
}
|
||||
|
||||
message SubscribeRequestFilterTransactions {
|
||||
repeated string account_include = 3;
|
||||
repeated string account_exclude = 4;
|
||||
repeated string account_required = 6;
|
||||
}
|
||||
|
||||
message Entry {
|
||||
// the slot that the entry is from
|
||||
uint64 slot = 1;
|
||||
|
||||
// Serialized bytes of Vec<Entry>: https://docs.rs/solana-entry/latest/solana_entry/entry/struct.Entry.html
|
||||
bytes entries = 2;
|
||||
}
|
||||
|
||||
message MessageHeader {
|
||||
uint32 num_required_signatures = 1;
|
||||
uint32 num_readonly_signed_accounts = 2;
|
||||
uint32 num_readonly_unsigned_accounts = 3;
|
||||
}
|
||||
|
||||
message CompiledInstruction {
|
||||
uint32 program_id_index = 1;
|
||||
bytes accounts = 2;
|
||||
bytes data = 3;
|
||||
}
|
||||
|
||||
message MessageAddressTableLookup {
|
||||
bytes account_key = 1;
|
||||
bytes writable_indexes = 2;
|
||||
bytes readonly_indexes = 3;
|
||||
}
|
||||
|
||||
message Message {
|
||||
MessageHeader header = 1;
|
||||
repeated bytes account_keys = 2;
|
||||
bytes recent_blockhash = 3;
|
||||
repeated CompiledInstruction instructions = 4;
|
||||
bool versioned = 5;
|
||||
repeated MessageAddressTableLookup address_table_lookups = 6;
|
||||
}
|
||||
|
||||
message Transaction {
|
||||
repeated bytes signatures = 1;
|
||||
Message message = 2;
|
||||
}
|
||||
156
third_party/shreder_protos/shreder_grpc.pb.go
vendored
Normal file
156
third_party/shreder_protos/shreder_grpc.pb.go
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.0
|
||||
// - protoc v6.33.1
|
||||
// source: shreder.proto
|
||||
|
||||
package shreder_protos
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
ShrederService_SubscribeEntries_FullMethodName = "/shredstream.ShrederService/SubscribeEntries"
|
||||
ShrederService_SubscribeTransactions_FullMethodName = "/shredstream.ShrederService/SubscribeTransactions"
|
||||
)
|
||||
|
||||
// ShrederServiceClient is the client API for ShrederService 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 ShrederServiceClient interface {
|
||||
SubscribeEntries(ctx context.Context, in *SubscribeEntriesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Entry], error)
|
||||
SubscribeTransactions(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SubscribeTransactionsRequest, SubscribeTransactionsResponse], error)
|
||||
}
|
||||
|
||||
type shrederServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewShrederServiceClient(cc grpc.ClientConnInterface) ShrederServiceClient {
|
||||
return &shrederServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *shrederServiceClient) SubscribeEntries(ctx context.Context, in *SubscribeEntriesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Entry], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &ShrederService_ServiceDesc.Streams[0], ShrederService_SubscribeEntries_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &grpc.GenericClientStream[SubscribeEntriesRequest, Entry]{ClientStream: stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ShrederService_SubscribeEntriesClient = grpc.ServerStreamingClient[Entry]
|
||||
|
||||
func (c *shrederServiceClient) SubscribeTransactions(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SubscribeTransactionsRequest, SubscribeTransactionsResponse], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &ShrederService_ServiceDesc.Streams[1], ShrederService_SubscribeTransactions_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &grpc.GenericClientStream[SubscribeTransactionsRequest, SubscribeTransactionsResponse]{ClientStream: stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ShrederService_SubscribeTransactionsClient = grpc.BidiStreamingClient[SubscribeTransactionsRequest, SubscribeTransactionsResponse]
|
||||
|
||||
// ShrederServiceServer is the server API for ShrederService service.
|
||||
// All implementations must embed UnimplementedShrederServiceServer
|
||||
// for forward compatibility.
|
||||
type ShrederServiceServer interface {
|
||||
SubscribeEntries(*SubscribeEntriesRequest, grpc.ServerStreamingServer[Entry]) error
|
||||
SubscribeTransactions(grpc.BidiStreamingServer[SubscribeTransactionsRequest, SubscribeTransactionsResponse]) error
|
||||
mustEmbedUnimplementedShrederServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedShrederServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedShrederServiceServer struct{}
|
||||
|
||||
func (UnimplementedShrederServiceServer) SubscribeEntries(*SubscribeEntriesRequest, grpc.ServerStreamingServer[Entry]) error {
|
||||
return status.Error(codes.Unimplemented, "method SubscribeEntries not implemented")
|
||||
}
|
||||
func (UnimplementedShrederServiceServer) SubscribeTransactions(grpc.BidiStreamingServer[SubscribeTransactionsRequest, SubscribeTransactionsResponse]) error {
|
||||
return status.Error(codes.Unimplemented, "method SubscribeTransactions not implemented")
|
||||
}
|
||||
func (UnimplementedShrederServiceServer) mustEmbedUnimplementedShrederServiceServer() {}
|
||||
func (UnimplementedShrederServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeShrederServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ShrederServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeShrederServiceServer interface {
|
||||
mustEmbedUnimplementedShrederServiceServer()
|
||||
}
|
||||
|
||||
func RegisterShrederServiceServer(s grpc.ServiceRegistrar, srv ShrederServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedShrederServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&ShrederService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _ShrederService_SubscribeEntries_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(SubscribeEntriesRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(ShrederServiceServer).SubscribeEntries(m, &grpc.GenericServerStream[SubscribeEntriesRequest, Entry]{ServerStream: stream})
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ShrederService_SubscribeEntriesServer = grpc.ServerStreamingServer[Entry]
|
||||
|
||||
func _ShrederService_SubscribeTransactions_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(ShrederServiceServer).SubscribeTransactions(&grpc.GenericServerStream[SubscribeTransactionsRequest, SubscribeTransactionsResponse]{ServerStream: stream})
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ShrederService_SubscribeTransactionsServer = grpc.BidiStreamingServer[SubscribeTransactionsRequest, SubscribeTransactionsResponse]
|
||||
|
||||
// ShrederService_ServiceDesc is the grpc.ServiceDesc for ShrederService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var ShrederService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "shredstream.ShrederService",
|
||||
HandlerType: (*ShrederServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "SubscribeEntries",
|
||||
Handler: _ShrederService_SubscribeEntries_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "SubscribeTransactions",
|
||||
Handler: _ShrederService_SubscribeTransactions_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "shreder.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user