consoleserve

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 13 Imported by: 1

Documentation

Index

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 WithLogger

func WithLogger(logger glog.ILogger) Option

WithLogger set logger function

func WithProtocol

func WithProtocol(protocol string) Option

WithProtocol set protocol function

func WithServiceName

func WithServiceName(serviceName string) Option

WithServiceName set serviceName function

func WithVersion

func WithVersion(version string) Option

WithVersion set version function

type Server

type Server struct {
	Ctx         context.Context
	Tracer      *tracer.Server
	Logger      glog.ILoggerEntry
	ServiceName string
	Version     string
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Server

func (*Server) AddTrace

func (s *Server) AddTrace(tracer *tracer.Server) *Server

func (*Server) HostInfo added in v0.4.7

func (s *Server) HostInfo() *host.InfoStat

func (*Server) IsDevelopment

func (s *Server) IsDevelopment() bool

func (*Server) IsProduction

func (s *Server) IsProduction() bool

func (*Server) IsTest

func (s *Server) IsTest() bool

func (*Server) PrintHostInfo added in v0.4.6

func (s *Server) PrintHostInfo()

func (*Server) Run

func (s *Server) Run()

func (*Server) SetRunMode

func (s *Server) SetRunMode(mode string)

func (*Server) Shutdown

func (s *Server) Shutdown()

func (*Server) StopNotify

func (s *Server) StopNotify(sig os.Signal)

Jump to

Keyboard shortcuts

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