Documentation
¶
Overview ¶
Package servicepb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func BlockNumFromCheckpointKey(key []byte) (uint64, error)
- func CheckpointKey(blockNum uint64) []byte
- func RegisterCoordinatorServer(s grpc.ServiceRegistrar, srv CoordinatorServer)
- func RegisterLoadGenServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterLoadGenServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LoadGenServiceClient) error
- func RegisterLoadGenServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterLoadGenServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LoadGenServiceServer) error
- func RegisterLoadGenServiceServer(s grpc.ServiceRegistrar, srv LoadGenServiceServer)
- func RegisterValidationAndCommitServiceServer(s grpc.ServiceRegistrar, srv ValidationAndCommitServiceServer)
- func RegisterVerifierServer(s grpc.ServiceRegistrar, srv VerifierServer)
- type BlockRef
- type CheckpointFeedback
- func (*CheckpointFeedback) Descriptor() ([]byte, []int)deprecated
- func (x *CheckpointFeedback) GetReason() string
- func (x *CheckpointFeedback) GetRef() *committerpb.TxRef
- func (x *CheckpointFeedback) GetSignal() CheckpointFeedback_Signal
- func (x *CheckpointFeedback) GetSnapshotBlockNumber() uint64
- func (*CheckpointFeedback) ProtoMessage()
- func (x *CheckpointFeedback) ProtoReflect() protoreflect.Message
- func (x *CheckpointFeedback) Reset()
- func (x *CheckpointFeedback) String() string
- type CheckpointFeedback_Signal
- func (CheckpointFeedback_Signal) Descriptor() protoreflect.EnumDescriptor
- func (x CheckpointFeedback_Signal) Enum() *CheckpointFeedback_Signal
- func (CheckpointFeedback_Signal) EnumDescriptor() ([]byte, []int)deprecated
- func (x CheckpointFeedback_Signal) Number() protoreflect.EnumNumber
- func (x CheckpointFeedback_Signal) String() string
- func (CheckpointFeedback_Signal) Type() protoreflect.EnumType
- type CoordinatorBatch
- func (*CoordinatorBatch) Descriptor() ([]byte, []int)deprecated
- func (x *CoordinatorBatch) GetRejected() []*committerpb.TxStatus
- func (x *CoordinatorBatch) GetTxs() []*TxWithRef
- func (*CoordinatorBatch) ProtoMessage()
- func (x *CoordinatorBatch) ProtoReflect() protoreflect.Message
- func (x *CoordinatorBatch) Reset()
- func (x *CoordinatorBatch) String() string
- type CoordinatorClient
- type CoordinatorServer
- type Coordinator_BlockProcessingClient
- type Coordinator_BlockProcessingServer
- type Height
- type LoadGenBatch
- type LoadGenServiceClient
- type LoadGenServiceServer
- type LoadGenTx
- func (*LoadGenTx) Descriptor() ([]byte, []int)deprecated
- func (x *LoadGenTx) GetEnvelopePayload() []byte
- func (x *LoadGenTx) GetEnvelopeSignature() []byte
- func (x *LoadGenTx) GetId() string
- func (x *LoadGenTx) GetSerializedEnvelope() []byte
- func (x *LoadGenTx) GetTx() *applicationpb.Tx
- func (*LoadGenTx) ProtoMessage()
- func (x *LoadGenTx) ProtoReflect() protoreflect.Message
- func (x *LoadGenTx) Reset()
- func (x *LoadGenTx) String() string
- type RateLimit
- type TxStatusBatch
- func (*TxStatusBatch) Descriptor() ([]byte, []int)deprecated
- func (x *TxStatusBatch) GetCheckpointFeedback() *CheckpointFeedback
- func (x *TxStatusBatch) GetStatus() []*committerpb.TxStatus
- func (*TxStatusBatch) ProtoMessage()
- func (x *TxStatusBatch) ProtoReflect() protoreflect.Message
- func (x *TxStatusBatch) Reset()
- func (x *TxStatusBatch) String() string
- type TxWithRef
- func (*TxWithRef) Descriptor() ([]byte, []int)deprecated
- func (x *TxWithRef) GetContent() *applicationpb.Tx
- func (x *TxWithRef) GetRef() *committerpb.TxRef
- func (*TxWithRef) ProtoMessage()
- func (x *TxWithRef) ProtoReflect() protoreflect.Message
- func (x *TxWithRef) Reset()
- func (x *TxWithRef) String() string
- type UnimplementedCoordinatorServer
- func (UnimplementedCoordinatorServer) BlockProcessing(grpc.BidiStreamingServer[CoordinatorBatch, TxStatusBatch]) error
- func (UnimplementedCoordinatorServer) GetNextBlockNumberToCommit(context.Context, *emptypb.Empty) (*BlockRef, error)
- func (UnimplementedCoordinatorServer) GetTransactionsStatus(context.Context, *committerpb.TxIDsBatch) (*TxStatusBatch, error)
- func (UnimplementedCoordinatorServer) NoPendingTransactionProcessing(context.Context, *emptypb.Empty) (*wrapperspb.BoolValue, error)
- func (UnimplementedCoordinatorServer) SetLastCommittedBlockNumber(context.Context, *BlockRef) (*emptypb.Empty, error)
- type UnimplementedLoadGenServiceServer
- func (UnimplementedLoadGenServiceServer) AppendBatch(context.Context, *LoadGenBatch) (*emptypb.Empty, error)
- func (UnimplementedLoadGenServiceServer) GetRateLimit(context.Context, *emptypb.Empty) (*RateLimit, error)
- func (UnimplementedLoadGenServiceServer) SetRateLimit(context.Context, *RateLimit) (*emptypb.Empty, error)
- type UnimplementedValidationAndCommitServiceServer
- func (UnimplementedValidationAndCommitServiceServer) GetConfigTransaction(context.Context, *emptypb.Empty) (*applicationpb.ConfigTransaction, error)
- func (UnimplementedValidationAndCommitServiceServer) GetNamespacePolicies(context.Context, *emptypb.Empty) (*applicationpb.NamespacePolicies, error)
- func (UnimplementedValidationAndCommitServiceServer) GetNextBlockNumberToCommit(context.Context, *emptypb.Empty) (*BlockRef, error)
- func (UnimplementedValidationAndCommitServiceServer) GetTransactionsStatus(context.Context, *committerpb.TxIDsBatch) (*TxStatusBatch, error)
- func (UnimplementedValidationAndCommitServiceServer) SetLastCommittedBlockNumber(context.Context, *BlockRef) (*emptypb.Empty, error)
- func (UnimplementedValidationAndCommitServiceServer) StartValidateAndCommitStream(grpc.BidiStreamingServer[VcBatch, TxStatusBatch]) error
- type UnimplementedVerifierServer
- type UnsafeCoordinatorServer
- type UnsafeLoadGenServiceServer
- type UnsafeValidationAndCommitServiceServer
- type UnsafeVerifierServer
- type ValidationAndCommitServiceClient
- type ValidationAndCommitServiceServer
- type ValidationAndCommitService_StartValidateAndCommitStreamClient
- type ValidationAndCommitService_StartValidateAndCommitStreamServer
- type VcBatch
- type VcTx
- func (*VcTx) Descriptor() ([]byte, []int)deprecated
- func (x *VcTx) GetNamespaces() []*applicationpb.TxNamespace
- func (x *VcTx) GetPrelimInvalidTxStatus() committerpb.Status
- func (x *VcTx) GetRef() *committerpb.TxRef
- func (*VcTx) ProtoMessage()
- func (x *VcTx) ProtoReflect() protoreflect.Message
- func (x *VcTx) Reset()
- func (x *VcTx) String() string
- type VerifierBatch
- func (*VerifierBatch) Descriptor() ([]byte, []int)deprecated
- func (x *VerifierBatch) GetRequests() []*TxWithRef
- func (x *VerifierBatch) GetUpdate() *VerifierUpdates
- func (*VerifierBatch) ProtoMessage()
- func (x *VerifierBatch) ProtoReflect() protoreflect.Message
- func (x *VerifierBatch) Reset()
- func (x *VerifierBatch) String() string
- type VerifierClient
- type VerifierServer
- type VerifierUpdates
- func (*VerifierUpdates) Descriptor() ([]byte, []int)deprecated
- func (x *VerifierUpdates) GetConfig() *applicationpb.ConfigTransaction
- func (x *VerifierUpdates) GetNamespacePolicies() *applicationpb.NamespacePolicies
- func (*VerifierUpdates) ProtoMessage()
- func (x *VerifierUpdates) ProtoReflect() protoreflect.Message
- func (x *VerifierUpdates) Reset()
- func (x *VerifierUpdates) String() string
- type Verifier_StartStreamClient
- type Verifier_StartStreamServer
Constants ¶
const ( Coordinator_BlockProcessing_FullMethodName = "/servicepb.Coordinator/BlockProcessing" Coordinator_SetLastCommittedBlockNumber_FullMethodName = "/servicepb.Coordinator/SetLastCommittedBlockNumber" Coordinator_GetNextBlockNumberToCommit_FullMethodName = "/servicepb.Coordinator/GetNextBlockNumberToCommit" Coordinator_GetTransactionsStatus_FullMethodName = "/servicepb.Coordinator/GetTransactionsStatus" Coordinator_NoPendingTransactionProcessing_FullMethodName = "/servicepb.Coordinator/NoPendingTransactionProcessing" )
const ( LoadGenService_AppendBatch_FullMethodName = "/servicepb.LoadGenService/AppendBatch" LoadGenService_GetRateLimit_FullMethodName = "/servicepb.LoadGenService/GetRateLimit" LoadGenService_SetRateLimit_FullMethodName = "/servicepb.LoadGenService/SetRateLimit" )
const ( ValidationAndCommitService_StartValidateAndCommitStream_FullMethodName = "/servicepb.ValidationAndCommitService/StartValidateAndCommitStream" ValidationAndCommitService_SetLastCommittedBlockNumber_FullMethodName = "/servicepb.ValidationAndCommitService/SetLastCommittedBlockNumber" ValidationAndCommitService_GetNextBlockNumberToCommit_FullMethodName = "/servicepb.ValidationAndCommitService/GetNextBlockNumberToCommit" ValidationAndCommitService_GetTransactionsStatus_FullMethodName = "/servicepb.ValidationAndCommitService/GetTransactionsStatus" ValidationAndCommitService_GetNamespacePolicies_FullMethodName = "/servicepb.ValidationAndCommitService/GetNamespacePolicies" ValidationAndCommitService_GetConfigTransaction_FullMethodName = "/servicepb.ValidationAndCommitService/GetConfigTransaction" )
const (
Verifier_StartStream_FullMethodName = "/servicepb.Verifier/StartStream"
)
Variables ¶
var ( CheckpointFeedback_Signal_name = map[int32]string{ 0: "SIGNAL_UNSPECIFIED", 1: "HOLD", 2: "HALT", } CheckpointFeedback_Signal_value = map[string]int32{ "SIGNAL_UNSPECIFIED": 0, "HOLD": 1, "HALT": 2, } )
Enum value maps for CheckpointFeedback_Signal.
var Coordinator_ServiceDesc = grpc.ServiceDesc{ ServiceName: "servicepb.Coordinator", HandlerType: (*CoordinatorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SetLastCommittedBlockNumber", Handler: _Coordinator_SetLastCommittedBlockNumber_Handler, }, { MethodName: "GetNextBlockNumberToCommit", Handler: _Coordinator_GetNextBlockNumberToCommit_Handler, }, { MethodName: "GetTransactionsStatus", Handler: _Coordinator_GetTransactionsStatus_Handler, }, { MethodName: "NoPendingTransactionProcessing", Handler: _Coordinator_NoPendingTransactionProcessing_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "BlockProcessing", Handler: _Coordinator_BlockProcessing_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "api/servicepb/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)
var File_api_servicepb_common_proto protoreflect.FileDescriptor
var File_api_servicepb_coordinator_proto protoreflect.FileDescriptor
var File_api_servicepb_loadgen_proto protoreflect.FileDescriptor
var File_api_servicepb_vcservice_proto protoreflect.FileDescriptor
var File_api_servicepb_verifier_proto protoreflect.FileDescriptor
var LoadGenService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "servicepb.LoadGenService", HandlerType: (*LoadGenServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AppendBatch", Handler: _LoadGenService_AppendBatch_Handler, }, { MethodName: "GetRateLimit", Handler: _LoadGenService_GetRateLimit_Handler, }, { MethodName: "SetRateLimit", Handler: _LoadGenService_SetRateLimit_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/servicepb/loadgen.proto", }
LoadGenService_ServiceDesc is the grpc.ServiceDesc for LoadGenService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var ValidationAndCommitService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "servicepb.ValidationAndCommitService", HandlerType: (*ValidationAndCommitServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SetLastCommittedBlockNumber", Handler: _ValidationAndCommitService_SetLastCommittedBlockNumber_Handler, }, { MethodName: "GetNextBlockNumberToCommit", Handler: _ValidationAndCommitService_GetNextBlockNumberToCommit_Handler, }, { MethodName: "GetTransactionsStatus", Handler: _ValidationAndCommitService_GetTransactionsStatus_Handler, }, { MethodName: "GetNamespacePolicies", Handler: _ValidationAndCommitService_GetNamespacePolicies_Handler, }, { MethodName: "GetConfigTransaction", Handler: _ValidationAndCommitService_GetConfigTransaction_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StartValidateAndCommitStream", Handler: _ValidationAndCommitService_StartValidateAndCommitStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "api/servicepb/vcservice.proto", }
ValidationAndCommitService_ServiceDesc is the grpc.ServiceDesc for ValidationAndCommitService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Verifier_ServiceDesc = grpc.ServiceDesc{ ServiceName: "servicepb.Verifier", HandlerType: (*VerifierServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "StartStream", Handler: _Verifier_StartStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "api/servicepb/verifier.proto", }
Verifier_ServiceDesc is the grpc.ServiceDesc for Verifier service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func BlockNumFromCheckpointKey ¶ added in v1.0.6
BlockNumFromCheckpointKey returns the snapshot block number from a checkpoint key. It rejects extra bytes because the key must contain only a block number.
func CheckpointKey ¶ added in v1.0.6
CheckpointKey returns the `_checkpoint` key for a snapshot at blockNum. A block has at most one snapshot, so the key needs no transaction number. The encoded keys sort in block-number order.
func RegisterCoordinatorServer ¶
func RegisterCoordinatorServer(s grpc.ServiceRegistrar, srv CoordinatorServer)
func RegisterLoadGenServiceHandler ¶
func RegisterLoadGenServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterLoadGenServiceHandler registers the http handlers for service LoadGenService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterLoadGenServiceHandlerClient ¶
func RegisterLoadGenServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LoadGenServiceClient) error
RegisterLoadGenServiceHandlerClient registers the http handlers for service LoadGenService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LoadGenServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LoadGenServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "LoadGenServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterLoadGenServiceHandlerFromEndpoint ¶
func RegisterLoadGenServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterLoadGenServiceHandlerFromEndpoint is same as RegisterLoadGenServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterLoadGenServiceHandlerServer ¶
func RegisterLoadGenServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LoadGenServiceServer) error
RegisterLoadGenServiceHandlerServer registers the http handlers for service LoadGenService to "mux". UnaryRPC :call LoadGenServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterLoadGenServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterLoadGenServiceServer ¶
func RegisterLoadGenServiceServer(s grpc.ServiceRegistrar, srv LoadGenServiceServer)
func RegisterValidationAndCommitServiceServer ¶
func RegisterValidationAndCommitServiceServer(s grpc.ServiceRegistrar, srv ValidationAndCommitServiceServer)
func RegisterVerifierServer ¶
func RegisterVerifierServer(s grpc.ServiceRegistrar, srv VerifierServer)
Types ¶
type BlockRef ¶
type BlockRef struct {
Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
// contains filtered or unexported fields
}
A block reference with respect to the block generated by the orderer.
func (*BlockRef) Descriptor
deprecated
func (*BlockRef) ProtoMessage ¶
func (*BlockRef) ProtoMessage()
func (*BlockRef) ProtoReflect ¶
func (x *BlockRef) ProtoReflect() protoreflect.Message
type CheckpointFeedback ¶ added in v1.0.5
type CheckpointFeedback struct {
// Checkpoint feedback signal.
Signal CheckpointFeedback_Signal `protobuf:"varint,1,opt,name=signal,proto3,enum=servicepb.CheckpointFeedback_Signal" json:"signal,omitempty"`
// The snapshot's block number, used in logs.
// The checkpoint transaction's block number is in ref.
SnapshotBlockNumber uint64 `protobuf:"varint,3,opt,name=snapshot_block_number,json=snapshotBlockNumber,proto3" json:"snapshot_block_number,omitempty"`
// The reason for HALT, including the local and checkpoint hashes.
// Required for HALT. Log it; do not use it as a metric label.
Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"`
// Identifies the checkpoint transaction. The coordinator uses this reference to release
// its dependency-graph node because HOLD and HALT have no transaction status.
// Without that release, a retry would wait forever on the old node.
Ref *committerpb.TxRef `protobuf:"bytes,5,opt,name=ref,proto3" json:"ref,omitempty"`
// contains filtered or unexported fields
}
CheckpointFeedback tells the sidecar to wait for a snapshot hash or stop on a mismatch.
func (*CheckpointFeedback) Descriptor
deprecated
added in
v1.0.5
func (*CheckpointFeedback) Descriptor() ([]byte, []int)
Deprecated: Use CheckpointFeedback.ProtoReflect.Descriptor instead.
func (*CheckpointFeedback) GetReason ¶ added in v1.0.5
func (x *CheckpointFeedback) GetReason() string
func (*CheckpointFeedback) GetRef ¶ added in v1.0.6
func (x *CheckpointFeedback) GetRef() *committerpb.TxRef
func (*CheckpointFeedback) GetSignal ¶ added in v1.0.5
func (x *CheckpointFeedback) GetSignal() CheckpointFeedback_Signal
func (*CheckpointFeedback) GetSnapshotBlockNumber ¶ added in v1.0.6
func (x *CheckpointFeedback) GetSnapshotBlockNumber() uint64
func (*CheckpointFeedback) ProtoMessage ¶ added in v1.0.5
func (*CheckpointFeedback) ProtoMessage()
func (*CheckpointFeedback) ProtoReflect ¶ added in v1.0.5
func (x *CheckpointFeedback) ProtoReflect() protoreflect.Message
func (*CheckpointFeedback) Reset ¶ added in v1.0.5
func (x *CheckpointFeedback) Reset()
func (*CheckpointFeedback) String ¶ added in v1.0.5
func (x *CheckpointFeedback) String() string
type CheckpointFeedback_Signal ¶ added in v1.0.5
type CheckpointFeedback_Signal int32
Signal tells the sidecar whether to wait or stop.
const ( // Take no checkpoint action. Use the transaction statuses. CheckpointFeedback_SIGNAL_UNSPECIFIED CheckpointFeedback_Signal = 0 // The local snapshot hash is not ready. The checkpoint has no transaction status. // The sidecar waits, then submits the same checkpoint again. CheckpointFeedback_HOLD CheckpointFeedback_Signal = 1 // The local and checkpoint hashes differ. The sidecar stops without retrying. // An operator must investigate. CheckpointFeedback_HALT CheckpointFeedback_Signal = 2 )
func (CheckpointFeedback_Signal) Descriptor ¶ added in v1.0.5
func (CheckpointFeedback_Signal) Descriptor() protoreflect.EnumDescriptor
func (CheckpointFeedback_Signal) Enum ¶ added in v1.0.5
func (x CheckpointFeedback_Signal) Enum() *CheckpointFeedback_Signal
func (CheckpointFeedback_Signal) EnumDescriptor
deprecated
added in
v1.0.5
func (CheckpointFeedback_Signal) EnumDescriptor() ([]byte, []int)
Deprecated: Use CheckpointFeedback_Signal.Descriptor instead.
func (CheckpointFeedback_Signal) Number ¶ added in v1.0.5
func (x CheckpointFeedback_Signal) Number() protoreflect.EnumNumber
func (CheckpointFeedback_Signal) String ¶ added in v1.0.5
func (x CheckpointFeedback_Signal) String() string
func (CheckpointFeedback_Signal) Type ¶ added in v1.0.5
func (CheckpointFeedback_Signal) Type() protoreflect.EnumType
type CoordinatorBatch ¶
type CoordinatorBatch struct {
Txs []*TxWithRef `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` // List of transactions within the block.
Rejected []*committerpb.TxStatus `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 (*CoordinatorBatch) Descriptor
deprecated
func (*CoordinatorBatch) Descriptor() ([]byte, []int)
Deprecated: Use CoordinatorBatch.ProtoReflect.Descriptor instead.
func (*CoordinatorBatch) GetRejected ¶
func (x *CoordinatorBatch) GetRejected() []*committerpb.TxStatus
func (*CoordinatorBatch) GetTxs ¶
func (x *CoordinatorBatch) GetTxs() []*TxWithRef
func (*CoordinatorBatch) ProtoMessage ¶
func (*CoordinatorBatch) ProtoMessage()
func (*CoordinatorBatch) ProtoReflect ¶
func (x *CoordinatorBatch) ProtoReflect() protoreflect.Message
func (*CoordinatorBatch) Reset ¶
func (x *CoordinatorBatch) Reset()
func (*CoordinatorBatch) String ¶
func (x *CoordinatorBatch) String() string
type CoordinatorClient ¶
type CoordinatorClient interface {
BlockProcessing(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[CoordinatorBatch, TxStatusBatch], error)
SetLastCommittedBlockNumber(ctx context.Context, in *BlockRef, opts ...grpc.CallOption) (*emptypb.Empty, error)
GetNextBlockNumberToCommit(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BlockRef, error)
GetTransactionsStatus(ctx context.Context, in *committerpb.TxIDsBatch, opts ...grpc.CallOption) (*TxStatusBatch, error)
NoPendingTransactionProcessing(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, 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.
func NewCoordinatorClient ¶
func NewCoordinatorClient(cc grpc.ClientConnInterface) CoordinatorClient
type CoordinatorServer ¶
type CoordinatorServer interface {
BlockProcessing(grpc.BidiStreamingServer[CoordinatorBatch, TxStatusBatch]) error
SetLastCommittedBlockNumber(context.Context, *BlockRef) (*emptypb.Empty, error)
GetNextBlockNumberToCommit(context.Context, *emptypb.Empty) (*BlockRef, error)
GetTransactionsStatus(context.Context, *committerpb.TxIDsBatch) (*TxStatusBatch, error)
NoPendingTransactionProcessing(context.Context, *emptypb.Empty) (*wrapperspb.BoolValue, 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 = grpc.BidiStreamingClient[CoordinatorBatch, TxStatusBatch]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Coordinator_BlockProcessingServer ¶
type Coordinator_BlockProcessingServer = grpc.BidiStreamingServer[CoordinatorBatch, TxStatusBatch]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Height ¶
Height represents the height of a transaction in blockchain.
func NewHeightFromBytes ¶
NewHeightFromBytes constructs a new instance of Height from serialized bytes.
func NewHeightFromTxRef ¶
func NewHeightFromTxRef(ref *committerpb.TxRef) *Height
NewHeightFromTxRef constructs a new instance of Height.
func (*Height) WithStatus ¶
func (h *Height) WithStatus(txID string, status committerpb.Status) *committerpb.TxStatus
WithStatus creates committerpb.TxStatus with this height and the given status.
type LoadGenBatch ¶
type LoadGenBatch struct {
Tx []*LoadGenTx `protobuf:"bytes,1,rep,name=tx,proto3" json:"tx,omitempty"`
// contains filtered or unexported fields
}
func (*LoadGenBatch) Descriptor
deprecated
func (*LoadGenBatch) Descriptor() ([]byte, []int)
Deprecated: Use LoadGenBatch.ProtoReflect.Descriptor instead.
func (*LoadGenBatch) GetTx ¶
func (x *LoadGenBatch) GetTx() []*LoadGenTx
func (*LoadGenBatch) ProtoMessage ¶
func (*LoadGenBatch) ProtoMessage()
func (*LoadGenBatch) ProtoReflect ¶
func (x *LoadGenBatch) ProtoReflect() protoreflect.Message
func (*LoadGenBatch) Reset ¶
func (x *LoadGenBatch) Reset()
func (*LoadGenBatch) String ¶
func (x *LoadGenBatch) String() string
type LoadGenServiceClient ¶
type LoadGenServiceClient interface {
AppendBatch(ctx context.Context, in *LoadGenBatch, opts ...grpc.CallOption) (*emptypb.Empty, error)
GetRateLimit(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*RateLimit, error)
SetRateLimit(ctx context.Context, in *RateLimit, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
LoadGenServiceClient is the client API for LoadGenService 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.
func NewLoadGenServiceClient ¶
func NewLoadGenServiceClient(cc grpc.ClientConnInterface) LoadGenServiceClient
type LoadGenServiceServer ¶
type LoadGenServiceServer interface {
AppendBatch(context.Context, *LoadGenBatch) (*emptypb.Empty, error)
GetRateLimit(context.Context, *emptypb.Empty) (*RateLimit, error)
SetRateLimit(context.Context, *RateLimit) (*emptypb.Empty, error)
// contains filtered or unexported methods
}
LoadGenServiceServer is the server API for LoadGenService service. All implementations must embed UnimplementedLoadGenServiceServer for forward compatibility.
type LoadGenTx ¶
type LoadGenTx struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Tx *applicationpb.Tx `protobuf:"bytes,2,opt,name=tx,proto3" json:"tx,omitempty"`
EnvelopePayload []byte `protobuf:"bytes,3,opt,name=envelope_payload,json=envelopePayload,proto3" json:"envelope_payload,omitempty"`
EnvelopeSignature []byte `protobuf:"bytes,4,opt,name=envelope_signature,json=envelopeSignature,proto3" json:"envelope_signature,omitempty"`
SerializedEnvelope []byte `protobuf:"bytes,5,opt,name=serialized_envelope,json=serializedEnvelope,proto3" json:"serialized_envelope,omitempty"`
// contains filtered or unexported fields
}
func (*LoadGenTx) Descriptor
deprecated
func (*LoadGenTx) GetEnvelopePayload ¶
func (*LoadGenTx) GetEnvelopeSignature ¶
func (*LoadGenTx) GetSerializedEnvelope ¶
func (*LoadGenTx) GetTx ¶
func (x *LoadGenTx) GetTx() *applicationpb.Tx
func (*LoadGenTx) ProtoMessage ¶
func (*LoadGenTx) ProtoMessage()
func (*LoadGenTx) ProtoReflect ¶
func (x *LoadGenTx) ProtoReflect() protoreflect.Message
type RateLimit ¶
type RateLimit struct {
Rate uint64 `protobuf:"varint,1,opt,name=rate,proto3" json:"rate,omitempty"`
// contains filtered or unexported fields
}
func (*RateLimit) Descriptor
deprecated
func (*RateLimit) ProtoMessage ¶
func (*RateLimit) ProtoMessage()
func (*RateLimit) ProtoReflect ¶
func (x *RateLimit) ProtoReflect() protoreflect.Message
type TxStatusBatch ¶ added in v1.0.5
type TxStatusBatch struct {
Status []*committerpb.TxStatus `protobuf:"bytes,1,rep,name=status,proto3" json:"status,omitempty"`
// The coordinator forwards this feedback from the VC to the sidecar unchanged.
// If absent, use the transaction statuses.
CheckpointFeedback *CheckpointFeedback `protobuf:"bytes,2,opt,name=checkpoint_feedback,json=checkpointFeedback,proto3,oneof" json:"checkpoint_feedback,omitempty"`
// contains filtered or unexported fields
}
A batch of TXs' status and optional checkpoint feedback.
func (*TxStatusBatch) Descriptor
deprecated
added in
v1.0.5
func (*TxStatusBatch) Descriptor() ([]byte, []int)
Deprecated: Use TxStatusBatch.ProtoReflect.Descriptor instead.
func (*TxStatusBatch) GetCheckpointFeedback ¶ added in v1.0.5
func (x *TxStatusBatch) GetCheckpointFeedback() *CheckpointFeedback
func (*TxStatusBatch) GetStatus ¶ added in v1.0.5
func (x *TxStatusBatch) GetStatus() []*committerpb.TxStatus
func (*TxStatusBatch) ProtoMessage ¶ added in v1.0.5
func (*TxStatusBatch) ProtoMessage()
func (*TxStatusBatch) ProtoReflect ¶ added in v1.0.5
func (x *TxStatusBatch) ProtoReflect() protoreflect.Message
func (*TxStatusBatch) Reset ¶ added in v1.0.5
func (x *TxStatusBatch) Reset()
func (*TxStatusBatch) String ¶ added in v1.0.5
func (x *TxStatusBatch) String() string
type TxWithRef ¶
type TxWithRef struct {
Ref *committerpb.TxRef `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` // The TX reference.
Content *applicationpb.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 (*TxWithRef) Descriptor
deprecated
func (*TxWithRef) GetContent ¶
func (x *TxWithRef) GetContent() *applicationpb.Tx
func (*TxWithRef) GetRef ¶
func (x *TxWithRef) GetRef() *committerpb.TxRef
func (*TxWithRef) ProtoMessage ¶
func (*TxWithRef) ProtoMessage()
func (*TxWithRef) ProtoReflect ¶
func (x *TxWithRef) ProtoReflect() protoreflect.Message
type UnimplementedCoordinatorServer ¶
type UnimplementedCoordinatorServer struct{}
UnimplementedCoordinatorServer 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.
func (UnimplementedCoordinatorServer) BlockProcessing ¶
func (UnimplementedCoordinatorServer) BlockProcessing(grpc.BidiStreamingServer[CoordinatorBatch, TxStatusBatch]) error
func (UnimplementedCoordinatorServer) GetNextBlockNumberToCommit ¶
func (UnimplementedCoordinatorServer) GetTransactionsStatus ¶
func (UnimplementedCoordinatorServer) GetTransactionsStatus(context.Context, *committerpb.TxIDsBatch) (*TxStatusBatch, error)
func (UnimplementedCoordinatorServer) NoPendingTransactionProcessing ¶ added in v1.0.2
func (UnimplementedCoordinatorServer) NoPendingTransactionProcessing(context.Context, *emptypb.Empty) (*wrapperspb.BoolValue, error)
func (UnimplementedCoordinatorServer) SetLastCommittedBlockNumber ¶
type UnimplementedLoadGenServiceServer ¶
type UnimplementedLoadGenServiceServer struct{}
UnimplementedLoadGenServiceServer 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.
func (UnimplementedLoadGenServiceServer) AppendBatch ¶
func (UnimplementedLoadGenServiceServer) AppendBatch(context.Context, *LoadGenBatch) (*emptypb.Empty, error)
func (UnimplementedLoadGenServiceServer) GetRateLimit ¶
func (UnimplementedLoadGenServiceServer) SetRateLimit ¶
type UnimplementedValidationAndCommitServiceServer ¶
type UnimplementedValidationAndCommitServiceServer struct{}
UnimplementedValidationAndCommitServiceServer 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.
func (UnimplementedValidationAndCommitServiceServer) GetConfigTransaction ¶
func (UnimplementedValidationAndCommitServiceServer) GetConfigTransaction(context.Context, *emptypb.Empty) (*applicationpb.ConfigTransaction, error)
func (UnimplementedValidationAndCommitServiceServer) GetNamespacePolicies ¶
func (UnimplementedValidationAndCommitServiceServer) GetNamespacePolicies(context.Context, *emptypb.Empty) (*applicationpb.NamespacePolicies, error)
func (UnimplementedValidationAndCommitServiceServer) GetNextBlockNumberToCommit ¶
func (UnimplementedValidationAndCommitServiceServer) GetTransactionsStatus ¶
func (UnimplementedValidationAndCommitServiceServer) GetTransactionsStatus(context.Context, *committerpb.TxIDsBatch) (*TxStatusBatch, error)
func (UnimplementedValidationAndCommitServiceServer) SetLastCommittedBlockNumber ¶
func (UnimplementedValidationAndCommitServiceServer) StartValidateAndCommitStream ¶
func (UnimplementedValidationAndCommitServiceServer) StartValidateAndCommitStream(grpc.BidiStreamingServer[VcBatch, TxStatusBatch]) error
type UnimplementedVerifierServer ¶
type UnimplementedVerifierServer struct{}
UnimplementedVerifierServer 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.
func (UnimplementedVerifierServer) StartStream ¶
func (UnimplementedVerifierServer) StartStream(grpc.BidiStreamingServer[VerifierBatch, TxStatusBatch]) 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 UnsafeLoadGenServiceServer ¶
type UnsafeLoadGenServiceServer interface {
// contains filtered or unexported methods
}
UnsafeLoadGenServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LoadGenServiceServer will result in compilation errors.
type UnsafeValidationAndCommitServiceServer ¶
type UnsafeValidationAndCommitServiceServer interface {
// contains filtered or unexported methods
}
UnsafeValidationAndCommitServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ValidationAndCommitServiceServer will result in compilation errors.
type UnsafeVerifierServer ¶
type UnsafeVerifierServer interface {
// contains filtered or unexported methods
}
UnsafeVerifierServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VerifierServer will result in compilation errors.
type ValidationAndCommitServiceClient ¶
type ValidationAndCommitServiceClient interface {
StartValidateAndCommitStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[VcBatch, TxStatusBatch], error)
SetLastCommittedBlockNumber(ctx context.Context, in *BlockRef, opts ...grpc.CallOption) (*emptypb.Empty, error)
GetNextBlockNumberToCommit(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BlockRef, error)
GetTransactionsStatus(ctx context.Context, in *committerpb.TxIDsBatch, opts ...grpc.CallOption) (*TxStatusBatch, error)
GetNamespacePolicies(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*applicationpb.NamespacePolicies, error)
GetConfigTransaction(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*applicationpb.ConfigTransaction, error)
}
ValidationAndCommitServiceClient is the client API for ValidationAndCommitService 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.
func NewValidationAndCommitServiceClient ¶
func NewValidationAndCommitServiceClient(cc grpc.ClientConnInterface) ValidationAndCommitServiceClient
type ValidationAndCommitServiceServer ¶
type ValidationAndCommitServiceServer interface {
StartValidateAndCommitStream(grpc.BidiStreamingServer[VcBatch, TxStatusBatch]) error
SetLastCommittedBlockNumber(context.Context, *BlockRef) (*emptypb.Empty, error)
GetNextBlockNumberToCommit(context.Context, *emptypb.Empty) (*BlockRef, error)
GetTransactionsStatus(context.Context, *committerpb.TxIDsBatch) (*TxStatusBatch, error)
GetNamespacePolicies(context.Context, *emptypb.Empty) (*applicationpb.NamespacePolicies, error)
GetConfigTransaction(context.Context, *emptypb.Empty) (*applicationpb.ConfigTransaction, error)
// contains filtered or unexported methods
}
ValidationAndCommitServiceServer is the server API for ValidationAndCommitService service. All implementations must embed UnimplementedValidationAndCommitServiceServer for forward compatibility.
type ValidationAndCommitService_StartValidateAndCommitStreamClient ¶
type ValidationAndCommitService_StartValidateAndCommitStreamClient = grpc.BidiStreamingClient[VcBatch, TxStatusBatch]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ValidationAndCommitService_StartValidateAndCommitStreamServer ¶
type ValidationAndCommitService_StartValidateAndCommitStreamServer = grpc.BidiStreamingServer[VcBatch, TxStatusBatch]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type VcBatch ¶
type VcBatch struct {
Transactions []*VcTx `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"`
// contains filtered or unexported fields
}
func (*VcBatch) Descriptor
deprecated
func (*VcBatch) GetTransactions ¶
func (*VcBatch) ProtoMessage ¶
func (*VcBatch) ProtoMessage()
func (*VcBatch) ProtoReflect ¶
func (x *VcBatch) ProtoReflect() protoreflect.Message
type VcTx ¶
type VcTx struct {
Ref *committerpb.TxRef `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"`
Namespaces []*applicationpb.TxNamespace `protobuf:"bytes,2,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
PrelimInvalidTxStatus *committerpb.Status `` /* 159-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*VcTx) Descriptor
deprecated
func (*VcTx) GetNamespaces ¶
func (x *VcTx) GetNamespaces() []*applicationpb.TxNamespace
func (*VcTx) GetPrelimInvalidTxStatus ¶
func (x *VcTx) GetPrelimInvalidTxStatus() committerpb.Status
func (*VcTx) GetRef ¶
func (x *VcTx) GetRef() *committerpb.TxRef
func (*VcTx) ProtoMessage ¶
func (*VcTx) ProtoMessage()
func (*VcTx) ProtoReflect ¶
func (x *VcTx) ProtoReflect() protoreflect.Message
type VerifierBatch ¶
type VerifierBatch struct {
Update *VerifierUpdates `protobuf:"bytes,1,opt,name=update,proto3,oneof" json:"update,omitempty"`
Requests []*TxWithRef `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests,omitempty"`
// contains filtered or unexported fields
}
func (*VerifierBatch) Descriptor
deprecated
func (*VerifierBatch) Descriptor() ([]byte, []int)
Deprecated: Use VerifierBatch.ProtoReflect.Descriptor instead.
func (*VerifierBatch) GetRequests ¶
func (x *VerifierBatch) GetRequests() []*TxWithRef
func (*VerifierBatch) GetUpdate ¶
func (x *VerifierBatch) GetUpdate() *VerifierUpdates
func (*VerifierBatch) ProtoMessage ¶
func (*VerifierBatch) ProtoMessage()
func (*VerifierBatch) ProtoReflect ¶
func (x *VerifierBatch) ProtoReflect() protoreflect.Message
func (*VerifierBatch) Reset ¶
func (x *VerifierBatch) Reset()
func (*VerifierBatch) String ¶
func (x *VerifierBatch) String() string
type VerifierClient ¶
type VerifierClient interface {
StartStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[VerifierBatch, TxStatusBatch], error)
}
VerifierClient is the client API for Verifier 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.
func NewVerifierClient ¶
func NewVerifierClient(cc grpc.ClientConnInterface) VerifierClient
type VerifierServer ¶
type VerifierServer interface {
StartStream(grpc.BidiStreamingServer[VerifierBatch, TxStatusBatch]) error
// contains filtered or unexported methods
}
VerifierServer is the server API for Verifier service. All implementations must embed UnimplementedVerifierServer for forward compatibility.
type VerifierUpdates ¶
type VerifierUpdates struct {
Config *applicationpb.ConfigTransaction `protobuf:"bytes,1,opt,name=config,proto3,oneof" json:"config,omitempty"`
NamespacePolicies *applicationpb.NamespacePolicies `protobuf:"bytes,2,opt,name=namespace_policies,json=namespacePolicies,proto3,oneof" json:"namespace_policies,omitempty"`
// contains filtered or unexported fields
}
func (*VerifierUpdates) Descriptor
deprecated
func (*VerifierUpdates) Descriptor() ([]byte, []int)
Deprecated: Use VerifierUpdates.ProtoReflect.Descriptor instead.
func (*VerifierUpdates) GetConfig ¶
func (x *VerifierUpdates) GetConfig() *applicationpb.ConfigTransaction
func (*VerifierUpdates) GetNamespacePolicies ¶
func (x *VerifierUpdates) GetNamespacePolicies() *applicationpb.NamespacePolicies
func (*VerifierUpdates) ProtoMessage ¶
func (*VerifierUpdates) ProtoMessage()
func (*VerifierUpdates) ProtoReflect ¶
func (x *VerifierUpdates) ProtoReflect() protoreflect.Message
func (*VerifierUpdates) Reset ¶
func (x *VerifierUpdates) Reset()
func (*VerifierUpdates) String ¶
func (x *VerifierUpdates) String() string
type Verifier_StartStreamClient ¶
type Verifier_StartStreamClient = grpc.BidiStreamingClient[VerifierBatch, TxStatusBatch]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Verifier_StartStreamServer ¶
type Verifier_StartStreamServer = grpc.BidiStreamingServer[VerifierBatch, TxStatusBatch]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.