mission_control

package
v0.1.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MissionControl

type MissionControl struct {
	HTTP      *http.Client
	ConfigDB  *http.Client
	URL       string
	Username  string
	Password  string
	Namespace string
	DB        *sql.DB
}

func (*MissionControl) GetScraper

func (mc *MissionControl) GetScraper(id string) *Scraper

func (*MissionControl) IsHealthy

func (mc *MissionControl) IsHealthy() (bool, error)

func (*MissionControl) POST

func (mc *MissionControl) POST(path string, body any) (*http.Response, error)

func (*MissionControl) QueryCatalog

func (mc *MissionControl) QueryCatalog(selector ResourceSelector) ([]SelectedResource, error)

func (*MissionControl) SearchCatalog

func (mc *MissionControl) SearchCatalog(search string) ([]SelectedResource, error)

func (*MissionControl) WhoAmI

func (mc *MissionControl) WhoAmI() (map[string]any, bool, error)

type ResourceSelector

type ResourceSelector struct {
	ID            string            `json:"id,omitempty"`
	Name          string            `json:"name,omitempty"`
	Namespace     string            `json:"namespace,omitempty"`
	Types         []string          `json:"types,omitempty"`
	Statuses      []string          `json:"statuses,omitempty"`
	Labels        map[string]string `json:"labels,omitempty"`
	FieldSelector string            `json:"field_selector,omitempty"`
	Search        string            `json:"search,omitempty"`
}

type ScrapeResult

type ScrapeResult struct {
	Errors  []string       `json:"errors"`
	Summary map[string]any `json:"scrape_summary"`
}

type ScrapeResults

type ScrapeResults struct {
	Response *http.Response
	Error    error
}

type Scraper

type Scraper struct {
	Name string
	Id   string
	// contains filtered or unexported fields
}

func (*Scraper) Run

func (s *Scraper) Run() (*ScrapeResult, error)

type SearchResourcesRequest

type SearchResourcesRequest struct {
	Limit   int                `json:"limit,omitempty"`
	Configs []ResourceSelector `json:"configs,omitempty"`
}

type SearchResourcesResponse

type SearchResourcesResponse struct {
	Configs []SelectedResource `json:"configs"`
}

type SelectedResource

type SelectedResource struct {
	ID         string            `json:"id,omitempty"`
	Name       string            `json:"name,omitempty"`
	Namespace  string            `json:"namespace,omitempty"`
	Type       string            `json:"type,omitempty"`
	Tags       map[string]string `json:"tags,omitempty"`
	Config     string            `json:"config,omitempty"`
	Labels     map[string]string `json:"labels,omitempty"`
	Properties map[string]string `json:"properties,omitempty"`
}

Jump to

Keyboard shortcuts

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