remoteSync

package
v4.7.4 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: BSD-2-Clause, BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRemoteSyncStore

func NewRemoteSyncStore(username, password string, rsCert []byte, rsId *id.ID,
	rsHost *connect.Host, rng csprng.Source) (collective.RemoteStore, error)

NewRemoteSyncStore returns a collective.RemoteStore interface which can be used to interact with a remote sync server. This accepts a username and password for the remote sync server, an ID, a host for the server connection, and an RNG source.

Types

type Comms

type Comms interface {
	Login(host *connect.Host, msg *pb.RsAuthenticationRequest) (
		*pb.RsAuthenticationResponse, error)
	Read(host *connect.Host, msg *pb.RsReadRequest) (*pb.RsReadResponse, error)
	Write(host *connect.Host, msg *pb.RsWriteRequest) (*messages.Ack, error)
	GetLastModified(host *connect.Host, msg *pb.RsReadRequest) (
		*pb.RsTimestampResponse, error)
	GetLastWrite(host *connect.Host, msg *pb.RsLastWriteRequest) (
		*pb.RsTimestampResponse, error)
	ReadDir(host *connect.Host, msg *pb.RsReadRequest) (
		*pb.RsReadDirResponse, error)
}

Comms interface for remote sync, allowing us to mock the comms for testing.

Jump to

Keyboard shortcuts

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