gdb

package
v1.11.3-send Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBClient

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

func NewDBClient

func NewDBClient(client pb.DBClient) *DBClient

func (*DBClient) Clear

func (c *DBClient) Clear() error

func (*DBClient) CommitChangeProof

func (c *DBClient) CommitChangeProof(ctx context.Context, proof *merkledb.ChangeProof) error

func (*DBClient) CommitRangeProof

func (c *DBClient) CommitRangeProof(
	ctx context.Context,
	startKey maybe.Maybe[[]byte],
	endKey maybe.Maybe[[]byte],
	proof *merkledb.RangeProof,
) error

func (*DBClient) GetChangeProof

func (c *DBClient) GetChangeProof(
	ctx context.Context,
	startRootID ids.ID,
	endRootID ids.ID,
	startKey maybe.Maybe[[]byte],
	endKey maybe.Maybe[[]byte],
	keyLimit int,
) (*merkledb.ChangeProof, error)

func (*DBClient) GetMerkleRoot

func (c *DBClient) GetMerkleRoot(ctx context.Context) (ids.ID, error)

func (*DBClient) GetProof

func (c *DBClient) GetProof(ctx context.Context, key []byte) (*merkledb.Proof, error)

func (*DBClient) GetRangeProofAtRoot

func (c *DBClient) GetRangeProofAtRoot(
	ctx context.Context,
	rootID ids.ID,
	startKey maybe.Maybe[[]byte],
	endKey maybe.Maybe[[]byte],
	keyLimit int,
) (*merkledb.RangeProof, error)

func (*DBClient) VerifyChangeProof

func (c *DBClient) VerifyChangeProof(
	ctx context.Context,
	proof *merkledb.ChangeProof,
	startKey maybe.Maybe[[]byte],
	endKey maybe.Maybe[[]byte],
	expectedRootID ids.ID,
) error

type DBServer

type DBServer struct {
	pb.UnsafeDBServer
	// contains filtered or unexported fields
}

func NewDBServer

func NewDBServer(db sync.DB) *DBServer

func (*DBServer) Clear

func (*DBServer) CommitChangeProof

func (s *DBServer) CommitChangeProof(
	ctx context.Context,
	req *pb.CommitChangeProofRequest,
) (*emptypb.Empty, error)

func (*DBServer) CommitRangeProof

func (s *DBServer) CommitRangeProof(
	ctx context.Context,
	req *pb.CommitRangeProofRequest,
) (*emptypb.Empty, error)

func (*DBServer) GetChangeProof

func (s *DBServer) GetChangeProof(
	ctx context.Context,
	req *pb.GetChangeProofRequest,
) (*pb.GetChangeProofResponse, error)

func (*DBServer) GetMerkleRoot

func (s *DBServer) GetMerkleRoot(
	ctx context.Context,
	_ *emptypb.Empty,
) (*pb.GetMerkleRootResponse, error)

func (*DBServer) GetProof

func (s *DBServer) GetProof(
	ctx context.Context,
	req *pb.GetProofRequest,
) (*pb.GetProofResponse, error)

func (*DBServer) GetRangeProof

func (s *DBServer) GetRangeProof(
	ctx context.Context,
	req *pb.GetRangeProofRequest,
) (*pb.GetRangeProofResponse, error)

func (*DBServer) VerifyChangeProof

func (s *DBServer) VerifyChangeProof(
	ctx context.Context,
	req *pb.VerifyChangeProofRequest,
) (*pb.VerifyChangeProofResponse, error)

Jump to

Keyboard shortcuts

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