clusterhandler

package
v1.21.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentModeApiServer = "apiServerProxy"
	AgentModeAHTTP     = "http"
	AgentModeHTTPS     = "https"
)
View Source
const LokiExportDir = "lokiExport"

Variables

This section is empty.

Functions

func RoundTripOf

func RoundTripOf(cli agents.Client) http.RoundTripper

RoundTripOf

func Transport

func Transport(local, proxy *websocket.Conn)

Types

type ClusterInfoResp

type ClusterInfoResp struct {
	handlers.RespBase
	Data models.ClusterSimple `json:"data"`
}

type ClusterListResp

type ClusterListResp struct {
	handlers.ListBase
	Data []models.ClusterSimple `json:"list"`
}

type ClusterQuota

type ClusterQuota struct {
	Version        string                               `json:"version"`
	OversoldConfig []byte                               `json:"oversoldConfig"`
	Resoruces      statistics.ClusterResourceStatistics `json:"resources"`
	Workloads      statistics.ClusterWorkloadStatistics `json:"workloads"`
}

type ClusterQuotaResp

type ClusterQuotaResp struct {
	handlers.RespBase
	Data ClusterQuota `json:"data"`
}

type ClusterResp

type ClusterResp struct {
	handlers.RespBase
	Data models.Cluster `json:"data"`
}

type ClusterStatusMap

type ClusterStatusMap map[string]bool

type ClusterStatusMapResp

type ClusterStatusMapResp struct {
	handlers.RespBase
	Data ClusterStatusMap `json:"data"`
}

type EnvironmentListResp

type EnvironmentListResp struct {
	handlers.ListBase
	Data []models.Environment `json:"list"`
}

type Handler

type Handler struct {
	base.BaseHandler
}

func (*Handler) ClusterStatus

func (h *Handler) ClusterStatus(req *restful.Request, resp *restful.Response)

func (*Handler) Context

func (l *Handler) Context(req *restful.Request, resp *restful.Response)

func (*Handler) CreateCluster

func (h *Handler) CreateCluster(req *restful.Request, resp *restful.Response)

func (*Handler) DeleteCluster

func (h *Handler) DeleteCluster(req *restful.Request, resp *restful.Response)

func (*Handler) Export

func (l *Handler) Export(req *restful.Request, resp *restful.Response)

func (*Handler) GetClusterQuotaStastic

func (h *Handler) GetClusterQuotaStastic(req *restful.Request, resp *restful.Response)

func (*Handler) LabelValues

func (l *Handler) LabelValues(req *restful.Request, resp *restful.Response)

func (*Handler) Labels

func (l *Handler) Labels(req *restful.Request, resp *restful.Response)

func (*Handler) ListCluster

func (h *Handler) ListCluster(req *restful.Request, resp *restful.Response)

func (*Handler) ListEnvironment

func (h *Handler) ListEnvironment(req *restful.Request, resp *restful.Response)

func (*Handler) ListLogQueryHistory

func (h *Handler) ListLogQueryHistory(req *restful.Request, resp *restful.Response)

func (*Handler) ListLogQuerySnapshot

func (h *Handler) ListLogQuerySnapshot(req *restful.Request, resp *restful.Response)

func (*Handler) ListPlugins

func (h *Handler) ListPlugins(req *restful.Request, resp *restful.Response)

func (*Handler) ModifyCluster

func (h *Handler) ModifyCluster(req *restful.Request, resp *restful.Response)

func (*Handler) PluginSwitch

func (h *Handler) PluginSwitch(req *restful.Request, resp *restful.Response)

func (*Handler) Proxy

func (h *Handler) Proxy(req *restful.Request, resp *restful.Response)

func (*Handler) ProxyHTTP

func (h *Handler) ProxyHTTP(req *restful.Request, resp *restful.Response)

func (*Handler) ProxyWebsocket

func (h *Handler) ProxyWebsocket(req *restful.Request, resp *restful.Response)

func (*Handler) QueryLanguage

func (l *Handler) QueryLanguage(req *restful.Request, resp *restful.Response)

func (*Handler) QueryRange

func (l *Handler) QueryRange(req *restful.Request, resp *restful.Response)

func (*Handler) Regist

func (h *Handler) Regist(container *restful.Container)

func (*Handler) RetrieveCluster

func (h *Handler) RetrieveCluster(req *restful.Request, resp *restful.Response)

func (*Handler) ReverseProxyOn

func (h *Handler) ReverseProxyOn(cli agents.Client) *httputil.ReverseProxy

func (*Handler) Series

func (l *Handler) Series(req *restful.Request, resp *restful.Response)

type LogQueryHistoryListResp

type LogQueryHistoryListResp struct {
	handlers.ListBase
	Data []models.LogQueryHistory `json:"list"`
}

type LogQuerySnapshotListResp

type LogQuerySnapshotListResp struct {
	handlers.ListBase
	Data []models.LogQuerySnapshot `json:"list"`
}

type LokiCli

type LokiCli = Handler

func (LokiCli) LokiLabelValues

func (c LokiCli) LokiLabelValues(ctx context.Context, cluster string, label string, query map[string]string) ([]string, error)

func (LokiCli) LokiLabels

func (c LokiCli) LokiLabels(ctx context.Context, cluster string, query map[string]string) ([]string, error)

func (LokiCli) LokiQueryRange

func (c LokiCli) LokiQueryRange(ctx context.Context, cluster string, query map[string]string) (*loki.QueryResponseData, error)

func (LokiCli) LokiSeries

func (c LokiCli) LokiSeries(ctx context.Context, cluster string, query map[string]string) (interface{}, error)

type Msg

type Msg struct {
	MsgType int
	Content []byte
}

type RoundTripperFunc

type RoundTripperFunc func(req *http.Request) (*http.Response, error)

func (RoundTripperFunc) RoundTrip

func (c RoundTripperFunc) RoundTrip(req *http.Request) (*http.Response, error)

type WebSocketProxy

type WebSocketProxy struct {
	Source     *websocket.Conn
	Target     *websocket.Conn
	SourceChan chan Msg
	TargetChan chan Msg
	Done       chan bool
	UserName   string
	AuditFunc  func(string)
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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