mcp

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPServer

func NewHTTPServer(handler Handler) http.Handler

NewHTTPServer creates a new MCP HTTP server for the observer API

Types

type Handler

type Handler interface {
	GetComponentLogs(ctx context.Context, params opensearch.ComponentQueryParams) (any, error)
	GetProjectLogs(ctx context.Context, params opensearch.QueryParams, componentIDs []string) (any, error)
	GetGatewayLogs(ctx context.Context, params opensearch.GatewayQueryParams) (any, error)
	GetOrganizationLogs(ctx context.Context, params opensearch.QueryParams, podLabels map[string]string) (any, error)
	GetComponentTraces(ctx context.Context, params opensearch.ComponentTracesRequestParams) (any, error)
	GetComponentResourceMetrics(ctx context.Context, componentID, environmentID, projectID, startTime, endTime string) (any, error)
	GetComponentHTTPMetrics(ctx context.Context, componentID, environmentID, projectID, startTime, endTime string) (any, error)
}

type MCPHandler

type MCPHandler struct {
	Service *service.LoggingService
}

func (*MCPHandler) GetComponentHTTPMetrics

func (h *MCPHandler) GetComponentHTTPMetrics(ctx context.Context, componentID, environmentID, projectID, startTime, endTime string) (any, error)

GetComponentHTTPMetrics retrieves HTTP metrics for a component

func (*MCPHandler) GetComponentLogs

func (h *MCPHandler) GetComponentLogs(ctx context.Context, params opensearch.ComponentQueryParams) (any, error)

GetComponentLogs retrieves logs for a specific component

func (*MCPHandler) GetComponentResourceMetrics

func (h *MCPHandler) GetComponentResourceMetrics(ctx context.Context, componentID, environmentID, projectID, startTime, endTime string) (any, error)

GetComponentResourceMetrics retrieves resource usage metrics for a component

func (*MCPHandler) GetComponentTraces

func (h *MCPHandler) GetComponentTraces(ctx context.Context, params opensearch.ComponentTracesRequestParams) (any, error)

GetComponentTraces retrieves distributed tracing spans for a specific component

func (*MCPHandler) GetGatewayLogs

func (h *MCPHandler) GetGatewayLogs(ctx context.Context, params opensearch.GatewayQueryParams) (any, error)

GetGatewayLogs retrieves gateway logs

func (*MCPHandler) GetOrganizationLogs

func (h *MCPHandler) GetOrganizationLogs(ctx context.Context, params opensearch.QueryParams, podLabels map[string]string) (any, error)

GetOrganizationLogs retrieves logs for an entire organization

func (*MCPHandler) GetProjectLogs

func (h *MCPHandler) GetProjectLogs(ctx context.Context, params opensearch.QueryParams, componentIDs []string) (any, error)

GetProjectLogs retrieves logs for a specific project

Jump to

Keyboard shortcuts

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