server

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ENV_DEBUG      = "debug"
	ENV_PRODUCTION = "production"
)
View Source
var DefaultConfig = &Config{

	UnaryInterceptor:  []grpc.UnaryServerInterceptor{},
	StreamInterceptor: []grpc.StreamServerInterceptor{},
	ServerOpts:        []grpc.ServerOption{},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Env  string
	Name string
	Addr string

	UnaryInterceptor  []grpc.UnaryServerInterceptor
	StreamInterceptor []grpc.StreamServerInterceptor

	ServerOpts []grpc.ServerOption
}

公共配置模板

type RpcServer

type RpcServer struct {
	Entry string
	Name  string
	Host  string
	Port  string
	Auth  string //[keyfilepath]:[key]:
}

type Server

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

App App

func New

func New(conf *Config) *Server

func (*Server) Restart

func (e *Server) Restart()

Restart server

func (*Server) Run

func (e *Server) Run()

Run server

func (*Server) Server

func (e *Server) Server() *grpc.Server

func (*Server) Service

func (e *Server) Service() naming.Service

func (*Server) Stop

func (e *Server) Stop()

Stop server

Jump to

Keyboard shortcuts

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