service

package
v0.0.0-...-9750751 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultListenerName = "default"
	DefaultConfig       = Config{
		ShutdownWaitTime:    util.Duration{kDefaultShutdownWaitTime},
		ThrottlingDelayTime: util.Duration{kDefaultThrottlingDelayTime},
		IO: io.InboundConfigMap{
			DefaultListenerName: io.DefaultInboundConfig,
		},
	}
)

Functions

func NewService

func NewService(cfg Config, reqHandler io.IRequestHandler) (*Service, SuspendFunc)

Types

type ChildInfo

type ChildInfo struct {
	Id  int
	Cmd *exec.Cmd
}

type Config

type Config struct {
	Listener            []io.ListenerConfig
	ShutdownWaitTime    util.Duration
	ThrottlingDelayTime util.Duration
	IO                  io.InboundConfigMap
}

func (*Config) GetIoConfig

func (cfg *Config) GetIoConfig(lsnr *io.ListenerConfig) io.InboundConfig

func (*Config) IsSSLEnabled

func (cfg *Config) IsSSLEnabled() bool

func (*Config) SetDefaultIfNotDefined

func (cfg *Config) SetDefaultIfNotDefined()

func (*Config) SetListeners

func (cfg *Config) SetListeners(values []string)

func (*Config) Validate

func (cfg *Config) Validate() (err error)

type ILimiter

type ILimiter interface {
	LimitReached() bool
	Throttle()
}

type ServerManager

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

func NewServerManager

func NewServerManager(num int, path string, args []string, cfg Config, httpMonAddr string, cloudEnabled bool) *ServerManager

func (*ServerManager) Run

func (s *ServerManager) Run()

type Service

type Service struct {
	Zoneid int
	// contains filtered or unexported fields
}

func New

func New(config Config, reqHandler io.IRequestHandler, listeners ...io.IListener) (service *Service)

func NewWithLimiterAndListenFd

func NewWithLimiterAndListenFd(cfg Config, reqHandler io.IRequestHandler, limiter ILimiter, fds ...*os.File) (service *Service)

func NewWithListenFd

func NewWithListenFd(cfg Config, reqHandler io.IRequestHandler, fds ...*os.File) (service *Service)

func (*Service) GetListeners

func (s *Service) GetListeners() []io.IListener

func (*Service) Run

func (s *Service) Run()

func (*Service) Shutdown

func (s *Service) Shutdown()

type SuspendFunc

type SuspendFunc func(b bool)

Jump to

Keyboard shortcuts

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