Documentation ¶
Index ¶
- type Option
- func WithGrpcServerOption(grpcOpt grpc.ServerOption) Option
- func WithGrpcServerOptions(grpcOpts ...grpc.ServerOption) Option
- func WithHost(host string) Option
- func WithLogger(logger glog.ILogger) Option
- func WithPort(port int) Option
- func WithProtocol(protocol string) Option
- func WithServiceName(serviceName string) Option
- func WithTransportCredentials(credentials credentials.TransportCredentials) Option
- func WithVersion(version string) Option
- type Server
- func (s *Server) AddDiscovery(client discovery.Discovery) *Server
- func (s *Server) AddGrpcServerOption(grpcOpt grpc.ServerOption) *Server
- func (s *Server) AddGrpcServerOptions(grpcOpts ...grpc.ServerOption) *Server
- func (s *Server) AddTrace(tracer *tracer.Server) *Server
- func (s *Server) HostInfo() *host.InfoStat
- func (s *Server) IsDevelopment() bool
- func (s *Server) IsProduction() bool
- func (s *Server) IsTest() bool
- func (s *Server) NewServer() *Server
- func (s *Server) PrintHostInfo()
- func (s *Server) Run()
- func (s *Server) SetRunMode(mode string)
- func (s *Server) Shutdown()
- func (s *Server) StopNotify(sig os.Signal)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Server)
Option for queue system
func WithGrpcServerOption ¶
func WithGrpcServerOption(grpcOpt grpc.ServerOption) Option
WithGrpcServerOption set grpc.ServerOption function
func WithGrpcServerOptions ¶
func WithGrpcServerOptions(grpcOpts ...grpc.ServerOption) Option
WithGrpcServerOptions set grpc.ServerOption function
func WithServiceName ¶
WithServiceName set serviceName function
func WithTransportCredentials ¶
func WithTransportCredentials(credentials credentials.TransportCredentials) Option
WithTransportCredentials set credentials.TransportCredentials function
type Server ¶
type Server struct { Ctx context.Context Tracer *tracer.Server Logger glog.ILoggerEntry ServiceName string Host string Port int Version string GServer *grpc.Server // contains filtered or unexported fields }
func (*Server) AddGrpcServerOption ¶
func (s *Server) AddGrpcServerOption(grpcOpt grpc.ServerOption) *Server
AddGrpcServerOption set grpc.ServerOption function
func (*Server) AddGrpcServerOptions ¶
func (s *Server) AddGrpcServerOptions(grpcOpts ...grpc.ServerOption) *Server
AddGrpcServerOptions set grpc.ServerOption function
func (*Server) IsDevelopment ¶
func (*Server) IsProduction ¶
func (*Server) PrintHostInfo ¶ added in v0.4.6
func (s *Server) PrintHostInfo()
func (*Server) SetRunMode ¶
func (*Server) StopNotify ¶
Click to show internal directories.
Click to hide internal directories.