Documentation
¶
Index ¶
- Constants
- type Config
- type Service
- func (s *Service) APIAddDatabase(nodeID int64, dbName string) error
- func (s *Service) APIAddMetric(metricName string, seriesLimit int) error
- func (s *Service) APIAddMetricRoute(metricId int64, nodeDBId int64) error
- func (s *Service) APIAddNode(ip string, httpPort int, udpPort int, dataPath string) error
- func (s *Service) AddTask(name string, taskType int, content string) error
- func (s *Service) Close() error
- func (s *Service) GetMetricByID(id int64) (*Metric, error)
- func (s *Service) GetNodeByID(id int64) (*Node, error)
- func (s *Service) GetNodeDBByID(id int64) (*NodeDB, error)
- func (s *Service) Open() error
- func (s *Service) Send(lines []byte) error
- func (s *Service) WithLogger(logger *zap.Logger)
- type Statistics
Constants ¶
View Source
const (
DefaultMonitorInterval = util.Duration(10 * time.Second)
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Service ¶
type Service struct {
Config Config
DB *db.DB
ClientMap sync.Map
MetricMap sync.Map
Logger *zap.Logger
Closing chan struct{}
Closed chan struct{}
// contains filtered or unexported fields
}
func (*Service) APIAddDatabase ¶
func (*Service) APIAddMetric ¶
func (*Service) APIAddMetricRoute ¶
func (*Service) APIAddNode ¶
func (*Service) GetMetricByID ¶
func (*Service) GetNodeByID ¶
func (*Service) GetNodeDBByID ¶
func (*Service) WithLogger ¶
type Statistics ¶
Click to show internal directories.
Click to hide internal directories.