server

package
v2.0.0-...-44dd1c6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Addr       string
	KeyFile    string
	CertFile   string
	ServerOpts []server.OptionFn
}

type Server

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

func NewServer

func NewServer(opts *Options) (*Server, error)

func (*Server) Addr

func (s *Server) Addr() string

Addr 监听地址

func (*Server) Endpoint

func (s *Server) Endpoint() *endpoint.Endpoint

Endpoint 获取服务端口

func (*Server) RegisterService

func (s *Server) RegisterService(desc, ss interface{}) error

RegisterService 注册服务

func (*Server) Scheme

func (s *Server) Scheme() string

Scheme 协议

func (*Server) Start

func (s *Server) Start() error

Start 启动服务器

func (*Server) Stop

func (s *Server) Stop() error

Stop 停止服务器

Jump to

Keyboard shortcuts

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