server

package
v0.0.0-...-c1e5b24 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 7 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, disabledServices ...string) (*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, service 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