bertyreplication

package
v2.357.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0, MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBForTests

func DBForTests(t testing.TB, logger *zap.Logger) (*gorm.DB, func())

func TestHelperNewReplicationService

func TestHelperNewReplicationService(ctx context.Context, t *testing.T, logger *zap.Logger, mn libp2p_mocknet.Mocknet, rdvp peer.AddrInfo, ds datastore.Batching, db *gorm.DB) (*replicationService, context.CancelFunc)

Types

type BertyOrbitDB

type BertyOrbitDB interface {
	OpenGroupReplication(ctx context.Context, g *protocoltypes.Group, options *orbitdb.CreateDBOptions) (iface.Store, iface.Store, error)
	IsGroupLoaded(groupID string) bool
}

type ReplicationClient

type ReplicationClient interface {
	replicationtypes.ReplicationServiceClient

	Close() error
}

type ReplicationService

type ReplicationService interface {
	replicationtypes.ReplicationServiceServer

	Close() error
}

func NewReplicationService

func NewReplicationService(ctx context.Context, db *gorm.DB, odb BertyOrbitDB, logger *zap.Logger) (ReplicationService, error)

type TestingReplicationPeer

type TestingReplicationPeer struct {
	Service ReplicationService
}

func NewReplicationMockedPeer

func NewReplicationMockedPeer(ctx context.Context, t *testing.T, secret []byte, sk ed25519.PublicKey, opts *bertyprotocol.TestingOpts) (*TestingReplicationPeer, func())

Jump to

Keyboard shortcuts

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