package server
import "github.com/google/trillian/server"
Package server contains the Trillian log server implementation.
Index ¶
- type TrillianLogRPCServer
- func NewTrillianLogRPCServer(registry extension.Registry, timeSource clock.TimeSource) *TrillianLogRPCServer
- func (t *TrillianLogRPCServer) AddSequencedLeaves(ctx context.Context, req *trillian.AddSequencedLeavesRequest) (*trillian.AddSequencedLeavesResponse, error)
- func (t *TrillianLogRPCServer) GetConsistencyProof(ctx context.Context, req *trillian.GetConsistencyProofRequest) (*trillian.GetConsistencyProofResponse, error)
- func (t *TrillianLogRPCServer) GetEntryAndProof(ctx context.Context, req *trillian.GetEntryAndProofRequest) (*trillian.GetEntryAndProofResponse, error)
- func (t *TrillianLogRPCServer) GetInclusionProof(ctx context.Context, req *trillian.GetInclusionProofRequest) (*trillian.GetInclusionProofResponse, error)
- func (t *TrillianLogRPCServer) GetInclusionProofByHash(ctx context.Context, req *trillian.GetInclusionProofByHashRequest) (*trillian.GetInclusionProofByHashResponse, error)
- func (t *TrillianLogRPCServer) GetLatestSignedLogRoot(ctx context.Context, req *trillian.GetLatestSignedLogRootRequest) (*trillian.GetLatestSignedLogRootResponse, error)
- func (t *TrillianLogRPCServer) GetLeavesByRange(ctx context.Context, req *trillian.GetLeavesByRangeRequest) (*trillian.GetLeavesByRangeResponse, error)
- func (t *TrillianLogRPCServer) InitLog(ctx context.Context, req *trillian.InitLogRequest) (*trillian.InitLogResponse, error)
- func (t *TrillianLogRPCServer) IsHealthy() error
- func (t *TrillianLogRPCServer) QueueLeaf(ctx context.Context, req *trillian.QueueLeafRequest) (*trillian.QueueLeafResponse, error)
Types ¶
type TrillianLogRPCServer ¶
type TrillianLogRPCServer struct {
// contains filtered or unexported fields
}
TrillianLogRPCServer implements the RPC API defined in the proto
func NewTrillianLogRPCServer ¶
func NewTrillianLogRPCServer(registry extension.Registry, timeSource clock.TimeSource) *TrillianLogRPCServer
NewTrillianLogRPCServer creates a new RPC server backed by a LogStorageProvider.
func (*TrillianLogRPCServer) AddSequencedLeaves ¶
func (t *TrillianLogRPCServer) AddSequencedLeaves(ctx context.Context, req *trillian.AddSequencedLeavesRequest) (*trillian.AddSequencedLeavesResponse, error)
AddSequencedLeaves submits a batch of sequenced leaves to a pre-ordered log for later integration into its underlying tree.
func (*TrillianLogRPCServer) GetConsistencyProof ¶
func (t *TrillianLogRPCServer) GetConsistencyProof(ctx context.Context, req *trillian.GetConsistencyProofRequest) (*trillian.GetConsistencyProofResponse, error)
GetConsistencyProof obtains a proof that two versions of the tree are consistent with each other and that the later tree includes all the entries of the prior one. For more details see the example trees in RFC 6962.
func (*TrillianLogRPCServer) GetEntryAndProof ¶
func (t *TrillianLogRPCServer) GetEntryAndProof(ctx context.Context, req *trillian.GetEntryAndProofRequest) (*trillian.GetEntryAndProofResponse, error)
GetEntryAndProof returns both a Merkle Leaf entry and an inclusion proof for a given index and tree size.
func (*TrillianLogRPCServer) GetInclusionProof ¶
func (t *TrillianLogRPCServer) GetInclusionProof(ctx context.Context, req *trillian.GetInclusionProofRequest) (*trillian.GetInclusionProofResponse, error)
GetInclusionProof obtains the proof of inclusion in the tree for a leaf that has been sequenced. Similar to the get proof by hash handler but one less step as we don't need to look up the index
func (*TrillianLogRPCServer) GetInclusionProofByHash ¶
func (t *TrillianLogRPCServer) GetInclusionProofByHash(ctx context.Context, req *trillian.GetInclusionProofByHashRequest) (*trillian.GetInclusionProofByHashResponse, error)
GetInclusionProofByHash obtains proofs of inclusion by leaf hash. Because some logs can contain duplicate hashes it is possible for multiple proofs to be returned.
func (*TrillianLogRPCServer) GetLatestSignedLogRoot ¶
func (t *TrillianLogRPCServer) GetLatestSignedLogRoot(ctx context.Context, req *trillian.GetLatestSignedLogRootRequest) (*trillian.GetLatestSignedLogRootResponse, error)
GetLatestSignedLogRoot obtains the latest published tree root for the Merkle Tree that underlies the log.
func (*TrillianLogRPCServer) GetLeavesByRange ¶
func (t *TrillianLogRPCServer) GetLeavesByRange(ctx context.Context, req *trillian.GetLeavesByRangeRequest) (*trillian.GetLeavesByRangeResponse, error)
GetLeavesByRange obtains leaves based on a range of sequence numbers within the tree. This only fetches sequenced leaves; leaves that have been queued but not yet integrated are not visible.
func (*TrillianLogRPCServer) InitLog ¶
func (t *TrillianLogRPCServer) InitLog(ctx context.Context, req *trillian.InitLogRequest) (*trillian.InitLogResponse, error)
InitLog initialises a freshly created Log by creating the first STH with size 0.
func (*TrillianLogRPCServer) IsHealthy ¶
func (t *TrillianLogRPCServer) IsHealthy() error
IsHealthy returns nil if the server is healthy, error otherwise.
func (*TrillianLogRPCServer) QueueLeaf ¶
func (t *TrillianLogRPCServer) QueueLeaf(ctx context.Context, req *trillian.QueueLeafRequest) (*trillian.QueueLeafResponse, error)
QueueLeaf submits one leaf to the queue.
Source Files ¶
doc.go log_rpc_server.go proof_fetcher.go validate.go
Directories ¶
Path | Synopsis |
---|---|
server/admin | Package admin contains the TrillianAdminServer implementation. |
server/errors | Package errors contains utilities to translate TrillianErrors to gRPC errors. |
server/interceptor | Package interceptor defines gRPC interceptors for Trillian. |
- Version
- v1.7.1 (latest)
- Published
- Jan 9, 2025
- Platform
- linux/amd64
- Imports
- 18 packages
- Last checked
- 5 days ago –
Tools for package owners.