Documentation ¶
Overview ¶
Package endpoint contains a service that is sufficient for pollers to receive their configuration and reception of metrics
Index ¶
- Constants
- func BuildMetricName(entityId, agentId, checkType, checkId, field string) string
- func LoadCertificateFromConfig(cfg *config.EndpointConfig) (*tls.Certificate, error)
- func Run(endpointConfigFilePath string)
- type AgentTracker
- type AgentTrackingError
- type BasicServer
- type EndpointServer
- type Metric
- type MetricsRouter
Constants ¶
View Source
const ( AgentErrorChanSize = 1 GreeterChanSize = 10 RegistrationsChanSize = 10 MetricsPostsChanSize = 50 MetricsStoreChanSize = 50 CheckId = "id" CheckFileSuffix = ".json" )
View Source
const ( ExpectedAgentHeartbeatSec = 60 ConnectionWriteAllowance = 60 * time.Second )
View Source
const (
IncomingChanSize = 100
)
Variables ¶
This section is empty.
Functions ¶
func BuildMetricName ¶
func LoadCertificateFromConfig ¶
func LoadCertificateFromConfig(cfg *config.EndpointConfig) (*tls.Certificate, error)
Types ¶
type AgentTracker ¶
type AgentTracker struct {
// contains filtered or unexported fields
}
func NewAgentTracker ¶
func NewAgentTracker(cfg *config.EndpointConfig) *AgentTracker
func (*AgentTracker) CloseAgentByAddr ¶
func (at *AgentTracker) CloseAgentByAddr(addr net.Addr)
func (*AgentTracker) NewAgentFromHello ¶
func (at *AgentTracker) NewAgentFromHello(frame protocol.Frame, params *protocol.HandshakeParameters, responder *utils.SmartConn) <-chan error
Returns a channel where errors observed about this agent are conveyed
func (*AgentTracker) Start ¶
func (at *AgentTracker) Start(ctx context.Context)
func (*AgentTracker) UseMetricsRouter ¶
func (at *AgentTracker) UseMetricsRouter(mr *MetricsRouter)
type AgentTrackingError ¶
func (AgentTrackingError) Error ¶
func (e AgentTrackingError) Error() string
type BasicServer ¶
type BasicServer struct { Certificate *tls.Certificate BindAddr string *AgentTracker }
func (*BasicServer) ApplyConfig ¶
func (s *BasicServer) ApplyConfig(cfg *config.EndpointConfig) error
func (*BasicServer) ListenAndServe ¶
func (s *BasicServer) ListenAndServe() error
func (*BasicServer) UseMetricsRouter ¶
func (s *BasicServer) UseMetricsRouter(mr *MetricsRouter)
type EndpointServer ¶
type EndpointServer interface { ApplyConfig(cfg *config.EndpointConfig) error UseMetricsRouter(mr *MetricsRouter) ListenAndServe() error }
func NewEndpointServer ¶
func NewEndpointServer(configFilePath string) (EndpointServer, error)
type MetricsRouter ¶
type MetricsRouter struct {
// contains filtered or unexported fields
}
func NewMetricsRouter ¶
func NewMetricsRouter(cfg *config.EndpointConfig) *MetricsRouter
func (*MetricsRouter) Route ¶
func (mr *MetricsRouter) Route(metric Metric)
Click to show internal directories.
Click to hide internal directories.