Documentation
¶
Overview ¶
Copyright 2021 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
View Source
const (
IntegrationName = "api"
)
Variables ¶
View Source
var ErrServerStopped = errors.New("server stopped")
Functions ¶
This section is empty.
Types ¶
type ComponentConfig ¶
type ComponentConfig struct {
// contains filtered or unexported fields
}
ComponentConfig stores configuration for a server component.
func (*ComponentConfig) Enable ¶
func (sc *ComponentConfig) Enable(host string, port int)
Enable configures and enables a server component.
func (*ComponentConfig) TLS ¶
func (sc *ComponentConfig) TLS(certPath, keyPath string)
TLS configures and enables TLS for a server component.
func (*ComponentConfig) VerifyTLSClient ¶
func (sc *ComponentConfig) VerifyTLSClient(caCertPath string)
VerifyTLSClient configures and enables TLS client certificate validation for a server component.
type Server ¶
type Server struct {
Ingest ComponentConfig
Status ComponentConfig
// contains filtered or unexported fields
}
Server runtime for status API server.
func NewServer ¶
NewServer creates a new API server. Nice2Have: decouple services into path handlers. Separate HTTP API configs should be deprecated if we want to unify under a single server & port.
func (*Server) WaitUntilReady ¶
func (s *Server) WaitUntilReady()
WaitUntilReady blocks the call until server is ready to accept connections.
Click to show internal directories.
Click to hide internal directories.