package server
import "github.com/google/trillian/server"
Index ¶
- Variables
- type NewStorageProviderFunc
- type StorageProvider
- type TrillianLogRPCServer
- func NewTrillianLogRPCServer(registry extension.Registry, timeSource clock.TimeSource) *TrillianLogRPCServer
- func (t *TrillianLogRPCServer) AddSequencedLeaf(ctx context.Context, req *trillian.AddSequencedLeafRequest) (*trillian.AddSequencedLeafResponse, error)
- 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) GetLeavesByHash(ctx context.Context, req *trillian.GetLeavesByHashRequest) (*trillian.GetLeavesByHashResponse, error)
- func (t *TrillianLogRPCServer) GetLeavesByIndex(ctx context.Context, req *trillian.GetLeavesByIndexRequest) (*trillian.GetLeavesByIndexResponse, error)
- func (t *TrillianLogRPCServer) GetLeavesByRange(ctx context.Context, req *trillian.GetLeavesByRangeRequest) (*trillian.GetLeavesByRangeResponse, error)
- func (t *TrillianLogRPCServer) GetSequencedLeafCount(ctx context.Context, req *trillian.GetSequencedLeafCountRequest) (*trillian.GetSequencedLeafCountResponse, 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)
- func (t *TrillianLogRPCServer) QueueLeaves(ctx context.Context, req *trillian.QueueLeavesRequest) (*trillian.QueueLeavesResponse, error)
Variables ¶
var NewStorageProvider = storage.NewProvider
NewStorageProvider returns a new StorageProvider instance of the type specified by name.
Deprecated: storage.NewProvider should be used directly.
var RegisterStorageProvider = storage.RegisterProvider
RegisterStorageProvider registers the provided StorageProvider.
Deprecated: storage.RegisterProvider should be used directly.
Types ¶
type NewStorageProviderFunc ¶
type NewStorageProviderFunc = storage.NewProviderFunc
NewStorageProviderFunc is the signature of a function which can be registered to provide instances of storage providers.
Deprecated: storage.NewProviderFunc should be used directly.
type StorageProvider ¶
StorageProvider is an interface which allows Trillian binaries to use different storage implementations.
Deprecated: storage.Provider should be used directly.
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) AddSequencedLeaf ¶
func (t *TrillianLogRPCServer) AddSequencedLeaf(ctx context.Context, req *trillian.AddSequencedLeafRequest) (*trillian.AddSequencedLeafResponse, error)
AddSequencedLeaf submits one sequenced leaf to the storage.
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) GetLeavesByHash ¶
func (t *TrillianLogRPCServer) GetLeavesByHash(ctx context.Context, req *trillian.GetLeavesByHashRequest) (*trillian.GetLeavesByHashResponse, error)
GetLeavesByHash obtains one or more leaves based on their tree hash. It is not possible to fetch leaves that have been queued but not yet integrated. Logs may accept duplicate entries so this may return more results than the number of hashes in the request.
func (*TrillianLogRPCServer) GetLeavesByIndex ¶
func (t *TrillianLogRPCServer) GetLeavesByIndex(ctx context.Context, req *trillian.GetLeavesByIndexRequest) (*trillian.GetLeavesByIndexResponse, error)
GetLeavesByIndex obtains one or more leaves based on their sequence number within the tree. It is not possible to fetch leaves that have been queued but not yet integrated. TODO: Validate indices against published tree size in case we implement write sharding that can get ahead of this point. Not currently clear what component should own this state.
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) GetSequencedLeafCount ¶
func (t *TrillianLogRPCServer) GetSequencedLeafCount(ctx context.Context, req *trillian.GetSequencedLeafCountRequest) (*trillian.GetSequencedLeafCountResponse, error)
GetSequencedLeafCount returns the number of leaves that have been integrated into the Merkle Tree. This can be zero for a log containing no entries.
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.
func (*TrillianLogRPCServer) QueueLeaves ¶
func (t *TrillianLogRPCServer) QueueLeaves(ctx context.Context, req *trillian.QueueLeavesRequest) (*trillian.QueueLeavesResponse, error)
QueueLeaves submits a batch of leaves to the log for later integration into the underlying tree.
Source Files ¶
log_rpc_server.go proof_fetcher.go storage_provider.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.3.13
- Published
- Feb 16, 2021
- Platform
- js/wasm
- Imports
- 17 packages
- Last checked
- 2 hours ago –
Tools for package owners.