server

package
v0.0.0-...-069db6f Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcClientConfig

type GrpcClientConfig struct {
	TraceEnable bool
	HostPort    string
}

client配置信息

func GrpcClientRawConfig

func GrpcClientRawConfig(name string) GrpcClientConfig

func GrpcClientStdConfig

func GrpcClientStdConfig(name string) GrpcClientConfig

func (GrpcClientConfig) Build

func (config GrpcClientConfig) Build() (*grpc.ClientConn, io.Closer)

type GrpcServerConfig

type GrpcServerConfig struct {
	TraceEnable bool
	Port        int
	Protocol    string
}

server配置信息

func GrpcServerStdConfig

func GrpcServerStdConfig() GrpcServerConfig

func (GrpcServerConfig) Build

func (config GrpcServerConfig) Build() *grpc.Server

type XServer

type XServer struct {
	Name string
	Run  func()
}

自定义server

type XServerConfig

type XServerConfig struct {
	Name string
}

func StdConfig

func StdConfig(serverName string) XServerConfig

标准配置

func (XServerConfig) Build

func (stdConfig XServerConfig) Build(fun func()) (*XServer, error)

Jump to

Keyboard shortcuts

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