killserver

package
v0.0.0-...-cc466af Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Port = ":19999"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KillServer

type KillServer struct {
	Server http.Server
	// contains filtered or unexported fields
}

KillServer is struct used to cancel a context of web service, that listens on a specific port.

func NewKillServer

func NewKillServer(addr string, cancel context.CancelFunc) *KillServer

NewKillServer initializes a KillServer at a specific address/port and the cancel context of said web service.

func (*KillServer) ServeHTTP

func (s *KillServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP should write reply headers and data to the ResponseWriter and then return.

func (*KillServer) Start

func (s *KillServer) Start()

Start starts the ListenAndServe of the KillServer server

Jump to

Keyboard shortcuts

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