protoc

package module
v0.0.0-...-8d5e345 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionService_HandleTransaction_FullMethodName = "/protoc.TransactionService/HandleTransaction"
	TransactionService_AppendEntries_FullMethodName     = "/protoc.TransactionService/AppendEntries"
	TransactionService_RequestVote_FullMethodName       = "/protoc.TransactionService/RequestVote"
	TransactionService_SyncState_FullMethodName         = "/protoc.TransactionService/SyncState"
	TransactionService_VerifyState_FullMethodName       = "/protoc.TransactionService/VerifyState"
	TransactionService_GetNetworkInfo_FullMethodName    = "/protoc.TransactionService/GetNetworkInfo"
	TransactionService_ManageCheckpoint_FullMethodName  = "/protoc.TransactionService/ManageCheckpoint"
)

Variables

View Source
var File_transaction_proto protoreflect.FileDescriptor
View Source
var TransactionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "protoc.TransactionService",
	HandlerType: (*TransactionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "HandleTransaction",
			Handler:    _TransactionService_HandleTransaction_Handler,
		},
		{
			MethodName: "AppendEntries",
			Handler:    _TransactionService_AppendEntries_Handler,
		},
		{
			MethodName: "RequestVote",
			Handler:    _TransactionService_RequestVote_Handler,
		},
		{
			MethodName: "SyncState",
			Handler:    _TransactionService_SyncState_Handler,
		},
		{
			MethodName: "VerifyState",
			Handler:    _TransactionService_VerifyState_Handler,
		},
		{
			MethodName: "GetNetworkInfo",
			Handler:    _TransactionService_GetNetworkInfo_Handler,
		},
		{
			MethodName: "ManageCheckpoint",
			Handler:    _TransactionService_ManageCheckpoint_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "transaction.proto",
}

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

Functions

func RegisterTransactionServiceServer

func RegisterTransactionServiceServer(s grpc.ServiceRegistrar, srv TransactionServiceServer)

Types

type AppendEntriesRequest

type AppendEntriesRequest struct {
	Term         int32       `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"`
	LeaderId     string      `protobuf:"bytes,2,opt,name=leader_id,json=leaderId,proto3" json:"leader_id,omitempty"`
	PrevLogIndex int32       `protobuf:"varint,3,opt,name=prev_log_index,json=prevLogIndex,proto3" json:"prev_log_index,omitempty"`
	PrevLogTerm  int32       `protobuf:"varint,4,opt,name=prev_log_term,json=prevLogTerm,proto3" json:"prev_log_term,omitempty"`
	Entries      []*LogEntry `protobuf:"bytes,5,rep,name=entries,proto3" json:"entries,omitempty"`
	LeaderCommit int32       `protobuf:"varint,6,opt,name=leader_commit,json=leaderCommit,proto3" json:"leader_commit,omitempty"`
	// contains filtered or unexported fields
}

AppendEntriesRequest represents a request for the AppendEntries RPC in Raft

func (*AppendEntriesRequest) Descriptor deprecated

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

Deprecated: Use AppendEntriesRequest.ProtoReflect.Descriptor instead.

func (*AppendEntriesRequest) GetEntries

func (x *AppendEntriesRequest) GetEntries() []*LogEntry

func (*AppendEntriesRequest) GetLeaderCommit

func (x *AppendEntriesRequest) GetLeaderCommit() int32

func (*AppendEntriesRequest) GetLeaderId

func (x *AppendEntriesRequest) GetLeaderId() string

func (*AppendEntriesRequest) GetPrevLogIndex

func (x *AppendEntriesRequest) GetPrevLogIndex() int32

func (*AppendEntriesRequest) GetPrevLogTerm

func (x *AppendEntriesRequest) GetPrevLogTerm() int32

func (*AppendEntriesRequest) GetTerm

func (x *AppendEntriesRequest) GetTerm() int32

func (*AppendEntriesRequest) ProtoMessage

func (*AppendEntriesRequest) ProtoMessage()

func (*AppendEntriesRequest) ProtoReflect

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

func (*AppendEntriesRequest) Reset

func (x *AppendEntriesRequest) Reset()

func (*AppendEntriesRequest) String

func (x *AppendEntriesRequest) String() string

type AppendEntriesResponse

type AppendEntriesResponse struct {
	Term    int32 `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"`
	Success bool  `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

AppendEntriesResponse represents a response to the AppendEntries RPC

func (*AppendEntriesResponse) Descriptor deprecated

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

Deprecated: Use AppendEntriesResponse.ProtoReflect.Descriptor instead.

func (*AppendEntriesResponse) GetSuccess

func (x *AppendEntriesResponse) GetSuccess() bool

func (*AppendEntriesResponse) GetTerm

func (x *AppendEntriesResponse) GetTerm() int32

func (*AppendEntriesResponse) ProtoMessage

func (*AppendEntriesResponse) ProtoMessage()

func (*AppendEntriesResponse) ProtoReflect

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

func (*AppendEntriesResponse) Reset

func (x *AppendEntriesResponse) Reset()

func (*AppendEntriesResponse) String

func (x *AppendEntriesResponse) String() string

type CheckpointRequest

type CheckpointRequest struct {
	NodeId       string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	Create       bool   `protobuf:"varint,2,opt,name=create,proto3" json:"create,omitempty"`                                 // true for create, false for restore
	CheckpointId int64  `protobuf:"varint,3,opt,name=checkpoint_id,json=checkpointId,proto3" json:"checkpoint_id,omitempty"` // Used for restore only
	// contains filtered or unexported fields
}

CheckpointRequest represents a request to create or restore from a checkpoint

func (*CheckpointRequest) Descriptor deprecated

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

Deprecated: Use CheckpointRequest.ProtoReflect.Descriptor instead.

func (*CheckpointRequest) GetCheckpointId

func (x *CheckpointRequest) GetCheckpointId() int64

func (*CheckpointRequest) GetCreate

func (x *CheckpointRequest) GetCreate() bool

func (*CheckpointRequest) GetNodeId

func (x *CheckpointRequest) GetNodeId() string

func (*CheckpointRequest) ProtoMessage

func (*CheckpointRequest) ProtoMessage()

func (*CheckpointRequest) ProtoReflect

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

func (*CheckpointRequest) Reset

func (x *CheckpointRequest) Reset()

func (*CheckpointRequest) String

func (x *CheckpointRequest) String() string

type CheckpointResponse

type CheckpointResponse struct {
	Success      bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	CheckpointId int64  `protobuf:"varint,2,opt,name=checkpoint_id,json=checkpointId,proto3" json:"checkpoint_id,omitempty"`
	ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

CheckpointResponse represents a response to a checkpoint request

func (*CheckpointResponse) Descriptor deprecated

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

Deprecated: Use CheckpointResponse.ProtoReflect.Descriptor instead.

func (*CheckpointResponse) GetCheckpointId

func (x *CheckpointResponse) GetCheckpointId() int64

func (*CheckpointResponse) GetErrorMessage

func (x *CheckpointResponse) GetErrorMessage() string

func (*CheckpointResponse) GetSuccess

func (x *CheckpointResponse) GetSuccess() bool

func (*CheckpointResponse) ProtoMessage

func (*CheckpointResponse) ProtoMessage()

func (*CheckpointResponse) ProtoReflect

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

func (*CheckpointResponse) Reset

func (x *CheckpointResponse) Reset()

func (*CheckpointResponse) String

func (x *CheckpointResponse) String() string

type LogEntry

type LogEntry struct {
	Term    int32        `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"`
	Index   int32        `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	Command *Transaction `protobuf:"bytes,3,opt,name=command,proto3" json:"command,omitempty"`
	// contains filtered or unexported fields
}

func (*LogEntry) Descriptor deprecated

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

Deprecated: Use LogEntry.ProtoReflect.Descriptor instead.

func (*LogEntry) GetCommand

func (x *LogEntry) GetCommand() *Transaction

func (*LogEntry) GetIndex

func (x *LogEntry) GetIndex() int32

func (*LogEntry) GetTerm

func (x *LogEntry) GetTerm() int32

func (*LogEntry) ProtoMessage

func (*LogEntry) ProtoMessage()

func (*LogEntry) ProtoReflect

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

func (*LogEntry) Reset

func (x *LogEntry) Reset()

func (*LogEntry) String

func (x *LogEntry) String() string

type NetworkInfoRequest

type NetworkInfoRequest struct {
	RequestingNodeId string `protobuf:"bytes,1,opt,name=requesting_node_id,json=requestingNodeId,proto3" json:"requesting_node_id,omitempty"`
	// contains filtered or unexported fields
}

NetworkInfoRequest represents a request for information about the network

func (*NetworkInfoRequest) Descriptor deprecated

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

Deprecated: Use NetworkInfoRequest.ProtoReflect.Descriptor instead.

func (*NetworkInfoRequest) GetRequestingNodeId

func (x *NetworkInfoRequest) GetRequestingNodeId() string

func (*NetworkInfoRequest) ProtoMessage

func (*NetworkInfoRequest) ProtoMessage()

func (*NetworkInfoRequest) ProtoReflect

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

func (*NetworkInfoRequest) Reset

func (x *NetworkInfoRequest) Reset()

func (*NetworkInfoRequest) String

func (x *NetworkInfoRequest) String() string

type NetworkInfoResponse

type NetworkInfoResponse struct {
	Nodes       []*NodeInfo `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
	LeaderId    string      `protobuf:"bytes,2,opt,name=leader_id,json=leaderId,proto3" json:"leader_id,omitempty"`
	CurrentTerm int32       `protobuf:"varint,3,opt,name=current_term,json=currentTerm,proto3" json:"current_term,omitempty"`
	// contains filtered or unexported fields
}

NetworkInfoResponse represents a response with information about the network

func (*NetworkInfoResponse) Descriptor deprecated

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

Deprecated: Use NetworkInfoResponse.ProtoReflect.Descriptor instead.

func (*NetworkInfoResponse) GetCurrentTerm

func (x *NetworkInfoResponse) GetCurrentTerm() int32

func (*NetworkInfoResponse) GetLeaderId

func (x *NetworkInfoResponse) GetLeaderId() string

func (*NetworkInfoResponse) GetNodes

func (x *NetworkInfoResponse) GetNodes() []*NodeInfo

func (*NetworkInfoResponse) ProtoMessage

func (*NetworkInfoResponse) ProtoMessage()

func (*NetworkInfoResponse) ProtoReflect

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

func (*NetworkInfoResponse) Reset

func (x *NetworkInfoResponse) Reset()

func (*NetworkInfoResponse) String

func (x *NetworkInfoResponse) String() string

type NodeInfo

type NodeInfo struct {
	Id       string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Address  string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	IsLeader bool   `protobuf:"varint,3,opt,name=is_leader,json=isLeader,proto3" json:"is_leader,omitempty"`
	Term     int32  `protobuf:"varint,4,opt,name=term,proto3" json:"term,omitempty"`
	// contains filtered or unexported fields
}

NodeInfo represents information about a node in the network

func (*NodeInfo) Descriptor deprecated

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

Deprecated: Use NodeInfo.ProtoReflect.Descriptor instead.

func (*NodeInfo) GetAddress

func (x *NodeInfo) GetAddress() string

func (*NodeInfo) GetId

func (x *NodeInfo) GetId() string

func (*NodeInfo) GetIsLeader

func (x *NodeInfo) GetIsLeader() bool

func (*NodeInfo) GetTerm

func (x *NodeInfo) GetTerm() int32

func (*NodeInfo) ProtoMessage

func (*NodeInfo) ProtoMessage()

func (*NodeInfo) ProtoReflect

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

func (*NodeInfo) Reset

func (x *NodeInfo) Reset()

func (*NodeInfo) String

func (x *NodeInfo) String() string

type RequestVoteRequest

type RequestVoteRequest struct {
	Term         int32  `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"`
	CandidateId  string `protobuf:"bytes,2,opt,name=candidate_id,json=candidateId,proto3" json:"candidate_id,omitempty"`
	LastLogIndex int32  `protobuf:"varint,3,opt,name=last_log_index,json=lastLogIndex,proto3" json:"last_log_index,omitempty"`
	LastLogTerm  int32  `protobuf:"varint,4,opt,name=last_log_term,json=lastLogTerm,proto3" json:"last_log_term,omitempty"`
	// contains filtered or unexported fields
}

RequestVoteRequest represents a request for the RequestVote RPC in Raft

func (*RequestVoteRequest) Descriptor deprecated

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

Deprecated: Use RequestVoteRequest.ProtoReflect.Descriptor instead.

func (*RequestVoteRequest) GetCandidateId

func (x *RequestVoteRequest) GetCandidateId() string

func (*RequestVoteRequest) GetLastLogIndex

func (x *RequestVoteRequest) GetLastLogIndex() int32

func (*RequestVoteRequest) GetLastLogTerm

func (x *RequestVoteRequest) GetLastLogTerm() int32

func (*RequestVoteRequest) GetTerm

func (x *RequestVoteRequest) GetTerm() int32

func (*RequestVoteRequest) ProtoMessage

func (*RequestVoteRequest) ProtoMessage()

func (*RequestVoteRequest) ProtoReflect

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

func (*RequestVoteRequest) Reset

func (x *RequestVoteRequest) Reset()

func (*RequestVoteRequest) String

func (x *RequestVoteRequest) String() string

type RequestVoteResponse

type RequestVoteResponse struct {
	Term        int32 `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"`
	VoteGranted bool  `protobuf:"varint,2,opt,name=vote_granted,json=voteGranted,proto3" json:"vote_granted,omitempty"`
	// contains filtered or unexported fields
}

RequestVoteResponse represents a response to the RequestVote RPC

func (*RequestVoteResponse) Descriptor deprecated

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

Deprecated: Use RequestVoteResponse.ProtoReflect.Descriptor instead.

func (*RequestVoteResponse) GetTerm

func (x *RequestVoteResponse) GetTerm() int32

func (*RequestVoteResponse) GetVoteGranted

func (x *RequestVoteResponse) GetVoteGranted() bool

func (*RequestVoteResponse) ProtoMessage

func (*RequestVoteResponse) ProtoMessage()

func (*RequestVoteResponse) ProtoReflect

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

func (*RequestVoteResponse) Reset

func (x *RequestVoteResponse) Reset()

func (*RequestVoteResponse) String

func (x *RequestVoteResponse) String() string

type StateVerificationRequest

type StateVerificationRequest struct {
	NodeId     string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	MerkleRoot string `protobuf:"bytes,2,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"`
	// contains filtered or unexported fields
}

StateVerificationRequest represents a request to verify state with another node

func (*StateVerificationRequest) Descriptor deprecated

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

Deprecated: Use StateVerificationRequest.ProtoReflect.Descriptor instead.

func (*StateVerificationRequest) GetMerkleRoot

func (x *StateVerificationRequest) GetMerkleRoot() string

func (*StateVerificationRequest) GetNodeId

func (x *StateVerificationRequest) GetNodeId() string

func (*StateVerificationRequest) ProtoMessage

func (*StateVerificationRequest) ProtoMessage()

func (*StateVerificationRequest) ProtoReflect

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

func (*StateVerificationRequest) Reset

func (x *StateVerificationRequest) Reset()

func (*StateVerificationRequest) String

func (x *StateVerificationRequest) String() string

type StateVerificationResponse

type StateVerificationResponse struct {
	Consistent bool   `protobuf:"varint,1,opt,name=consistent,proto3" json:"consistent,omitempty"`
	MerkleRoot string `protobuf:"bytes,2,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"`
	// contains filtered or unexported fields
}

StateVerificationResponse represents a response to a state verification request

func (*StateVerificationResponse) Descriptor deprecated

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

Deprecated: Use StateVerificationResponse.ProtoReflect.Descriptor instead.

func (*StateVerificationResponse) GetConsistent

func (x *StateVerificationResponse) GetConsistent() bool

func (*StateVerificationResponse) GetMerkleRoot

func (x *StateVerificationResponse) GetMerkleRoot() string

func (*StateVerificationResponse) ProtoMessage

func (*StateVerificationResponse) ProtoMessage()

func (*StateVerificationResponse) ProtoReflect

func (*StateVerificationResponse) Reset

func (x *StateVerificationResponse) Reset()

func (*StateVerificationResponse) String

func (x *StateVerificationResponse) String() string

type SyncRequest

type SyncRequest struct {
	NodeId      string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	MerkleRoot  string `protobuf:"bytes,2,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"`
	BloomFilter []byte `protobuf:"bytes,3,opt,name=bloom_filter,json=bloomFilter,proto3" json:"bloom_filter,omitempty"`
	// contains filtered or unexported fields
}

SyncRequest represents a request to synchronize state with another node

func (*SyncRequest) Descriptor deprecated

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

Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead.

func (*SyncRequest) GetBloomFilter

func (x *SyncRequest) GetBloomFilter() []byte

func (*SyncRequest) GetMerkleRoot

func (x *SyncRequest) GetMerkleRoot() string

func (*SyncRequest) GetNodeId

func (x *SyncRequest) GetNodeId() string

func (*SyncRequest) ProtoMessage

func (*SyncRequest) ProtoMessage()

func (*SyncRequest) ProtoReflect

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

func (*SyncRequest) Reset

func (x *SyncRequest) Reset()

func (*SyncRequest) String

func (x *SyncRequest) String() string

type SyncResponse

type SyncResponse struct {
	Success             bool           `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	MerkleRoot          string         `protobuf:"bytes,2,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"`
	MissingTransactions []*Transaction `protobuf:"bytes,3,rep,name=missing_transactions,json=missingTransactions,proto3" json:"missing_transactions,omitempty"`
	// contains filtered or unexported fields
}

SyncResponse represents a response to a sync request

func (*SyncResponse) Descriptor deprecated

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

Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead.

func (*SyncResponse) GetMerkleRoot

func (x *SyncResponse) GetMerkleRoot() string

func (*SyncResponse) GetMissingTransactions

func (x *SyncResponse) GetMissingTransactions() []*Transaction

func (*SyncResponse) GetSuccess

func (x *SyncResponse) GetSuccess() bool

func (*SyncResponse) ProtoMessage

func (*SyncResponse) ProtoMessage()

func (*SyncResponse) ProtoReflect

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

func (*SyncResponse) Reset

func (x *SyncResponse) Reset()

func (*SyncResponse) String

func (x *SyncResponse) String() string

type Transaction

type Transaction struct {
	Id        string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Key       string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Value     string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	PublicKey string `protobuf:"bytes,5,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	Timestamp int64  `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

Transaction represents a key-value transaction with authentication and signature

func (*Transaction) Descriptor deprecated

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

Deprecated: Use Transaction.ProtoReflect.Descriptor instead.

func (*Transaction) GetId

func (x *Transaction) GetId() string

func (*Transaction) GetKey

func (x *Transaction) GetKey() string

func (*Transaction) GetPublicKey

func (x *Transaction) GetPublicKey() string

func (*Transaction) GetSignature

func (x *Transaction) GetSignature() []byte

func (*Transaction) GetTimestamp

func (x *Transaction) GetTimestamp() int64

func (*Transaction) GetValue

func (x *Transaction) GetValue() string

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) ProtoReflect

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

func (*Transaction) Reset

func (x *Transaction) Reset()

func (*Transaction) String

func (x *Transaction) String() string

type TransactionRequest

type TransactionRequest struct {
	Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
	// contains filtered or unexported fields
}

TransactionRequest represents a request to handle a transaction

func (*TransactionRequest) Descriptor deprecated

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

Deprecated: Use TransactionRequest.ProtoReflect.Descriptor instead.

func (*TransactionRequest) GetTransaction

func (x *TransactionRequest) GetTransaction() *Transaction

func (*TransactionRequest) ProtoMessage

func (*TransactionRequest) ProtoMessage()

func (*TransactionRequest) ProtoReflect

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

func (*TransactionRequest) Reset

func (x *TransactionRequest) Reset()

func (*TransactionRequest) String

func (x *TransactionRequest) String() string

type TransactionResponse

type TransactionResponse struct {
	Success      bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	MerkleRoot   string `protobuf:"bytes,3,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"` // Current Merkle root after transaction
	// contains filtered or unexported fields
}

TransactionResponse represents a response from handling a transaction

func (*TransactionResponse) Descriptor deprecated

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

Deprecated: Use TransactionResponse.ProtoReflect.Descriptor instead.

func (*TransactionResponse) GetErrorMessage

func (x *TransactionResponse) GetErrorMessage() string

func (*TransactionResponse) GetMerkleRoot

func (x *TransactionResponse) GetMerkleRoot() string

func (*TransactionResponse) GetSuccess

func (x *TransactionResponse) GetSuccess() bool

func (*TransactionResponse) ProtoMessage

func (*TransactionResponse) ProtoMessage()

func (*TransactionResponse) ProtoReflect

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

func (*TransactionResponse) Reset

func (x *TransactionResponse) Reset()

func (*TransactionResponse) String

func (x *TransactionResponse) String() string

type TransactionServiceClient

type TransactionServiceClient interface {
	// Transaction handling
	HandleTransaction(ctx context.Context, in *TransactionRequest, opts ...grpc.CallOption) (*TransactionResponse, error)
	// Raft consensus RPCs
	AppendEntries(ctx context.Context, in *AppendEntriesRequest, opts ...grpc.CallOption) (*AppendEntriesResponse, error)
	RequestVote(ctx context.Context, in *RequestVoteRequest, opts ...grpc.CallOption) (*RequestVoteResponse, error)
	// Synchronization and state verification
	SyncState(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error)
	VerifyState(ctx context.Context, in *StateVerificationRequest, opts ...grpc.CallOption) (*StateVerificationResponse, error)
	// Network management
	GetNetworkInfo(ctx context.Context, in *NetworkInfoRequest, opts ...grpc.CallOption) (*NetworkInfoResponse, error)
	// Checkpoint management
	ManageCheckpoint(ctx context.Context, in *CheckpointRequest, opts ...grpc.CallOption) (*CheckpointResponse, error)
}

TransactionServiceClient is the client API for TransactionService 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.

TransactionService defines the gRPC service for handling transactions and consensus

type TransactionServiceServer

type TransactionServiceServer interface {
	// Transaction handling
	HandleTransaction(context.Context, *TransactionRequest) (*TransactionResponse, error)
	// Raft consensus RPCs
	AppendEntries(context.Context, *AppendEntriesRequest) (*AppendEntriesResponse, error)
	RequestVote(context.Context, *RequestVoteRequest) (*RequestVoteResponse, error)
	// Synchronization and state verification
	SyncState(context.Context, *SyncRequest) (*SyncResponse, error)
	VerifyState(context.Context, *StateVerificationRequest) (*StateVerificationResponse, error)
	// Network management
	GetNetworkInfo(context.Context, *NetworkInfoRequest) (*NetworkInfoResponse, error)
	// Checkpoint management
	ManageCheckpoint(context.Context, *CheckpointRequest) (*CheckpointResponse, error)
	// contains filtered or unexported methods
}

TransactionServiceServer is the server API for TransactionService service. All implementations must embed UnimplementedTransactionServiceServer for forward compatibility.

TransactionService defines the gRPC service for handling transactions and consensus

type UnimplementedTransactionServiceServer

type UnimplementedTransactionServiceServer struct{}

UnimplementedTransactionServiceServer 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 (UnimplementedTransactionServiceServer) AppendEntries

func (UnimplementedTransactionServiceServer) GetNetworkInfo

func (UnimplementedTransactionServiceServer) HandleTransaction

func (UnimplementedTransactionServiceServer) ManageCheckpoint

func (UnimplementedTransactionServiceServer) RequestVote

func (UnimplementedTransactionServiceServer) SyncState

func (UnimplementedTransactionServiceServer) VerifyState

type UnsafeTransactionServiceServer

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

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

Jump to

Keyboard shortcuts

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