info

package
v16.11.10 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(
	conf config.Config,
	logger log.Logger,
	rs datastore.RepositoryStore,
	assignmentStore AssignmentStore,
	conns service.Connections,
	primaryGetter PrimaryGetter,
) gitalypb.PraefectInfoServiceServer

NewServer creates a new instance of a grpc InfoServiceServer

Types

type AssignmentStore

type AssignmentStore interface {
	// GetHostAssignments returns the names of the storages assigned to host the repository.
	// The primary node must always be assigned.
	GetHostAssignments(ctx context.Context, virtualStorage string, repositoryID int64) ([]string, error)
	// SetReplicationFactor sets a repository's replication factor and returns the current assignments.
	SetReplicationFactor(ctx context.Context, virtualStorage, relativePath string, replicationFactor int) ([]string, error)
}

AssignmentStore is an interface for getting repository host node assignments.

This duplicates the praefect.AssignmentGetter type as it is not possible to import anything from `praefect` to `info` packages due to cyclic dependencies.

type PrimaryGetter

type PrimaryGetter interface {
	// GetPrimary returns the primary storage for a given repository.
	GetPrimary(ctx context.Context, virtualStorage string, repositoryID int64) (string, error)
}

PrimaryGetter is an interface for getting a primary of a repository.

This duplicates the praefect.PrimaryGetter type as it is not possible to import anything from `praefect` to `info` packages due to cyclic dependencies.

type Server

type Server struct {
	gitalypb.UnimplementedPraefectInfoServiceServer
	// contains filtered or unexported fields
}

Server is a InfoService server

func (*Server) Dataloss added in v16.4.0

Dataloss implements the Dataloss RPC to return data about repositories that are outdated.

func (*Server) GetRepositoryMetadata

GetRepositoryMetadata returns the cluster metadata for a repository.

func (*Server) MarkUnverified

MarkUnverified marks replicas as unverified. See the protobuf declarations for details.

func (*Server) RepositoryReplicas

RepositoryReplicas returns a list of repositories that includes the checksum of the primary as well as the replicas

Jump to

Keyboard shortcuts

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