Documentation ¶
Index ¶
- Constants
- Variables
- func ValidateAddTableFilesRequest(req *remotesapi.AddTableFilesRequest) error
- func ValidateCommitRequest(req *remotesapi.CommitRequest) error
- func ValidateGetDownloadLocsRequest(req *remotesapi.GetDownloadLocsRequest) error
- func ValidateGetRepoMetadataRequest(req *remotesapi.GetRepoMetadataRequest) error
- func ValidateGetUploadLocsRequest(req *remotesapi.GetUploadLocsRequest) error
- func ValidateHasChunksRequest(req *remotesapi.HasChunksRequest) error
- func ValidateListTableFilesRequest(req *remotesapi.ListTableFilesRequest) error
- func ValidateRebaseRequest(req *remotesapi.RebaseRequest) error
- func ValidateRefreshTableFileUrlRequest(req *remotesapi.RefreshTableFileUrlRequest) error
- func ValidateRootRequest(req *remotesapi.RootRequest) error
- type ClientRetriever
- type Commit
- type ConcurrencyParams
- type DB
- func (db *DB) AddPeer(peerID string, conn *grpc.ClientConn) error
- func (db *DB) AdvertiseHead()
- func (db *DB) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)
- func (db *DB) CheckIfCommitPresent(commitHash string) (bool, error)
- func (db *DB) Close() error
- func (db *DB) Commit(commitMsg string) (string, error)
- func (db *DB) DatabaseExists(name string) (bool, error)
- func (db *DB) EnableGRPCServers(server *grpc.Server) error
- func (db *DB) ExecAndCommit(execFunc ExecFunc, commitMsg string) (string, error)
- func (db *DB) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
- func (db *DB) GetAllCommits() ([]Commit, error)
- func (db *DB) GetChunkStore() (chunks.ChunkStore, error)
- func (db *DB) GetClient(peerID string) (*DBClient, error)
- func (db *DB) GetClients() map[string]*DBClient
- func (db *DB) GetFilePath() string
- func (db *DB) GetFirstCommit() (Commit, error)
- func (db *DB) GetLastCommit(branch string) (Commit, error)
- func (db *DB) GetRemote(name string) (Remote, error)
- func (db *DB) GetSqlDB() *sql.DB
- func (db *DB) InitFromPeer(peerID string) error
- func (db *DB) InitLocal() error
- func (db *DB) Initialized() bool
- func (db *DB) Merge(peerID string) error
- func (db *DB) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
- func (db *DB) Pull(peerID string) error
- func (db *DB) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
- func (db *DB) RegisterTableChangeCallback(tableName string, n Notifier)
- func (db *DB) RemovePeer(peerID string) error
- func (db *DB) RequestHeadFromAllPeers()
- func (db *DB) RequestHeadFromPeer(peerID string) error
- func (db *DB) VerifySignatures(peerID string) error
- type DBCache
- type DBClient
- type Database
- type DoltMREnvRetriever
- type DoltSwarmFactory
- type Event
- type ExecFunc
- type HTTPFetcher
- type Notifier
- type Queryer
- type Remote
- type RemoteChunkStore
- func (rcs *RemoteChunkStore) AccessMode() chunks.ExclusiveAccessMode
- func (rcs *RemoteChunkStore) AddTableFilesToManifest(ctx context.Context, fileIdToNumChunks map[string]int) error
- func (rcs *RemoteChunkStore) Close() error
- func (rcs *RemoteChunkStore) Commit(ctx context.Context, current, last hash.Hash) (bool, error)
- func (rcs *RemoteChunkStore) Get(ctx context.Context, h hash.Hash) (chunks.Chunk, error)
- func (rcs *RemoteChunkStore) GetMany(ctx context.Context, hashes hash.HashSet, ...) error
- func (rcs *RemoteChunkStore) GetManyCompressed(ctx context.Context, hashes hash.HashSet, ...) error
- func (rcs *RemoteChunkStore) Has(ctx context.Context, h hash.Hash) (bool, error)
- func (rcs *RemoteChunkStore) HasMany(ctx context.Context, hashes hash.HashSet) (hash.HashSet, error)
- func (rcs *RemoteChunkStore) PersistGhostHashes(ctx context.Context, refs hash.HashSet) error
- func (rcs *RemoteChunkStore) PruneTableFiles(ctx context.Context) error
- func (rcs *RemoteChunkStore) Put(ctx context.Context, c chunks.Chunk, getAddrs chunks.GetAddrsCurry) error
- func (rcs *RemoteChunkStore) Rebase(ctx context.Context) error
- func (rcs *RemoteChunkStore) Root(ctx context.Context) (hash.Hash, error)
- func (rcs *RemoteChunkStore) SetRootChunk(ctx context.Context, root, previous hash.Hash) error
- func (rcs *RemoteChunkStore) Size(ctx context.Context) (uint64, error)
- func (rcs *RemoteChunkStore) Sources(ctx context.Context) (hash.Hash, []chunks.TableFile, []chunks.TableFile, error)
- func (rcs *RemoteChunkStore) Stats() interface{}
- func (rcs *RemoteChunkStore) StatsSummary() string
- func (rcs *RemoteChunkStore) SupportedOperations() chunks.TableFileStoreOps
- func (rcs *RemoteChunkStore) Version() string
- func (rcs *RemoteChunkStore) WriteTableFile(ctx context.Context, fileId string, numChunks int, contentHash []byte, ...) error
- type RemoteSrvStore
- type RemoteTableFile
- type ServerChunkStore
- func (rs *ServerChunkStore) AddTableFiles(ctx context.Context, req *remotesapi.AddTableFilesRequest) (*remotesapi.AddTableFilesResponse, error)
- func (rs *ServerChunkStore) Commit(ctx context.Context, req *remotesapi.CommitRequest) (*remotesapi.CommitResponse, error)
- func (rs *ServerChunkStore) DownloadChunks(req *proto.DownloadChunksRequest, server proto.Downloader_DownloadChunksServer) error
- func (rs *ServerChunkStore) DownloadFile(req *proto.DownloadFileRequest, server proto.Downloader_DownloadFileServer) error
- func (rs *ServerChunkStore) GetDownloadLocations(ctx context.Context, req *remotesapi.GetDownloadLocsRequest) (*remotesapi.GetDownloadLocsResponse, error)
- func (rs *ServerChunkStore) GetRepoMetadata(ctx context.Context, req *remotesapi.GetRepoMetadataRequest) (*remotesapi.GetRepoMetadataResponse, error)
- func (rs *ServerChunkStore) GetUploadLocations(ctx context.Context, req *remotesapi.GetUploadLocsRequest) (*remotesapi.GetUploadLocsResponse, error)
- func (rs *ServerChunkStore) HasChunks(ctx context.Context, req *remotesapi.HasChunksRequest) (*remotesapi.HasChunksResponse, error)
- func (rs *ServerChunkStore) ListTableFiles(ctx context.Context, req *remotesapi.ListTableFilesRequest) (*remotesapi.ListTableFilesResponse, error)
- func (rs *ServerChunkStore) Rebase(ctx context.Context, req *remotesapi.RebaseRequest) (*remotesapi.RebaseResponse, error)
- func (rs *ServerChunkStore) Root(ctx context.Context, req *remotesapi.RootRequest) (*remotesapi.RootResponse, error)
- func (rs *ServerChunkStore) StreamDownloadLocations(stream remotesapi.ChunkStoreService_StreamDownloadLocationsServer) error
- type ServerSyncer
- type Signer
- type SingletonCSCache
- type TAG
- type Tag
Constants ¶
View Source
const ( MaxFetchSize = 128 * 1024 * 1024 HedgeDownloadSizeLimit = 4 * 1024 * 1024 )
View Source
const (
ExternalHeadEvent = "new_head"
)
View Source
const (
FactorySwarm = "swarm"
)
View Source
const RepoPathField = "repo_path"
Variables ¶
View Source
var ErrUnimplemented = errors.New("unimplemented")
Functions ¶
func ValidateAddTableFilesRequest ¶
func ValidateAddTableFilesRequest(req *remotesapi.AddTableFilesRequest) error
func ValidateCommitRequest ¶
func ValidateCommitRequest(req *remotesapi.CommitRequest) error
func ValidateGetDownloadLocsRequest ¶
func ValidateGetDownloadLocsRequest(req *remotesapi.GetDownloadLocsRequest) error
func ValidateGetRepoMetadataRequest ¶
func ValidateGetRepoMetadataRequest(req *remotesapi.GetRepoMetadataRequest) error
func ValidateGetUploadLocsRequest ¶
func ValidateGetUploadLocsRequest(req *remotesapi.GetUploadLocsRequest) error
func ValidateHasChunksRequest ¶
func ValidateHasChunksRequest(req *remotesapi.HasChunksRequest) error
func ValidateListTableFilesRequest ¶
func ValidateListTableFilesRequest(req *remotesapi.ListTableFilesRequest) error
func ValidateRebaseRequest ¶
func ValidateRebaseRequest(req *remotesapi.RebaseRequest) error
func ValidateRefreshTableFileUrlRequest ¶
func ValidateRefreshTableFileUrlRequest(req *remotesapi.RefreshTableFileUrlRequest) error
func ValidateRootRequest ¶
func ValidateRootRequest(req *remotesapi.RootRequest) error
Types ¶
type ClientRetriever ¶
type ConcurrencyParams ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) AdvertiseHead ¶
func (db *DB) AdvertiseHead()
func (*DB) CheckIfCommitPresent ¶
func (*DB) ExecAndCommit ¶
func (*DB) ExecContext ¶
func (*DB) GetAllCommits ¶
func (*DB) GetChunkStore ¶
func (db *DB) GetChunkStore() (chunks.ChunkStore, error)
func (*DB) GetClients ¶
func (*DB) GetFilePath ¶
func (*DB) GetFirstCommit ¶
func (*DB) InitFromPeer ¶
func (*DB) Initialized ¶
func (*DB) PrepareContext ¶
func (*DB) QueryContext ¶
func (*DB) RegisterTableChangeCallback ¶
func (*DB) RemovePeer ¶
func (*DB) RequestHeadFromAllPeers ¶
func (db *DB) RequestHeadFromAllPeers()
func (*DB) RequestHeadFromPeer ¶
func (*DB) VerifySignatures ¶
type DBCache ¶
type DBCache interface {
Get() (remotesrv.RemoteSrvStore, error)
}
type DBClient ¶
type DBClient struct { proto.DBSyncerClient remotesapi.ChunkStoreServiceClient proto.DownloaderClient // contains filtered or unexported fields }
type DoltMREnvRetriever ¶
type DoltMREnvRetriever interface {
GetMultiRepoEnv() *env.MultiRepoEnv
}
type DoltSwarmFactory ¶
type DoltSwarmFactory struct {
// contains filtered or unexported fields
}
func NewDoltSwarmFactory ¶
func NewDoltSwarmFactory(dbName string, clientRetriever ClientRetriever, logger *logrus.Entry) DoltSwarmFactory
type RemoteChunkStore ¶
type RemoteChunkStore struct {
// contains filtered or unexported fields
}
func NewRemoteChunkStore ¶
func (*RemoteChunkStore) AccessMode ¶
func (rcs *RemoteChunkStore) AccessMode() chunks.ExclusiveAccessMode
func (*RemoteChunkStore) AddTableFilesToManifest ¶
func (*RemoteChunkStore) Close ¶
func (rcs *RemoteChunkStore) Close() error
func (*RemoteChunkStore) GetManyCompressed ¶
func (rcs *RemoteChunkStore) GetManyCompressed(ctx context.Context, hashes hash.HashSet, found func(context.Context, nbs.CompressedChunk)) error
func (*RemoteChunkStore) PersistGhostHashes ¶
func (*RemoteChunkStore) PruneTableFiles ¶
func (rcs *RemoteChunkStore) PruneTableFiles(ctx context.Context) error
func (*RemoteChunkStore) Put ¶
func (rcs *RemoteChunkStore) Put(ctx context.Context, c chunks.Chunk, getAddrs chunks.GetAddrsCurry) error
func (*RemoteChunkStore) SetRootChunk ¶
func (*RemoteChunkStore) Size ¶
func (rcs *RemoteChunkStore) Size(ctx context.Context) (uint64, error)
func (*RemoteChunkStore) Stats ¶
func (rcs *RemoteChunkStore) Stats() interface{}
func (*RemoteChunkStore) StatsSummary ¶
func (rcs *RemoteChunkStore) StatsSummary() string
func (*RemoteChunkStore) SupportedOperations ¶
func (rcs *RemoteChunkStore) SupportedOperations() chunks.TableFileStoreOps
func (*RemoteChunkStore) Version ¶
func (rcs *RemoteChunkStore) Version() string
func (*RemoteChunkStore) WriteTableFile ¶
type RemoteSrvStore ¶
type RemoteTableFile ¶
type RemoteTableFile struct {
// contains filtered or unexported fields
}
RemoteTableFile is an implementation of a TableFile that lives in a DoltChunkStore
func (RemoteTableFile) FileID ¶
func (rtf RemoteTableFile) FileID() string
FileID gets the id of the file
func (RemoteTableFile) LocationPrefix ¶
func (rtf RemoteTableFile) LocationPrefix() string
LocationPrefix
func (RemoteTableFile) NumChunks ¶
func (rtf RemoteTableFile) NumChunks() int
NumChunks returns the number of chunks in a table file
func (RemoteTableFile) Open ¶
func (rtf RemoteTableFile) Open(ctx context.Context) (io.ReadCloser, uint64, error)
Open returns an io.ReadCloser which can be used to read the bytes of a table file.
type ServerChunkStore ¶
type ServerChunkStore struct { remotesapi.UnimplementedChunkStoreServiceServer proto.UnimplementedDownloaderServer // contains filtered or unexported fields }
func NewServerChunkStore ¶
func NewServerChunkStore(logger *logrus.Entry, csCache DBCache, filePath string) *ServerChunkStore
func (*ServerChunkStore) AddTableFiles ¶
func (rs *ServerChunkStore) AddTableFiles(ctx context.Context, req *remotesapi.AddTableFilesRequest) (*remotesapi.AddTableFilesResponse, error)
AddTableFiles updates the remote manifest with new table files without modifying the root hash.
func (*ServerChunkStore) Commit ¶
func (rs *ServerChunkStore) Commit(ctx context.Context, req *remotesapi.CommitRequest) (*remotesapi.CommitResponse, error)
func (*ServerChunkStore) DownloadChunks ¶
func (rs *ServerChunkStore) DownloadChunks(req *proto.DownloadChunksRequest, server proto.Downloader_DownloadChunksServer) error
func (*ServerChunkStore) DownloadFile ¶
func (rs *ServerChunkStore) DownloadFile(req *proto.DownloadFileRequest, server proto.Downloader_DownloadFileServer) error
func (*ServerChunkStore) GetDownloadLocations ¶
func (rs *ServerChunkStore) GetDownloadLocations(ctx context.Context, req *remotesapi.GetDownloadLocsRequest) (*remotesapi.GetDownloadLocsResponse, error)
func (*ServerChunkStore) GetRepoMetadata ¶
func (rs *ServerChunkStore) GetRepoMetadata(ctx context.Context, req *remotesapi.GetRepoMetadataRequest) (*remotesapi.GetRepoMetadataResponse, error)
func (*ServerChunkStore) GetUploadLocations ¶
func (rs *ServerChunkStore) GetUploadLocations(ctx context.Context, req *remotesapi.GetUploadLocsRequest) (*remotesapi.GetUploadLocsResponse, error)
func (*ServerChunkStore) HasChunks ¶
func (rs *ServerChunkStore) HasChunks(ctx context.Context, req *remotesapi.HasChunksRequest) (*remotesapi.HasChunksResponse, error)
func (*ServerChunkStore) ListTableFiles ¶
func (rs *ServerChunkStore) ListTableFiles(ctx context.Context, req *remotesapi.ListTableFilesRequest) (*remotesapi.ListTableFilesResponse, error)
func (*ServerChunkStore) Rebase ¶
func (rs *ServerChunkStore) Rebase(ctx context.Context, req *remotesapi.RebaseRequest) (*remotesapi.RebaseResponse, error)
func (*ServerChunkStore) Root ¶
func (rs *ServerChunkStore) Root(ctx context.Context, req *remotesapi.RootRequest) (*remotesapi.RootResponse, error)
func (*ServerChunkStore) StreamDownloadLocations ¶
func (rs *ServerChunkStore) StreamDownloadLocations(stream remotesapi.ChunkStoreService_StreamDownloadLocationsServer) error
type ServerSyncer ¶
type ServerSyncer struct {
// contains filtered or unexported fields
}
func NewServerSyncer ¶
func NewServerSyncer(logger *logrus.Entry, db *DB) *ServerSyncer
func (*ServerSyncer) AdvertiseHead ¶
func (s *ServerSyncer) AdvertiseHead(ctx context.Context, req *proto.AdvertiseHeadRequest) (*proto.AdvertiseHeadResponse, error)
func (*ServerSyncer) RequestHead ¶
func (s *ServerSyncer) RequestHead(ctx context.Context, req *proto.RequestHeadRequest) (*proto.RequestHeadResponse, error)
type SingletonCSCache ¶
type SingletonCSCache struct {
// contains filtered or unexported fields
}
func NewCSCache ¶
func NewCSCache(s remotesrv.RemoteSrvStore) *SingletonCSCache
func (SingletonCSCache) Get ¶
func (cache SingletonCSCache) Get() (remotesrv.RemoteSrvStore, error)
type TAG ¶
type TAG struct { sq.TableStruct `sq:"dolt_tags"` TAG_NAME sq.StringField TAG_HASH sq.StringField TAGGER sq.StringField EMAIL sq.StringField DATE sq.TimeField MESSAGE sq.StringField }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.