httpserver

package
v0.7.16 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: EPL-1.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package httpserver adapts Clojure Ring handlers to Go's HTTP server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is a running Ring-compatible HTTP server.

func Start

func Start(handler interface{}, host string, port int) (*Server, error)

Start listens on host:port and serves requests with handler. Port 0 asks the operating system to choose an available port.

func (*Server) Host

func (s *Server) Host() string

Host returns the bound listener host.

func (*Server) Port

func (s *Server) Port() int

Port returns the bound listener port.

func (*Server) Stop

func (s *Server) Stop() error

Stop gracefully stops the server.

func (*Server) Wait

func (s *Server) Wait() error

Wait blocks until the server stops.

Jump to

Keyboard shortcuts

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