protocoordinatorservice

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: Apache-2.0 Imports: 10 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 Batch added in v0.1.6

type Batch struct {
	Txs      []*Tx           `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`           // List of transactions within the block.
	Rejected []*TxStatusInfo `protobuf:"bytes,2,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 (*Batch) Descriptor deprecated added in v0.1.6

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

Deprecated: Use Batch.ProtoReflect.Descriptor instead.

func (*Batch) GetRejected added in v0.1.6

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

func (*Batch) GetTxs added in v0.1.6

func (x *Batch) GetTxs() []*Tx

func (*Batch) ProtoMessage added in v0.1.6

func (*Batch) ProtoMessage()

func (*Batch) ProtoReflect added in v0.1.6

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

func (*Batch) Reset added in v0.1.6

func (x *Batch) Reset()

func (*Batch) String added in v0.1.6

func (x *Batch) 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) (*emptypb.Empty, error)
	GetLastCommittedBlockNumber(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*protoblocktx.LastCommittedBlock, error)
	GetNextExpectedBlockNumber(ctx context.Context, in *emptypb.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 *emptypb.Empty, opts ...grpc.CallOption) (*protoblocktx.ConfigTransaction, error)
	NumberOfWaitingTransactionsForStatus(ctx context.Context, in *emptypb.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) (*emptypb.Empty, error)
	GetLastCommittedBlockNumber(context.Context, *emptypb.Empty) (*protoblocktx.LastCommittedBlock, error)
	GetNextExpectedBlockNumber(context.Context, *emptypb.Empty) (*protoblocktx.BlockInfo, error)
	GetTransactionsStatus(context.Context, *protoblocktx.QueryStatus) (*protoblocktx.TransactionsStatus, error)
	GetConfigTransaction(context.Context, *emptypb.Empty) (*protoblocktx.ConfigTransaction, error)
	NumberOfWaitingTransactionsForStatus(context.Context, *emptypb.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(*Batch) error
	Recv() (*protoblocktx.TransactionsStatus, error)
	grpc.ClientStream
}

type Coordinator_BlockProcessingServer

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

type Tx added in v0.1.6

type Tx struct {
	Ref     *TxRef           `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"`         // The TX reference.
	Content *protoblocktx.Tx `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // The TX content.
	// contains filtered or unexported fields
}

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

func (*Tx) Descriptor deprecated added in v0.1.6

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

Deprecated: Use Tx.ProtoReflect.Descriptor instead.

func (*Tx) GetContent added in v0.1.6

func (x *Tx) GetContent() *protoblocktx.Tx

func (*Tx) GetRef added in v0.1.6

func (x *Tx) GetRef() *TxRef

func (*Tx) ProtoMessage added in v0.1.6

func (*Tx) ProtoMessage()

func (*Tx) ProtoReflect added in v0.1.6

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

func (*Tx) Reset added in v0.1.6

func (x *Tx) Reset()

func (*Tx) String added in v0.1.6

func (x *Tx) String() string

type TxRef added in v0.1.6

type TxRef struct {
	BlockNum uint64 `protobuf:"varint,1,opt,name=block_num,json=blockNum,proto3" json:"block_num,omitempty"` // The block number.
	TxNum    uint32 `protobuf:"varint,2,opt,name=tx_num,json=txNum,proto3" json:"tx_num,omitempty"`          // Transaction number within the block
	TxId     string `protobuf:"bytes,3,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"`              // Transaction ID within the block.
	// contains filtered or unexported fields
}

The TX reference with respect to the block generated by the orderer.

func (*TxRef) Descriptor deprecated added in v0.1.6

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

Deprecated: Use TxRef.ProtoReflect.Descriptor instead.

func (*TxRef) GetBlockNum added in v0.1.6

func (x *TxRef) GetBlockNum() uint64

func (*TxRef) GetTxId added in v0.1.6

func (x *TxRef) GetTxId() string

func (*TxRef) GetTxNum added in v0.1.6

func (x *TxRef) GetTxNum() uint32

func (*TxRef) ProtoMessage added in v0.1.6

func (*TxRef) ProtoMessage()

func (*TxRef) ProtoReflect added in v0.1.6

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

func (*TxRef) Reset added in v0.1.6

func (x *TxRef) Reset()

func (*TxRef) String added in v0.1.6

func (x *TxRef) String() string

type TxStatusInfo added in v0.1.5

type TxStatusInfo struct {
	Ref    *TxRef              `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"`                                 // The TX reference.
	Status protoblocktx.Status `protobuf:"varint,2,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) GetRef added in v0.1.6

func (x *TxStatusInfo) GetRef() *TxRef

func (*TxStatusInfo) GetStatus added in v0.1.5

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

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, *emptypb.Empty) (*WaitingTransactions, error)

func (UnimplementedCoordinatorServer) SetLastCommittedBlockNumber

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