restful

package
v0.0.0-...-3f0bd07 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Gobal *gobalContent

Functions

This section is empty.

Types

type Server

type Server struct {

	// 端口号
	Port string
	// 服务状态
	State ServerState
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

NewServer 创建服务

func (*Server) ServerStartedListener

func (s *Server) ServerStartedListener(listener ServerStartedListener) *Server

ServerStartedListener 设置服务启动后的监听程序

func (*Server) Start

func (s *Server) Start()

Start 启动服务

type ServerStartedListener

type ServerStartedListener func(serv *Server)

ServerStartedListener 服务启动后调用的监听程序

type ServerState

type ServerState int

ServerState 服务状态

const (
	// ServerStarting 服务启动中
	ServerStarting ServerState = 1
	// ServerStarted 服务已启动
	ServerStarted ServerState = 2
	// ServerFailed 服务启动失败
	ServerFailed ServerState = 3
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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