Documentation
¶
Index ¶
- func IsHelpOption(args []string) bool
- func NewConfigHandler(config *Config) http.Handler
- func NewHealthHandler(config *Config) *healthHandler
- func NewProfHandler(config *Config) *profHandler
- func RunApp(Version string, args []string, wg *sync.WaitGroup)
- func RunAppError(Version string, args []string, wg *sync.WaitGroup) error
- func RunAppWithConfig(Version string, args []string, ...)
- func RunAppWithConfigError(Version string, args []string, ...) error
- type Config
- type Options
- type Service
- func (s *Service) Listen() (net.Listener, error)
- func (s *Service) ListenAndServe() error
- func (s *Service) ListenAndServeTLS(certFile, keyFile string) error
- func (s *Service) Metric() *gmetric.Service
- func (s *Service) SelfTest() error
- func (s *Service) Serve(l net.Listener) error
- func (s *Service) Shutdown(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConfigHandler ¶
NewConfigHandler creates a config handler
func NewHealthHandler ¶ added in v0.3.0
func NewHealthHandler(config *Config) *healthHandler
func NewProfHandler ¶ added in v0.4.0
func NewProfHandler(config *Config) *profHandler
func RunAppError ¶ added in v0.4.0
Types ¶
type Config ¶
type Config struct {
config.ModelList `json:",omitempty" yaml:",inline"`
sconfig.DatastoreList `json:",omitempty" yaml:",inline"`
Endpoint econfig.Endpoint
EnableMemProf bool
AllowedSubnet []string `json:",omitempty" yaml:",omitempty"`
}
Config represents an endpoint config
func NewConfigFromURL ¶
NewConfigFromURL creates a new config from URL
func (*Config) LoadFromURL ¶
type Options ¶
type Options struct {
ConfigURL string `short:"c" long:"cfg" description:"config URI"`
Version bool `short:"v" long:"version" description:"indexer version"`
}
Options represents an option
Click to show internal directories.
Click to hide internal directories.