service

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 36 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(registry *plugin.Registry) error

Types

type ControlCode added in v0.9.0

type ControlCode int
const (
	ControlCodeGracefulShutdown ControlCode = iota
	ControlCodeImmediateShutdown
	ControlCodeForkChild
)

type Options

type Options struct {
	ApiPort      int
	ApiInterface string

	PidPath string
	Port    int

	Interface string
	CertPath  string

	Engine string

	EtcdApiVersion          int
	EtcdNodes               listOptions
	EtcdKey                 string
	EtcdCaFile              string
	EtcdCertFile            string
	EtcdKeyFile             string
	EtcdConsistency         string
	EtcdSyncIntervalSeconds int64
	EtcdUsername            string
	EtcdPassword            string
	EtcdInsecureSkipVerify  bool
	EtcdEnableTLS           bool
	EtcdDebug               bool

	Log          string
	LogSeverity  SeverityFlag
	LogFormatter log.Formatter // if set, .Log will be ignored

	ServerReadTimeout    time.Duration
	ServerWriteTimeout   time.Duration
	ServerMaxHeaderBytes int

	EndpointDialTimeout time.Duration
	EndpointReadTimeout time.Duration

	SealKey string

	StatsdAddr    string
	StatsdPrefix  string
	MetricsClient metrics.Client

	DefaultListener    bool
	TrustForwardHeader bool

	MemProfileRate int

	EnableJaegerTracing bool
	DebugJaegerTracing  bool
	Aliases             mapOptions
}

func ParseCommandLine

func ParseCommandLine() (options Options, err error)

type Service

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

func NewService

func NewService(options Options, registry *plugin.Registry) *Service

func (*Service) GetAPIFile

func (s *Service) GetAPIFile() (*proxy.FileDescriptor, error)

func (*Service) Start

func (s *Service) Start(controlC chan ControlCode) error

type SeverityFlag added in v0.9.0

type SeverityFlag struct {
	S log.Level
}

func (*SeverityFlag) Get added in v0.9.0

func (s *SeverityFlag) Get() interface{}

func (*SeverityFlag) Set added in v0.9.0

func (s *SeverityFlag) Set(value string) error

Set is part of the flag.Value interface.

func (*SeverityFlag) String added in v0.9.0

func (s *SeverityFlag) String() string

Jump to

Keyboard shortcuts

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