server

package
v0.0.0-...-58895e1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2017 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 Server

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

Server PRC服务端类型

func NewServer

func NewServer(address string) *Server

NewServer 创建PRC服务端对象

func NewServerByConfig

func NewServerByConfig(conf *ServerConfig) *Server

NewServerByConfig 通过配置创建PRC服务端对象

func (*Server) Serve

func (server *Server) Serve(processor thrift.TProcessor) error

Serve 启动

func (*Server) Stop

func (server *Server) Stop() error

Stop 停止

type ServerConfig

type ServerConfig struct {
	Address       string
	ServiceCentre *ServiceCentre
}

ServerConfig RPC服务端配置

type ServiceCentre

type ServiceCentre struct {
	Servers []string
	Name    string
	Address string
}

ServiceCentre 服务中心配置

Jump to

Keyboard shortcuts

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