kserve

package
v0.0.0-...-9c55465 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OnBeforeRoute = "app.route.before"
	OnAfterRoute  = "app.route.after"
	OnServerStart = "app.server.start"
	OnServerClose = "app.server.close"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServer

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

HTTPServer an HTTP web server

func NewHTTPServer

func NewHTTPServer(address ...string) *HTTPServer

NewHTTPServer create new HTTPServer.

Usage:

srv := NewHTTPServer("127.0.0.1")
srv := NewHTTPServer("127.0.0.1:8090")
srv := NewHTTPServer("127.0.0.1", "8090")

func (*HTTPServer) IsRunning

func (s *HTTPServer) IsRunning() bool

IsRunning get server is running

func (*HTTPServer) PidFile

func (s *HTTPServer) PidFile() string

PidFile get pid file path

func (*HTTPServer) ProcessID

func (s *HTTPServer) ProcessID() int

ProcessID return

func (*HTTPServer) RealAddr

func (s *HTTPServer) RealAddr() string

RealAddr get resolved read addr

func (*HTTPServer) SetPidFile

func (s *HTTPServer) SetPidFile(pidFile string)

SetPidFile set pid file path

func (*HTTPServer) Shutdown

func (s *HTTPServer) Shutdown(timeout int) error

Shutdown from internal

func (*HTTPServer) Start

func (s *HTTPServer) Start() error

Start server, begin handle HTTP request

func (*HTTPServer) Stop

func (s *HTTPServer) Stop(timeout int) error

Stop by send signal to exist process

type WebApp

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

WebApp struct

func NewWebApp

func NewWebApp() *WebApp

Jump to

Keyboard shortcuts

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