server

package
v0.0.0-...-05d1c7e Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Endpoints

func Endpoints() pb.Endpoints

Endpoints application domain

func GRPCServerOptions

func GRPCServerOptions() []grpctransport.ServerOption

GRPCServerOptions GRPC 服务传输选项

func HTTPServerOptions

func HTTPServerOptions() []httptransport.ServerOption

HTTPServerOptions GRPC 服务传输选项

func Interrupt

func Interrupt(errc chan<- error)

Interrupt server interrupt

func NATSSubscriberOptions

func NATSSubscriberOptions() []natstransport.SubscriberOption

NATSSubscriberOptions NATS 订阅器选项

func NewEndpoints

func NewEndpoints(svc pb.StartServer) pb.Endpoints

func Run

func Run(cfg Config)

Run starts a new http server, gRPC server, and a debug server with the passed config and logger

Types

type Config

type Config struct {
	HTTPAddr  string
	DebugAddr string
	GRPCAddr  string
	NATSAddr  string
	Debug     bool
}

Config contains the required fields for running a server

Jump to

Keyboard shortcuts

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