info

package
v14.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(
	conf config.Config,
	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) DatalossCheck

nolint: revive,stylecheck // This is unintentionally missing documentation.

func (*Server) GetRepositoryMetadata added in v14.6.0

GetRepositoryMetadata returns the cluster metadata for a repository.

func (*Server) RepositoryReplicas

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

func (*Server) SetAuthoritativeStorage

nolint: revive,stylecheck // This is unintentionally missing documentation.

func (*Server) SetReplicationFactor

nolint: revive,stylecheck // This is unintentionally missing documentation.

Jump to

Keyboard shortcuts

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