Documentation
¶
Overview ¶
Package api pkg/deployment/ut/api/api.go c4-net-discovery
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
API register all the API endpoints. It implements a net/http.Handler.
func New ¶
func New(log logrus.FieldLogger, s store.Store, nonceStore httpauth.NonceStore, locDetails geo.LocationDetails, enableLoadTesting, enableMetrics bool, m utmetrics.Metrics, storeDataCutoff int, storeDataPath, dmsgAddr string) *API
New constructs a new API instance.
func (*API) RunBackgroundTasks ¶
func (api *API) RunBackgroundTasks(ctx context.Context, logger logrus.FieldLogger)
RunBackgroundTasks is function which runs periodic background tasks of API.
type Error ¶
type Error struct {
Error string `json:"error"`
}
Error is the object returned to the client when there's an error.
type HealthCheckResponse ¶
type HealthCheckResponse struct {
ServiceName string `json:"service_name,omitempty"`
BuildInfo *buildinfo.Info `json:"build_info,omitempty"`
StartedAt time.Time `json:"started_at,omitempty"`
DmsgAddr string `json:"dmsg_address,omitempty"`
DmsgServers []string `json:"dmsg_servers,omitempty"`
}
HealthCheckResponse is struct of /health endpoint
type PrivateAPI ¶
PrivateAPI register all the PrivateAPI endpoints. It implements a net/http.Handler.
func NewPrivate ¶
func NewPrivate(log logrus.FieldLogger, s store.Store) *PrivateAPI
NewPrivate constructs a new PrivateAPI instance.
Click to show internal directories.
Click to hide internal directories.