server

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package server provides a simple HTTP server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Server

func Server(port int, dsn string)

Server starts HTTP server

Types

type StatusResponse

type StatusResponse struct {
	// Hostname is a hostname of the server
	Hostname string `json:"hostname"`

	// StartedTimestamp is a timestamp when server was started
	StartedTimestamp int64 `json:"started_timestamp"`

	// Uptime is a number of seconds since server was started
	Uptime int64 `json:"uptime"`
}

StatusResponse is a response for /status endpoint

Jump to

Keyboard shortcuts

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