# Functions
Init initializes the logging for the api package.
NewElectionService creates a new instance of ElectionService with the provided peer.
NewRepositoryService creates a new instance of RepositoryService.
StartServer starts a gRPC server for handling peer-to-peer communication The server provides services for managing elections and repositories
Context ctx is used for setting timeouts and detecting context cancellation for graceful shutdown of the server Parameter peer represents the local peer instance through which the server operates Parameter git represents the Git operations interface for managing repositories
It returns an error if the server fails to start or encounters any issues during operation.
# Structs
ElectionService provides methods to handle leader election and leader announcement in the peer-to-peer network.
RepositoryService implements the gRPC service for managing repositories.