proto

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EventType_name = map[int32]string{
		0: "ADDED",
		1: "ENQUEUED",
		2: "PROMOTED",
		3: "DROPPED",
		4: "DEMOTED",
		5: "PRUNED_PROMOTED",
		6: "PRUNED_ENQUEUED",
	}
	EventType_value = map[string]int32{
		"ADDED":           0,
		"ENQUEUED":        1,
		"PROMOTED":        2,
		"DROPPED":         3,
		"DEMOTED":         4,
		"PRUNED_PROMOTED": 5,
		"PRUNED_ENQUEUED": 6,
	}
)

Enum value maps for EventType.

View Source
var File_operator_proto protoreflect.FileDescriptor
View Source
var File_txpool_proto_v1_proto protoreflect.FileDescriptor
View Source
var TxnPoolOperator_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v1.TxnPoolOperator",
	HandlerType: (*TxnPoolOperatorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Status",
			Handler:    _TxnPoolOperator_Status_Handler,
		},
		{
			MethodName: "AddTxn",
			Handler:    _TxnPoolOperator_AddTxn_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _TxnPoolOperator_Subscribe_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "operator.proto",
}

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

Functions

func RegisterTxnPoolOperatorServer

func RegisterTxnPoolOperatorServer(s grpc.ServiceRegistrar, srv TxnPoolOperatorServer)

Types

type AddTxnReq

type AddTxnReq struct {
	Raw  *anypb.Any `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"`
	From string     `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
	// contains filtered or unexported fields
}

func (*AddTxnReq) Descriptor deprecated

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

Deprecated: Use AddTxnReq.ProtoReflect.Descriptor instead.

func (*AddTxnReq) GetFrom

func (x *AddTxnReq) GetFrom() string

func (*AddTxnReq) GetRaw

func (x *AddTxnReq) GetRaw() *anypb.Any

func (*AddTxnReq) ProtoMessage

func (*AddTxnReq) ProtoMessage()

func (*AddTxnReq) ProtoReflect

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

func (*AddTxnReq) Reset

func (x *AddTxnReq) Reset()

func (*AddTxnReq) String

func (x *AddTxnReq) String() string

type AddTxnResp

type AddTxnResp struct {
	TxHash string `protobuf:"bytes,1,opt,name=txHash,proto3" json:"txHash,omitempty"`
	// contains filtered or unexported fields
}

func (*AddTxnResp) Descriptor deprecated

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

Deprecated: Use AddTxnResp.ProtoReflect.Descriptor instead.

func (*AddTxnResp) GetTxHash

func (x *AddTxnResp) GetTxHash() string

func (*AddTxnResp) ProtoMessage

func (*AddTxnResp) ProtoMessage()

func (*AddTxnResp) ProtoReflect

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

func (*AddTxnResp) Reset

func (x *AddTxnResp) Reset()

func (*AddTxnResp) String

func (x *AddTxnResp) String() string

type EventType

type EventType int32
const (
	// For initially added transactions
	EventType_ADDED EventType = 0
	// For enqueued transactions in the account queue
	EventType_ENQUEUED EventType = 1
	// For promoted transactions
	EventType_PROMOTED EventType = 2
	// For dropped transactions
	EventType_DROPPED EventType = 3
	// For demoted transactions
	EventType_DEMOTED EventType = 4
	// For pruned promoted transactions
	EventType_PRUNED_PROMOTED EventType = 5
	// For pruned enqueued transactions
	EventType_PRUNED_ENQUEUED EventType = 6
)

func (EventType) Descriptor

func (EventType) Descriptor() protoreflect.EnumDescriptor

func (EventType) Enum

func (x EventType) Enum() *EventType

func (EventType) EnumDescriptor deprecated

func (EventType) EnumDescriptor() ([]byte, []int)

Deprecated: Use EventType.Descriptor instead.

func (EventType) Number

func (x EventType) Number() protoreflect.EnumNumber

func (EventType) String

func (x EventType) String() string

func (EventType) Type

type SubscribeRequest

type SubscribeRequest struct {

	// Requested event types
	Types []EventType `protobuf:"varint,1,rep,packed,name=types,proto3,enum=v1.EventType" json:"types,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeRequest) Descriptor deprecated

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

Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRequest) GetTypes

func (x *SubscribeRequest) GetTypes() []EventType

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) ProtoReflect

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

func (*SubscribeRequest) Reset

func (x *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (x *SubscribeRequest) String() string

type TxPoolEvent

type TxPoolEvent struct {
	Type   EventType `protobuf:"varint,1,opt,name=type,proto3,enum=v1.EventType" json:"type,omitempty"`
	TxHash string    `protobuf:"bytes,2,opt,name=txHash,proto3" json:"txHash,omitempty"`
	// contains filtered or unexported fields
}

func (*TxPoolEvent) Descriptor deprecated

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

Deprecated: Use TxPoolEvent.ProtoReflect.Descriptor instead.

func (*TxPoolEvent) GetTxHash

func (x *TxPoolEvent) GetTxHash() string

func (*TxPoolEvent) GetType

func (x *TxPoolEvent) GetType() EventType

func (*TxPoolEvent) ProtoMessage

func (*TxPoolEvent) ProtoMessage()

func (*TxPoolEvent) ProtoReflect

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

func (*TxPoolEvent) Reset

func (x *TxPoolEvent) Reset()

func (*TxPoolEvent) String

func (x *TxPoolEvent) String() string

type Txn

type Txn struct {
	Raw *any.Any `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"`
	// contains filtered or unexported fields
}

func (*Txn) Descriptor deprecated

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

Deprecated: Use Txn.ProtoReflect.Descriptor instead.

func (*Txn) GetRaw

func (x *Txn) GetRaw() *any.Any

func (*Txn) ProtoMessage

func (*Txn) ProtoMessage()

func (*Txn) ProtoReflect

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

func (*Txn) Reset

func (x *Txn) Reset()

func (*Txn) String

func (x *Txn) String() string

type TxnPoolOperatorClient

type TxnPoolOperatorClient interface {
	// Status returns the current status of the pool
	Status(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TxnPoolStatusResp, error)
	// AddTxn adds a local transaction to the pool
	AddTxn(ctx context.Context, in *AddTxnReq, opts ...grpc.CallOption) (*AddTxnResp, error)
	// Subscribe subscribes for new events in the txpool
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (TxnPoolOperator_SubscribeClient, error)
}

TxnPoolOperatorClient is the client API for TxnPoolOperator 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 TxnPoolOperatorServer

type TxnPoolOperatorServer interface {
	// Status returns the current status of the pool
	Status(context.Context, *emptypb.Empty) (*TxnPoolStatusResp, error)
	// AddTxn adds a local transaction to the pool
	AddTxn(context.Context, *AddTxnReq) (*AddTxnResp, error)
	// Subscribe subscribes for new events in the txpool
	Subscribe(*SubscribeRequest, TxnPoolOperator_SubscribeServer) error
	// contains filtered or unexported methods
}

TxnPoolOperatorServer is the server API for TxnPoolOperator service. All implementations must embed UnimplementedTxnPoolOperatorServer for forward compatibility

type TxnPoolOperator_SubscribeClient

type TxnPoolOperator_SubscribeClient interface {
	Recv() (*TxPoolEvent, error)
	grpc.ClientStream
}

type TxnPoolOperator_SubscribeServer

type TxnPoolOperator_SubscribeServer interface {
	Send(*TxPoolEvent) error
	grpc.ServerStream
}

type TxnPoolStatusResp

type TxnPoolStatusResp struct {
	Length uint64 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"`
	// contains filtered or unexported fields
}

func (*TxnPoolStatusResp) Descriptor deprecated

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

Deprecated: Use TxnPoolStatusResp.ProtoReflect.Descriptor instead.

func (*TxnPoolStatusResp) GetLength

func (x *TxnPoolStatusResp) GetLength() uint64

func (*TxnPoolStatusResp) ProtoMessage

func (*TxnPoolStatusResp) ProtoMessage()

func (*TxnPoolStatusResp) ProtoReflect

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

func (*TxnPoolStatusResp) Reset

func (x *TxnPoolStatusResp) Reset()

func (*TxnPoolStatusResp) String

func (x *TxnPoolStatusResp) String() string

type UnimplementedTxnPoolOperatorServer

type UnimplementedTxnPoolOperatorServer struct {
}

UnimplementedTxnPoolOperatorServer must be embedded to have forward compatible implementations.

func (UnimplementedTxnPoolOperatorServer) AddTxn

func (UnimplementedTxnPoolOperatorServer) Status

func (UnimplementedTxnPoolOperatorServer) Subscribe

type UnsafeTxnPoolOperatorServer

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

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

Jump to

Keyboard shortcuts

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