registry

package
v0.0.0-...-48788f6 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: MIT Imports: 10 Imported by: 0

README

Registry Service

A service registry service. This allows calls to register a new service within the system.

Get started

Build the registry command service server and run it.

go build ./cmd/registryservice
./registryservice

Documentation

Overview

Entry point that allows services to register themselves with the registry.

Index

Constants

View Source
const (
	LogService     = ServiceName("LogService")
	GradingService = ServiceName("GradingService")
	TeacherPortal  = ServiceName("TeacherPortal")
)
View Source
const ServerPort = ":3000"

TODO(moosch): Pull this in from config file or env

View Source
const ServiceURL = "http://localhost" + ServerPort + "/services" // Root endpoint for service queries.

Variables

This section is empty.

Functions

func GetProvider

func GetProvider(name ServiceName) (string, error)

Exposed API

func RegisterService

func RegisterService(r Registration) error

Used by service registry

func SetupRegistryService

func SetupRegistryService()

func ShutdownService

func ShutdownService(serviceURL string) error

Used by service registry

Types

type Registration

type Registration struct {
	ServiceName      ServiceName
	ServiceURL       string
	RequiredServices []ServiceName
	ServiceUpdateURL string
	HeartbeatURL     string
}

type RegistryService

type RegistryService struct{}

func (RegistryService) ServeHTTP

func (s RegistryService) ServeHTTP(w http.ResponseWriter, req *http.Request)

type ServiceName

type ServiceName string

Jump to

Keyboard shortcuts

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