mtrillian

package
v1.31.0-beta.19 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TrillianConnection

type TrillianConnection struct {
	AddrGRPC string
	AddrHTTP string
	Database string
	Conn     *grpc.ClientConn
	Logger   mlog.Logger
}

func (*TrillianConnection) Connect

func (c *TrillianConnection) Connect() error

Connect keeps a singleton connection with Trillian gRPC.

func (*TrillianConnection) CreateLog

func (c *TrillianConnection) CreateLog(ctx context.Context, treeID int64, content []byte) ([]byte, error)

func (*TrillianConnection) CreateTree

func (c *TrillianConnection) CreateTree(ctx context.Context, name, description string) (int64, error)

CreateTree creates a Trillian tree to store log entries

func (*TrillianConnection) GetInclusionProofByHash

func (c *TrillianConnection) GetInclusionProofByHash(ctx context.Context, treeID int64, identityHash string) ([]*trillian.Proof, error)

func (*TrillianConnection) GetLeafByIndex

func (c *TrillianConnection) GetLeafByIndex(ctx context.Context, treeID int64, leafIndex int64) (*trillian.LogLeaf, error)

func (*TrillianConnection) GetNewClient

func (c *TrillianConnection) GetNewClient() (*grpc.ClientConn, error)

GetNewClient returns a connection to Trillian gRPC, reconnect it if necessary.

func (*TrillianConnection) InitTree

func (c *TrillianConnection) InitTree(ctx context.Context, treeID int64) error

InitTree initializes a Trillian tree previously created

Jump to

Keyboard shortcuts

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