server

package
v0.0.0-...-d19471d Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2023 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 []grpc.ServerOption
}

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(sd *grpc.ServiceDesc, ss interface{})

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