skeleton

package module
v0.0.0-...-c3891b0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

README

skeleton

A simple skeleton server where we document our conventions through real code.

Build Status codecov Go Report Card Apache V2 License PkgGoDev

Summary

The skeleton server is the place where we can define what our servers should look like and how we assemble them. It is intentionally simple so that doing a few important things is both simple and clear. This has the following benefits:

  1. It's easy to see what we want to do.
  2. It's easy to proove that it will work.
  3. It's a good base for new servers that will be built.

Details

Add details here.

Install

Add details here.

Contributing

Refer to CONTRIBUTING.md.

Code of Conduct

This project and everyone participating in it are governed by the XMiDT Code Of Conduct. By participating, you agree to this Code.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(args []string, run bool) error

Types

type CLI

type CLI struct {
	Dev   bool     `optional:"" short:"d" help:"Run in development mode."`
	Show  bool     `optional:"" short:"s" help:"Show the configuration and exit."`
	Graph string   `optional:"" short:"g" help:"Output the dependency graph to the specified file."`
	Files []string `optional:"" short:"f" help:"Specific configuration files or directories."`
}

CLI is the structure that is used to capture the command line arguments.

type Config

type Config struct {
	Logging           sallust.Config
	Tracing           candlelight.Config
	Prometheus        touchstone.Config
	PrometheusHandler touchhttp.Config
	Servers           Servers
	Routes            Routes
	Auth              apiauth.Config
	Oker              oker.Config
}

Config is the top level configuration for the notus service. Everything is contained in this structure or it will intentially cause a failure.

type HealthPath

type HealthPath string

type HealthServer

type HealthServer struct {
	HTTP arrangehttp.ServerConfig
	Path HealthPath //`validate:"empty=false"`
}

type MetricsPath

type MetricsPath string

type MetricsServer

type MetricsServer struct {
	HTTP arrangehttp.ServerConfig
	Path MetricsPath //`validate:"empty=false"`
}

type PprofPathPrefix

type PprofPathPrefix string

type PprofServer

type PprofServer struct {
	HTTP arrangehttp.ServerConfig
	Path PprofPathPrefix
}

type PrimaryServer

type PrimaryServer struct {
	HTTP arrangehttp.ServerConfig
}

type Route

type Route struct {
	Path   string `validate:"empty=false"`
	Server string `validate:"one_of=primary,alternate"`
}

type Routes

type Routes struct {
	Oker Route
}

type RoutesIn

type RoutesIn struct {
	fx.In
	PrimaryMetrics   touchhttp.ServerInstrumenter `name:"servers.primary.metrics"`
	AlternateMetrics touchhttp.ServerInstrumenter `name:"servers.alternate.metrics"`
	Routes           Routes
	Oker             *oker.Server
	ApiAuth          *apiauth.Auth
}

type RoutesOut

type RoutesOut struct {
	fx.Out
	Primary   arrangehttp.Option[http.Server] `group:"servers.primary.options"`
	Alternate arrangehttp.Option[http.Server] `group:"servers.alternate.options"`
}

type Servers

type Servers struct {
	Health    HealthServer
	Metrics   MetricsServer
	Pprof     PprofServer
	Primary   PrimaryServer
	Alternate PrimaryServer
}

Directories

Path Synopsis
cmd
skeleton command
internal
log

Jump to

Keyboard shortcuts

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