gsyncabledb

package
v1.10.4-rc.3 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncableDBClient

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

func NewSyncableDBClient

func NewSyncableDBClient(client pb.SyncableDBClient) *SyncableDBClient

func (*SyncableDBClient) CommitChangeProof

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

func (*SyncableDBClient) CommitRangeProof

func (c *SyncableDBClient) CommitRangeProof(
	ctx context.Context,
	startKey []byte,
	proof *merkledb.RangeProof,
) error

func (*SyncableDBClient) GetChangeProof

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

func (*SyncableDBClient) GetMerkleRoot

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

func (*SyncableDBClient) GetProof

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

func (*SyncableDBClient) GetRangeProofAtRoot

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

func (*SyncableDBClient) VerifyChangeProof

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

type SyncableDBServer

type SyncableDBServer struct {
	pb.UnsafeSyncableDBServer
	// contains filtered or unexported fields
}

func NewSyncableDBServer

func NewSyncableDBServer(db sync.SyncableDB) *SyncableDBServer

func (*SyncableDBServer) CommitChangeProof

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

func (*SyncableDBServer) CommitRangeProof

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

func (*SyncableDBServer) GetChangeProof

func (s *SyncableDBServer) GetChangeProof(
	ctx context.Context,
	req *pb.GetChangeProofRequest,
) (*pb.ChangeProof, error)

func (*SyncableDBServer) GetMerkleRoot

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

func (*SyncableDBServer) GetProof

func (*SyncableDBServer) GetRangeProof

func (*SyncableDBServer) VerifyChangeProof

Jump to

Keyboard shortcuts

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