package server

import "github.com/google/trillian/server"

Index

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 NewStorageProviderFromFlags = storage.NewProviderFromFlags

NewStorageProviderFromFlags returns a new StorageProvider instance of the type specified by flag.

Deprecated: storage.NewProviderFromFlags 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

type StorageProvider = storage.Provider

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

AddSequencedLeaf submits one sequenced leaf to the storage.

func (*TrillianLogRPCServer) AddSequencedLeaves

AddSequencedLeaves submits a batch of sequenced leaves to a pre-ordered log for later integration into its underlying tree.

func (*TrillianLogRPCServer) GetConsistencyProof

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

GetEntryAndProof returns both a Merkle Leaf entry and an inclusion proof for a given index and tree size.

func (*TrillianLogRPCServer) GetInclusionProof

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

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

GetLatestSignedLogRoot obtains the latest published tree root for the Merkle Tree that underlies the log.

func (*TrillianLogRPCServer) GetLeavesByHash

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

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

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

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

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

QueueLeaf submits one leaf to the queue.

func (*TrillianLogRPCServer) QueueLeaves

QueueLeaves submits a batch of leaves to the log for later integration into the underlying tree.

type TrillianMapServer

type TrillianMapServer struct {
	trillian.UnimplementedTrillianMapServer
	// contains filtered or unexported fields
}

TrillianMapServer implements the RPC API defined in the proto

func NewTrillianMapServer

func NewTrillianMapServer(registry extension.Registry, opts TrillianMapServerOptions) *TrillianMapServer

NewTrillianMapServer creates a new RPC server backed by registry

func (*TrillianMapServer) GetLeaf

GetLeaf returns an inclusion proof to the leaf, or nil if the leaf does not exist.

func (*TrillianMapServer) GetLeafByRevision

GetLeafByRevision returns an inclusion proof to the leaf, or nil if the leaf does not exist.

func (*TrillianMapServer) GetLeaves

GetLeaves implements the GetLeaves RPC method. Each requested index will return an inclusion proof to the leaf, or nil if the leaf does not exist.

func (*TrillianMapServer) GetLeavesByRevision

GetLeavesByRevision implements the GetLeavesByRevision RPC method.

func (*TrillianMapServer) GetLeavesByRevisionNoProof

func (t *TrillianMapServer) GetLeavesByRevisionNoProof(ctx context.Context, req *trillian.GetMapLeavesByRevisionRequest) (*trillian.MapLeaves, error)

GetLeavesByRevisionNoProof implements the GetLeavesByRevision RPC method.

func (*TrillianMapServer) GetSignedMapRoot

GetSignedMapRoot implements the GetSignedMapRoot RPC method.

func (*TrillianMapServer) GetSignedMapRootByRevision

GetSignedMapRootByRevision implements the GetSignedMapRootByRevision RPC method.

func (*TrillianMapServer) InitMap

InitMap implements the RPC Method of the same name.

func (*TrillianMapServer) IsHealthy

func (t *TrillianMapServer) IsHealthy() error

IsHealthy returns nil if the server is healthy, error otherwise.

func (*TrillianMapServer) SetLeaves

SetLeaves implements the SetLeaves RPC method.

type TrillianMapServerOptions

type TrillianMapServerOptions struct {
	// UseSingleTransaction specifies whether updates to a map should be
	// attempted within a single transaction.
	UseSingleTransaction bool

	// UseLargePreload enables the performance workaround applied when
	// UseSingleTransaction is set.
	UseLargePreload bool
}

TrillianMapServerOptions allows various options to be provided when creating a new TrillianMapServer.

type TrillianMapWriteServer

type TrillianMapWriteServer struct {
	// contains filtered or unexported fields
}

TrillianMapWriteServer implements the Write RPC API

func NewTrillianMapWriteServer

func NewTrillianMapWriteServer(registry extension.Registry, mapServer *TrillianMapServer) *TrillianMapWriteServer

NewTrillianMapWriteServer creates a new RPC server for map writes

func (*TrillianMapWriteServer) GetLeavesByRevision

GetLeavesByRevision implements the GetLeavesByRevision write RPC method.

func (*TrillianMapWriteServer) IsHealthy

func (t *TrillianMapWriteServer) IsHealthy() error

IsHealthy returns nil if the server is healthy, error otherwise.

func (*TrillianMapWriteServer) WriteLeaves

WriteLeaves implements the WriteLeaves write RPC method.

Source Files

log_rpc_server.go map_rpc_server.go map_tree_updater.go map_write_rpc_server.go proof_fetcher.go storage_provider.go validate.go

Directories

PathSynopsis
server/adminPackage admin contains the TrillianAdminServer implementation.
server/errorsPackage errors contains utilities to translate TrillianErrors to gRPC errors.
server/interceptorPackage interceptor defines gRPC interceptors for Trillian.
Version
v1.3.9
Published
Jun 22, 2020
Platform
js/wasm
Imports
21 packages
Last checked
6 hours ago

Tools for package owners.