protocoordinatorservice

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Coordinator_BlockProcessing_FullMethodName                      = "/protocoordinatorservice.Coordinator/BlockProcessing"
	Coordinator_SetLastCommittedBlockNumber_FullMethodName          = "/protocoordinatorservice.Coordinator/SetLastCommittedBlockNumber"
	Coordinator_GetLastCommittedBlockNumber_FullMethodName          = "/protocoordinatorservice.Coordinator/GetLastCommittedBlockNumber"
	Coordinator_GetNextExpectedBlockNumber_FullMethodName           = "/protocoordinatorservice.Coordinator/GetNextExpectedBlockNumber"
	Coordinator_GetTransactionsStatus_FullMethodName                = "/protocoordinatorservice.Coordinator/GetTransactionsStatus"
	Coordinator_GetConfigTransaction_FullMethodName                 = "/protocoordinatorservice.Coordinator/GetConfigTransaction"
	Coordinator_NumberOfWaitingTransactionsForStatus_FullMethodName = "/protocoordinatorservice.Coordinator/NumberOfWaitingTransactionsForStatus"
)

Variables

View Source
var Coordinator_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "protocoordinatorservice.Coordinator",
	HandlerType: (*CoordinatorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SetLastCommittedBlockNumber",
			Handler:    _Coordinator_SetLastCommittedBlockNumber_Handler,
		},
		{
			MethodName: "GetLastCommittedBlockNumber",
			Handler:    _Coordinator_GetLastCommittedBlockNumber_Handler,
		},
		{
			MethodName: "GetNextExpectedBlockNumber",
			Handler:    _Coordinator_GetNextExpectedBlockNumber_Handler,
		},
		{
			MethodName: "GetTransactionsStatus",
			Handler:    _Coordinator_GetTransactionsStatus_Handler,
		},
		{
			MethodName: "GetConfigTransaction",
			Handler:    _Coordinator_GetConfigTransaction_Handler,
		},
		{
			MethodName: "NumberOfWaitingTransactionsForStatus",
			Handler:    _Coordinator_NumberOfWaitingTransactionsForStatus_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "BlockProcessing",
			Handler:       _Coordinator_BlockProcessing_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "api/protocoordinatorservice/coordinator.proto",
}

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

View Source
var File_api_protocoordinatorservice_coordinator_proto protoreflect.FileDescriptor

Functions

func RegisterCoordinatorServer

func RegisterCoordinatorServer(s grpc.ServiceRegistrar, srv CoordinatorServer)

Types

type Block

type Block struct {
	Number   uint64             `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`                      // The block number.
	Txs      []*protoblocktx.Tx `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"`                             // List of transactions within the block.
	TxsNum   []uint32           `protobuf:"varint,3,rep,packed,name=txs_num,json=txsNum,proto3" json:"txs_num,omitempty"` // Transaction number within the block generated by the orderer.
	Rejected []*TxStatusInfo    `protobuf:"bytes,4,rep,name=rejected,proto3" json:"rejected,omitempty"`                   // Rejected transactions.
	// contains filtered or unexported fields
}

A committer's representation of a block in the blockchain.

func (*Block) Descriptor deprecated

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

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetNumber

func (x *Block) GetNumber() uint64

func (*Block) GetRejected added in v0.1.5

func (x *Block) GetRejected() []*TxStatusInfo

func (*Block) GetTxs

func (x *Block) GetTxs() []*protoblocktx.Tx

func (*Block) GetTxsNum

func (x *Block) GetTxsNum() []uint32

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

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

func (*Block) Reset

func (x *Block) Reset()

func (*Block) String

func (x *Block) String() string

type CoordinatorClient

type CoordinatorClient interface {
	BlockProcessing(ctx context.Context, opts ...grpc.CallOption) (Coordinator_BlockProcessingClient, error)
	SetLastCommittedBlockNumber(ctx context.Context, in *protoblocktx.BlockInfo, opts ...grpc.CallOption) (*Empty, error)
	GetLastCommittedBlockNumber(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*protoblocktx.LastCommittedBlock, error)
	GetNextExpectedBlockNumber(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*protoblocktx.BlockInfo, error)
	GetTransactionsStatus(ctx context.Context, in *protoblocktx.QueryStatus, opts ...grpc.CallOption) (*protoblocktx.TransactionsStatus, error)
	GetConfigTransaction(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*protoblocktx.ConfigTransaction, error)
	NumberOfWaitingTransactionsForStatus(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*WaitingTransactions, error)
}

CoordinatorClient is the client API for Coordinator 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 CoordinatorServer

type CoordinatorServer interface {
	BlockProcessing(Coordinator_BlockProcessingServer) error
	SetLastCommittedBlockNumber(context.Context, *protoblocktx.BlockInfo) (*Empty, error)
	GetLastCommittedBlockNumber(context.Context, *Empty) (*protoblocktx.LastCommittedBlock, error)
	GetNextExpectedBlockNumber(context.Context, *Empty) (*protoblocktx.BlockInfo, error)
	GetTransactionsStatus(context.Context, *protoblocktx.QueryStatus) (*protoblocktx.TransactionsStatus, error)
	GetConfigTransaction(context.Context, *Empty) (*protoblocktx.ConfigTransaction, error)
	NumberOfWaitingTransactionsForStatus(context.Context, *Empty) (*WaitingTransactions, error)
	// contains filtered or unexported methods
}

CoordinatorServer is the server API for Coordinator service. All implementations must embed UnimplementedCoordinatorServer for forward compatibility

type Coordinator_BlockProcessingClient

type Coordinator_BlockProcessingClient interface {
	Send(*Block) error
	Recv() (*protoblocktx.TransactionsStatus, error)
	grpc.ClientStream
}

type Coordinator_BlockProcessingServer

type Coordinator_BlockProcessingServer interface {
	Send(*protoblocktx.TransactionsStatus) error
	Recv() (*Block, error)
	grpc.ServerStream
}

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type TxStatusInfo added in v0.1.5

type TxStatusInfo struct {
	TxNum  uint32              `protobuf:"varint,1,opt,name=tx_num,json=txNum,proto3" json:"tx_num,omitempty"`               // Transaction number within the block generated by the orderer.
	Id     string              `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`                                   // Transaction ID.
	Status protoblocktx.Status `protobuf:"varint,3,opt,name=status,proto3,enum=protoblocktx.Status" json:"status,omitempty"` // The reject reason.
	// contains filtered or unexported fields
}

func (*TxStatusInfo) Descriptor deprecated added in v0.1.5

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

Deprecated: Use TxStatusInfo.ProtoReflect.Descriptor instead.

func (*TxStatusInfo) GetId added in v0.1.5

func (x *TxStatusInfo) GetId() string

func (*TxStatusInfo) GetStatus added in v0.1.5

func (x *TxStatusInfo) GetStatus() protoblocktx.Status

func (*TxStatusInfo) GetTxNum added in v0.1.5

func (x *TxStatusInfo) GetTxNum() uint32

func (*TxStatusInfo) ProtoMessage added in v0.1.5

func (*TxStatusInfo) ProtoMessage()

func (*TxStatusInfo) ProtoReflect added in v0.1.5

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

func (*TxStatusInfo) Reset added in v0.1.5

func (x *TxStatusInfo) Reset()

func (*TxStatusInfo) String added in v0.1.5

func (x *TxStatusInfo) String() string

type UnimplementedCoordinatorServer

type UnimplementedCoordinatorServer struct {
}

UnimplementedCoordinatorServer must be embedded to have forward compatible implementations.

func (UnimplementedCoordinatorServer) BlockProcessing

func (UnimplementedCoordinatorServer) GetConfigTransaction

func (UnimplementedCoordinatorServer) GetLastCommittedBlockNumber

func (UnimplementedCoordinatorServer) GetNextExpectedBlockNumber

func (UnimplementedCoordinatorServer) GetTransactionsStatus

func (UnimplementedCoordinatorServer) NumberOfWaitingTransactionsForStatus

func (UnimplementedCoordinatorServer) NumberOfWaitingTransactionsForStatus(context.Context, *Empty) (*WaitingTransactions, error)

func (UnimplementedCoordinatorServer) SetLastCommittedBlockNumber

func (UnimplementedCoordinatorServer) SetLastCommittedBlockNumber(context.Context, *protoblocktx.BlockInfo) (*Empty, error)

type UnsafeCoordinatorServer

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

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

type WaitingTransactions

type WaitingTransactions struct {
	Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*WaitingTransactions) Descriptor deprecated

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

Deprecated: Use WaitingTransactions.ProtoReflect.Descriptor instead.

func (*WaitingTransactions) GetCount

func (x *WaitingTransactions) GetCount() int32

func (*WaitingTransactions) ProtoMessage

func (*WaitingTransactions) ProtoMessage()

func (*WaitingTransactions) ProtoReflect

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

func (*WaitingTransactions) Reset

func (x *WaitingTransactions) Reset()

func (*WaitingTransactions) String

func (x *WaitingTransactions) String() string

Jump to

Keyboard shortcuts

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