Help us shape the future of Go! Take the 2026 Go Developer Survey

api

package
v1.3.100 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2026 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package api pkg/deployment/monitor/api/api.go c2-net-monitor

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	http.Handler
	// contains filtered or unexported fields
}

API register all the API endpoints. It implements a net/http.Handler.

func New

func New(s store.Store, logger *logging.Logger, urls ServicesURLs, config NetworkMonitorConfig) *API

New returns a new *chi.Mux object, which can be started as a server

func (*API) InitCleaningLoop

func (api *API) InitCleaningLoop(ctx context.Context)

InitCleaningLoop 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"`
}

HealthCheckResponse is struct of /health endpoint

type NetworkMonitorConfig

type NetworkMonitorConfig struct {
	CleaningDelay int
	PublicKey     cipher.PubKey
	SecretKey     cipher.SecKey
	Signature     cipher.Sig
}

NetworkMonitorConfig contains configuration for network monitoring.

type ServicesURLs

type ServicesURLs struct {
	TPD   string
	DMSGD string
	SD    string
	AR    string
	UT    string
}

ServicesURLs is struct for organize URL of services

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL