api

package
v0.0.0-...-6d305d8 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package api implements the internal Agent API which exposes endpoints such as config, flare or status

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentEndpointProvider

type AgentEndpointProvider struct {
	fx.Out

	Provider EndpointProvider `group:"agent_endpoint"`
}

AgentEndpointProvider is the provider for registering endpoints to the internal agent api server

func NewAgentEndpointProvider

func NewAgentEndpointProvider(handlerFunc http.HandlerFunc, route string, methods ...string) AgentEndpointProvider

NewAgentEndpointProvider returns a AgentEndpointProvider to register the endpoint provided to the internal agent api server

type Component

type Component interface {
	StartServer(
		senderManager sender.DiagnoseSenderManager,
	) error
	StopServer()
	ServerAddress() *net.TCPAddr
}

Component is the component type.

type EndpointProvider

type EndpointProvider struct {
	HandlerFunc http.HandlerFunc

	Methods []string
	Route   string
}

EndpointProvider is an interface to register api endpoints

Directories

Path Synopsis
Package apiimpl implements the internal Agent API which exposes endpoints such as config, flare or status
Package apiimpl implements the internal Agent API which exposes endpoints such as config, flare or status
internal/agent
Package agent implements the api endpoints for the `/agent` prefix.
Package agent implements the api endpoints for the `/agent` prefix.
internal/check
Package check implements the api endpoints for the `/check` prefix.
Package check implements the api endpoints for the `/check` prefix.
internal/config
Package config defines the config endpoint of the IPC API Server.
Package config defines the config endpoint of the IPC API Server.
utils
Package utils implements utility functions for the API servers
Package utils implements utility functions for the API servers
Package utils has common utility methods that components can use for structuring http responses of their endpoints
Package utils has common utility methods that components can use for structuring http responses of their endpoints

Jump to

Keyboard shortcuts

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