servers

package
v0.0.0-...-b459b6a Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIVersion = "v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServer

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

HTTPServer 是 HTTP 服务器结构

func NewHTTPServer

func NewHTTPServer(cache *caches.Cache) *HTTPServer

NewHTTPServer 返回一个关于cache的新HTTP服务器

func (*HTTPServer) Run

func (hs *HTTPServer) Run(address string) error

Run 启动服务器

type Server

type Server interface {
	// Run 在address上启动服务器,并返回错误信息
	Run(address string) error
}

Server 是一个服务器结构接口 抽象出一个接口是因为后续会提供TCP服务

Jump to

Keyboard shortcuts

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