proto

package
v0.0.0-...-231e548 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 22 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_txpool_proto_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: "txpool/proto/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

func (*AddTxnReq) Validate

func (m *AddTxnReq) Validate() error

Validate checks the field values on AddTxnReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*AddTxnReq) ValidateAll

func (m *AddTxnReq) ValidateAll() error

ValidateAll checks the field values on AddTxnReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AddTxnReqMultiError, or nil if none found.

type AddTxnReqMultiError

type AddTxnReqMultiError []error

AddTxnReqMultiError is an error wrapping multiple validation errors returned by AddTxnReq.ValidateAll() if the designated constraints aren't met.

func (AddTxnReqMultiError) AllErrors

func (m AddTxnReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AddTxnReqMultiError) Error

func (m AddTxnReqMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type AddTxnReqValidationError

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

AddTxnReqValidationError is the validation error returned by AddTxnReq.Validate if the designated constraints aren't met.

func (AddTxnReqValidationError) Cause

func (e AddTxnReqValidationError) Cause() error

Cause function returns cause value.

func (AddTxnReqValidationError) Error

func (e AddTxnReqValidationError) Error() string

Error satisfies the builtin error interface

func (AddTxnReqValidationError) ErrorName

func (e AddTxnReqValidationError) ErrorName() string

ErrorName returns error name.

func (AddTxnReqValidationError) Field

func (e AddTxnReqValidationError) Field() string

Field function returns field value.

func (AddTxnReqValidationError) Key

Key function returns key value.

func (AddTxnReqValidationError) Reason

func (e AddTxnReqValidationError) Reason() string

Reason function returns reason value.

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

func (*AddTxnResp) Validate

func (m *AddTxnResp) Validate() error

Validate checks the field values on AddTxnResp with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*AddTxnResp) ValidateAll

func (m *AddTxnResp) ValidateAll() error

ValidateAll checks the field values on AddTxnResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AddTxnRespMultiError, or nil if none found.

type AddTxnRespMultiError

type AddTxnRespMultiError []error

AddTxnRespMultiError is an error wrapping multiple validation errors returned by AddTxnResp.ValidateAll() if the designated constraints aren't met.

func (AddTxnRespMultiError) AllErrors

func (m AddTxnRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AddTxnRespMultiError) Error

func (m AddTxnRespMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type AddTxnRespValidationError

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

AddTxnRespValidationError is the validation error returned by AddTxnResp.Validate if the designated constraints aren't met.

func (AddTxnRespValidationError) Cause

func (e AddTxnRespValidationError) Cause() error

Cause function returns cause value.

func (AddTxnRespValidationError) Error

Error satisfies the builtin error interface

func (AddTxnRespValidationError) ErrorName

func (e AddTxnRespValidationError) ErrorName() string

ErrorName returns error name.

func (AddTxnRespValidationError) Field

Field function returns field value.

func (AddTxnRespValidationError) Key

Key function returns key value.

func (AddTxnRespValidationError) Reason

func (e AddTxnRespValidationError) Reason() string

Reason function returns reason value.

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

func (*SubscribeRequest) Validate

func (m *SubscribeRequest) Validate() error

Validate checks the field values on SubscribeRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SubscribeRequest) ValidateAll

func (m *SubscribeRequest) ValidateAll() error

ValidateAll checks the field values on SubscribeRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SubscribeRequestMultiError, or nil if none found.

type SubscribeRequestMultiError

type SubscribeRequestMultiError []error

SubscribeRequestMultiError is an error wrapping multiple validation errors returned by SubscribeRequest.ValidateAll() if the designated constraints aren't met.

func (SubscribeRequestMultiError) AllErrors

func (m SubscribeRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SubscribeRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type SubscribeRequestValidationError

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

SubscribeRequestValidationError is the validation error returned by SubscribeRequest.Validate if the designated constraints aren't met.

func (SubscribeRequestValidationError) Cause

Cause function returns cause value.

func (SubscribeRequestValidationError) Error

Error satisfies the builtin error interface

func (SubscribeRequestValidationError) ErrorName

ErrorName returns error name.

func (SubscribeRequestValidationError) Field

Field function returns field value.

func (SubscribeRequestValidationError) Key

Key function returns key value.

func (SubscribeRequestValidationError) Reason

Reason function returns reason value.

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

func (*TxPoolEvent) Validate

func (m *TxPoolEvent) Validate() error

Validate checks the field values on TxPoolEvent with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*TxPoolEvent) ValidateAll

func (m *TxPoolEvent) ValidateAll() error

ValidateAll checks the field values on TxPoolEvent with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TxPoolEventMultiError, or nil if none found.

type TxPoolEventMultiError

type TxPoolEventMultiError []error

TxPoolEventMultiError is an error wrapping multiple validation errors returned by TxPoolEvent.ValidateAll() if the designated constraints aren't met.

func (TxPoolEventMultiError) AllErrors

func (m TxPoolEventMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (TxPoolEventMultiError) Error

func (m TxPoolEventMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type TxPoolEventValidationError

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

TxPoolEventValidationError is the validation error returned by TxPoolEvent.Validate if the designated constraints aren't met.

func (TxPoolEventValidationError) Cause

Cause function returns cause value.

func (TxPoolEventValidationError) Error

Error satisfies the builtin error interface

func (TxPoolEventValidationError) ErrorName

func (e TxPoolEventValidationError) ErrorName() string

ErrorName returns error name.

func (TxPoolEventValidationError) Field

Field function returns field value.

func (TxPoolEventValidationError) Key

Key function returns key value.

func (TxPoolEventValidationError) Reason

Reason function returns reason value.

type Txn

type Txn struct {
	Raw *anypb.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() *anypb.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

func (*Txn) Validate

func (m *Txn) Validate() error

Validate checks the field values on Txn with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Txn) ValidateAll

func (m *Txn) ValidateAll() error

ValidateAll checks the field values on Txn with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TxnMultiError, or nil if none found.

type TxnMultiError

type TxnMultiError []error

TxnMultiError is an error wrapping multiple validation errors returned by Txn.ValidateAll() if the designated constraints aren't met.

func (TxnMultiError) AllErrors

func (m TxnMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (TxnMultiError) Error

func (m TxnMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

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

func (*TxnPoolStatusResp) Validate

func (m *TxnPoolStatusResp) Validate() error

Validate checks the field values on TxnPoolStatusResp with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*TxnPoolStatusResp) ValidateAll

func (m *TxnPoolStatusResp) ValidateAll() error

ValidateAll checks the field values on TxnPoolStatusResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TxnPoolStatusRespMultiError, or nil if none found.

type TxnPoolStatusRespMultiError

type TxnPoolStatusRespMultiError []error

TxnPoolStatusRespMultiError is an error wrapping multiple validation errors returned by TxnPoolStatusResp.ValidateAll() if the designated constraints aren't met.

func (TxnPoolStatusRespMultiError) AllErrors

func (m TxnPoolStatusRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (TxnPoolStatusRespMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type TxnPoolStatusRespValidationError

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

TxnPoolStatusRespValidationError is the validation error returned by TxnPoolStatusResp.Validate if the designated constraints aren't met.

func (TxnPoolStatusRespValidationError) Cause

Cause function returns cause value.

func (TxnPoolStatusRespValidationError) Error

Error satisfies the builtin error interface

func (TxnPoolStatusRespValidationError) ErrorName

ErrorName returns error name.

func (TxnPoolStatusRespValidationError) Field

Field function returns field value.

func (TxnPoolStatusRespValidationError) Key

Key function returns key value.

func (TxnPoolStatusRespValidationError) Reason

Reason function returns reason value.

type TxnValidationError

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

TxnValidationError is the validation error returned by Txn.Validate if the designated constraints aren't met.

func (TxnValidationError) Cause

func (e TxnValidationError) Cause() error

Cause function returns cause value.

func (TxnValidationError) Error

func (e TxnValidationError) Error() string

Error satisfies the builtin error interface

func (TxnValidationError) ErrorName

func (e TxnValidationError) ErrorName() string

ErrorName returns error name.

func (TxnValidationError) Field

func (e TxnValidationError) Field() string

Field function returns field value.

func (TxnValidationError) Key

func (e TxnValidationError) Key() bool

Key function returns key value.

func (TxnValidationError) Reason

func (e TxnValidationError) Reason() string

Reason function returns reason value.

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