Documentation
¶
Index ¶
Constants ¶
View Source
const ( ONE_RPC_VERSION = 1 PROTOCOL = "tcp" SvrAcceptTimeout = 500 * time.Millisecond CltDialTimeout = 500 * time.Millisecond CltReadTimeout = 500 * time.Millisecond CltWriteTimeout = 500 * time.Millisecond CltIdleTimeout = 500 * time.Millisecond QueueCap = 10000 TCPReadBuf = 128 * 1024 * 1024 TCPWriteBuf = 128 * 1024 * 1024 CLT_REQ_TIMEOUT = 3 * time.Second NORMAL_BALANCE = "normal" REGISTER_CENTER_ETCD = "etcd" )
View Source
const MAX_INT int32 = 1<<31 - 1
Variables ¶
View Source
var (
ConfPath string
)
Functions ¶
func RegisterService ¶
func RegisterService(name string, serverConf *transport.OneSvrConf, metaInfo ...string) error
func SetRegisterCenter ¶
Types ¶
type ClientConstructor ¶
type ClientConstructor func(name string, conf *transport.OneCltConf) transport.CltProtocol
type OneGlobalConf ¶
type OneGlobalConf struct { LogPath string `yaml:"logpath"` Server map[string]*transport.OneSvrConf `yaml:"server"` Client transport.OneCltConf `yaml:"client"` Registry *registry.RegistryConf `yaml:"registry"` }
type ServiceController ¶
type ServiceController struct {
// contains filtered or unexported fields
}
func NewServiceController ¶
func NewServiceController(name string, constructor ClientConstructor, addrs ...string) (sc *ServiceController, err error)
Directories
¶
Path | Synopsis |
---|---|
example
|
|
tools
|
|
protoc-gen-go
protoc-gen-go is a plugin for the Google protocol buffer compiler to generate Go code.
|
protoc-gen-go is a plugin for the Google protocol buffer compiler to generate Go code. |
protoc-gen-go/grpc
Package grpc outputs gRPC service descriptions in Go code.
|
Package grpc outputs gRPC service descriptions in Go code. |
util
|
|
Click to show internal directories.
Click to hide internal directories.