Documentation
¶
Index ¶
- Constants
- func NewPool() *sync.Pool
- type Config
- type HttpBodyAddInfluxdbDatabase
- type HttpBodyAddInfluxdbMetric
- type HttpBodyAddInfluxdbMetricRoute
- type HttpBodyAddInfluxdbNode
- type HttpBodyAddTask
- type HttpResponse
- type Service
- func (s *Service) AddInfluxdbDatabase(w http.ResponseWriter, r *http.Request)
- func (s *Service) AddInfluxdbMetric(w http.ResponseWriter, r *http.Request)
- func (s *Service) AddInfluxdbMetricRoute(w http.ResponseWriter, r *http.Request)
- func (s *Service) AddInfluxdbNode(w http.ResponseWriter, r *http.Request)
- func (s *Service) AddTask(w http.ResponseWriter, r *http.Request)
- func (s *Service) Close() error
- func (s *Service) Open() error
- func (s *Service) SendToInfluxdb(w http.ResponseWriter, r *http.Request)
- func (s *Service) SendToKafka(w http.ResponseWriter, r *http.Request)
- func (s *Service) SetInfluxdbService(is *influxdb.Service)
- func (s *Service) SetKafkaService(ks *kafka.Service)
- func (s *Service) WithLogger(logger *zap.Logger)
- type Statistics
Constants ¶
View Source
const ( DefaultAddr = ":1409" DefaultWriteTimeout = util.Duration(1000 * time.Millisecond) DefaultReadTimeout = util.Duration(1000 * time.Millisecond) DefaultReadHeaderTimeout = util.Duration(1000 * time.Millisecond) DefaultIdleTimeout = util.Duration(1000 * time.Millisecond) DefaultCloseTimeout = util.Duration(5 * time.Second) DefaultMonitorInterval = util.Duration(10 * time.Second) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Addr string `yaml:"Addr,omitempty" mapstructure:"Addr,omitempty"`
WriteTimeout util.Duration `yaml:"WriteTimeout,omitempty" mapstructure:"WriteTimeout,omitempty"`
ReadTimeout util.Duration `yaml:"ReadTimeout,omitempty" mapstructure:"ReadTimeout,omitempty"`
ReadHeaderTimeout util.Duration `yaml:"ReadHeaderTimeout,omitempty" mapstructure:"ReadHeaderTimeout,omitempty"`
IdleTimeout util.Duration `yaml:"IdleTimeout,omitempty" mapstructure:"IdleTimeout,omitempty"`
CloseTimeout util.Duration `yaml:"CloseTimeout,omitempty" mapstructure:"CloseTimeout,omitempty"`
MonitorInterval util.Duration `yaml:"MonitorInterval,omitempty" mapstructure:"MonitorInterval,omitempty"`
}
type HttpBodyAddInfluxdbNode ¶
type HttpBodyAddTask ¶
type HttpResponse ¶
type HttpResponse struct {
// contains filtered or unexported fields
}
func GetResponseWrapper ¶
func GetResponseWrapper() *HttpResponse
func (*HttpResponse) Free ¶
func (hr *HttpResponse) Free()
func (*HttpResponse) GetResponse ¶
func (hr *HttpResponse) GetResponse() *response
func (*HttpResponse) SetData ¶
func (hr *HttpResponse) SetData(d interface{})
func (*HttpResponse) SetMessage ¶
func (hr *HttpResponse) SetMessage(m string)
func (*HttpResponse) SetSuccess ¶
func (hr *HttpResponse) SetSuccess(s bool)
type Service ¶
type Service struct {
Config Config
Closing chan struct{}
Closed chan struct{}
Logger *zap.Logger
// contains filtered or unexported fields
}
func (*Service) AddInfluxdbDatabase ¶
func (s *Service) AddInfluxdbDatabase(w http.ResponseWriter, r *http.Request)
func (*Service) AddInfluxdbMetric ¶
func (s *Service) AddInfluxdbMetric(w http.ResponseWriter, r *http.Request)
func (*Service) AddInfluxdbMetricRoute ¶
func (s *Service) AddInfluxdbMetricRoute(w http.ResponseWriter, r *http.Request)
func (*Service) AddInfluxdbNode ¶
func (s *Service) AddInfluxdbNode(w http.ResponseWriter, r *http.Request)
func (*Service) SendToInfluxdb ¶
func (s *Service) SendToInfluxdb(w http.ResponseWriter, r *http.Request)
func (*Service) SendToKafka ¶
func (s *Service) SendToKafka(w http.ResponseWriter, r *http.Request)
func (*Service) SetInfluxdbService ¶
func (*Service) SetKafkaService ¶
func (*Service) WithLogger ¶
Click to show internal directories.
Click to hide internal directories.