handler

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindStringIndex added in v0.1.10

func FindStringIndex(slice []string, str string) int

Types

type BizInfoHandler

type BizInfoHandler struct {
	// contains filtered or unexported fields
}

func (*BizInfoHandler) ParseRequest

func (handler *BizInfoHandler) ParseRequest() error

func (*BizInfoHandler) Process

func (handler *BizInfoHandler) Process() (int, interface{}, error)

func (*BizInfoHandler) QueryBizInfoWithPodUid

func (handler *BizInfoHandler) QueryBizInfoWithPodUid(key, value string) (int, interface{}, error)

func (*BizInfoHandler) RequestParams

func (handler *BizInfoHandler) RequestParams() interface{}

func (*BizInfoHandler) ValidRequest

func (handler *BizInfoHandler) ValidRequest() error

type BizInfoParams

type BizInfoParams struct {
	PodUIDName string
	PodUID     string
}

type ContainerEventsHandler

type ContainerEventsHandler struct {
	// contains filtered or unexported fields
}

func (*ContainerEventsHandler) GetContainerEventsData

func (handler *ContainerEventsHandler) GetContainerEventsData(key, value string) (int, interface{}, error)

func (*ContainerEventsHandler) ParseRequest

func (handler *ContainerEventsHandler) ParseRequest() error

func (*ContainerEventsHandler) Process

func (handler *ContainerEventsHandler) Process() (int, interface{}, error)

func (*ContainerEventsHandler) RequestParams

func (handler *ContainerEventsHandler) RequestParams() interface{}

func (*ContainerEventsHandler) ValidRequest

func (handler *ContainerEventsHandler) ValidRequest() error

type ContainerEventsHandlerParams

type ContainerEventsHandlerParams struct {
	PodUIDName string
	PodUID     string
}

type ContainerStatusHandler

type ContainerStatusHandler struct {
	// contains filtered or unexported fields
}

func (*ContainerStatusHandler) GetContainerStatusData

func (handler *ContainerStatusHandler) GetContainerStatusData(key, value string) (int, interface{}, error)

func (*ContainerStatusHandler) ParseRequest

func (handler *ContainerStatusHandler) ParseRequest() error

func (*ContainerStatusHandler) Process

func (handler *ContainerStatusHandler) Process() (int, interface{}, error)

func (*ContainerStatusHandler) RequestParams

func (handler *ContainerStatusHandler) RequestParams() interface{}

func (*ContainerStatusHandler) ValidRequest

func (handler *ContainerStatusHandler) ValidRequest() error

type ContainerStatusHandlerParams

type ContainerStatusHandlerParams struct {
	PodUIDName string
	PodUID     string
}

type ContainerlifecycleHandler

type ContainerlifecycleHandler struct {
	// contains filtered or unexported fields
}

func (*ContainerlifecycleHandler) GetContainerLifecycleData

func (handler *ContainerlifecycleHandler) GetContainerLifecycleData(key, value string) (int, interface{}, error)

func (*ContainerlifecycleHandler) ParseRequest

func (handler *ContainerlifecycleHandler) ParseRequest() error

func (*ContainerlifecycleHandler) Process

func (handler *ContainerlifecycleHandler) Process() (int, interface{}, error)

func (*ContainerlifecycleHandler) RequestParams

func (handler *ContainerlifecycleHandler) RequestParams() interface{}

func (*ContainerlifecycleHandler) ValidRequest

func (handler *ContainerlifecycleHandler) ValidRequest() error

type ContainerlifecycleParams

type ContainerlifecycleParams struct {
	PodUIDName string
	PodUID     string
}

type DebuggingPodsHandler

type DebuggingPodsHandler struct {
	// contains filtered or unexported fields
}

func (*DebuggingPodsHandler) ParseRequest

func (handler *DebuggingPodsHandler) ParseRequest() error

func (*DebuggingPodsHandler) Process

func (handler *DebuggingPodsHandler) Process() (int, interface{}, error)

func (*DebuggingPodsHandler) QueryDebuggingWithType

func (handler *DebuggingPodsHandler) QueryDebuggingWithType(debugparams model.SloOptions) (int, interface{}, error)

func (*DebuggingPodsHandler) RequestParams

func (handler *DebuggingPodsHandler) RequestParams() interface{}

func (*DebuggingPodsHandler) ValidRequest

func (handler *DebuggingPodsHandler) ValidRequest() error

type GPodInfos added in v0.1.10

type GPodInfos struct {
	RefId   []string   `json:"refIds"`
	PodInfo TkpPodInfo `json:"detail"`
}

type GVTkpDetail added in v0.1.10

type GVTkpDetail struct {
	PodList      []GPodInfos `json:"podList"`
	WorkloadList []OwnerRefs `json:"workloadList"`
}

type GVTkpStatus added in v0.1.10

type GVTkpStatus struct {
	PhaseList []Phase `json:"phase_list"`
}

type Handler

type Handler interface {
	ParseRequest() error
	ValidRequest() error
	Process() (int, interface{}, error)
	RequestParams() interface{}
}

func ContainerEventsFactory

func ContainerEventsFactory(w http.ResponseWriter, r *http.Request, storage data_access.StorageInterface) Handler

func ContainerStatusFactory

func ContainerStatusFactory(w http.ResponseWriter, r *http.Request, storage data_access.StorageInterface) Handler

func ContainerlifecycleFactory

func ContainerlifecycleFactory(w http.ResponseWriter, r *http.Request, storage data_access.StorageInterface) Handler

func DebuggingPodsFactory

func DebuggingPodsFactory(w http.ResponseWriter, r *http.Request, storage data_access.StorageInterface) Handler

func LunettesLatencyFactory added in v0.1.8

func LunettesLatencyFactory(w http.ResponseWriter, r *http.Request, storage data_access.StorageInterface) Handler

func NodeGraphParamsFactory

func NodeGraphParamsFactory(w http.ResponseWriter, r *http.Request, storage data_access.StorageInterface) Handler

func OwnerPodMapFactory added in v0.1.10

func OwnerPodMapFactory(w http.ResponseWriter, r *http.Request, storage data_access.StorageInterface) Handler

func PodDeliveryUpgradeFactory

func PodDeliveryUpgradeFactory(w http.ResponseWriter, r *http.Request, storage data_access.StorageInterface) Handler

func QueryPodListFactory added in v0.1.7

func QueryPodListFactory(w http.ResponseWriter, r *http.Request, storage data_access.StorageInterface) Handler

func RawdataFactory added in v0.1.6

func RawdataFactory(w http.ResponseWriter, r *http.Request, storage data_access.StorageInterface) Handler

func TkpFactory added in v0.1.10

func VTkpDetailFactory added in v0.1.10

func VTkpDetailFactory(w http.ResponseWriter, r *http.Request, storage data_access.StorageInterface) Handler

func VTkpStatusFactory added in v0.1.10

func VTkpStatusFactory(w http.ResponseWriter, r *http.Request, storage data_access.StorageInterface) Handler

func YamlFactory added in v0.1.6

type LunettesLatencyHandler added in v0.1.8

type LunettesLatencyHandler struct {
	// contains filtered or unexported fields
}

func (*LunettesLatencyHandler) ParseRequest added in v0.1.8

func (handler *LunettesLatencyHandler) ParseRequest() error

func (*LunettesLatencyHandler) Process added in v0.1.8

func (handler *LunettesLatencyHandler) Process() (int, interface{}, error)

func (*LunettesLatencyHandler) QueryLunettesLatency added in v0.1.8

func (handler *LunettesLatencyHandler) QueryLunettesLatency() (int, interface{}, error)

func (*LunettesLatencyHandler) RequestParams added in v0.1.8

func (handler *LunettesLatencyHandler) RequestParams() interface{}

func (*LunettesLatencyHandler) ValidRequest added in v0.1.8

func (handler *LunettesLatencyHandler) ValidRequest() error

type LunettesLatencyParams added in v0.1.8

type LunettesLatencyParams struct {
}

type NodeGraphHandler

type NodeGraphHandler struct {
	// contains filtered or unexported fields
}

func (*NodeGraphHandler) ParseRequest

func (handler *NodeGraphHandler) ParseRequest() error

func (*NodeGraphHandler) Process

func (handler *NodeGraphHandler) Process() (int, interface{}, error)

func (*NodeGraphHandler) QueryPodDeliveryWithPodUid

func (handler *NodeGraphHandler) QueryPodDeliveryWithPodUid(key, value string) (int, interface{}, error)

func (*NodeGraphHandler) RequestParams

func (handler *NodeGraphHandler) RequestParams() interface{}

func (*NodeGraphHandler) ValidRequest

func (handler *NodeGraphHandler) ValidRequest() error

type NodeGraphParams

type NodeGraphParams struct {
	PodUIDName string
	PodUID     string
}

type OwnerPodMapHandler added in v0.1.10

type OwnerPodMapHandler struct {
	// contains filtered or unexported fields
}

func (*OwnerPodMapHandler) GetOwnerPodMap added in v0.1.10

func (handler *OwnerPodMapHandler) GetOwnerPodMap(debugfrom, key, value string) (int, interface{}, error)

func (*OwnerPodMapHandler) ParseRequest added in v0.1.10

func (handler *OwnerPodMapHandler) ParseRequest() error

func (*OwnerPodMapHandler) Process added in v0.1.10

func (handler *OwnerPodMapHandler) Process() (int, interface{}, error)

func (*OwnerPodMapHandler) RequestParams added in v0.1.10

func (handler *OwnerPodMapHandler) RequestParams() interface{}

func (*OwnerPodMapHandler) ValidRequest added in v0.1.10

func (handler *OwnerPodMapHandler) ValidRequest() error

type OwnerPodMapParams added in v0.1.10

type OwnerPodMapParams struct {
	Key       string
	Value     string
	DebugFrom string

	From time.Time // range query
	To   time.Time // range query

}

type OwnerRefs added in v0.1.10

type OwnerRefs struct {
	ApiVersion string `json:"apiVersion"`
	Kind       string `json:"kind"`
	Name       string `json:"name"`
	Uid        string `json:"uid"`
}

func DeduplicateByUid added in v0.1.10

func DeduplicateByUid(refs []OwnerRefs) []OwnerRefs

type Phase added in v0.1.10

type Phase struct {
	Name    string `json:"name"`
	Status  string `json:"status"`
	Trigger bool   `json:"trigger"`
	Reason  string `json:"reason"`
}

type PodDeliveryHandler

type PodDeliveryHandler struct {
	// contains filtered or unexported fields
}

func (*PodDeliveryHandler) ParseRequest

func (handler *PodDeliveryHandler) ParseRequest() error

func (*PodDeliveryHandler) Process

func (handler *PodDeliveryHandler) Process() (int, interface{}, error)

func (*PodDeliveryHandler) QueryPodDeliveryWithPodUid

func (handler *PodDeliveryHandler) QueryPodDeliveryWithPodUid(key, value string) (int, interface{}, error)

func (*PodDeliveryHandler) RequestParams

func (handler *PodDeliveryHandler) RequestParams() interface{}

func (*PodDeliveryHandler) ValidRequest

func (handler *PodDeliveryHandler) ValidRequest() error

type PodDeliveryParams

type PodDeliveryParams struct {
	PodUIDName string
	PodUID     string
}

type PodDeliveryUpgradeHandler

type PodDeliveryUpgradeHandler struct {
	// contains filtered or unexported fields
}

func (*PodDeliveryUpgradeHandler) ParseRequest

func (handler *PodDeliveryUpgradeHandler) ParseRequest() error

func (*PodDeliveryUpgradeHandler) Process

func (handler *PodDeliveryUpgradeHandler) Process() (int, interface{}, error)

func (*PodDeliveryUpgradeHandler) QueryPodDeliveryUpgradeWithPodUid

func (handler *PodDeliveryUpgradeHandler) QueryPodDeliveryUpgradeWithPodUid(key, value string) (int, interface{}, error)

func (*PodDeliveryUpgradeHandler) RequestParams

func (handler *PodDeliveryUpgradeHandler) RequestParams() interface{}

func (*PodDeliveryUpgradeHandler) ValidRequest

func (handler *PodDeliveryUpgradeHandler) ValidRequest() error

type PodDeliveryUpgradeParams

type PodDeliveryUpgradeParams struct {
	PodUIDName string
	PodUID     string
}

type PodInfoHandler

type PodInfoHandler struct {
	// contains filtered or unexported fields
}

func (*PodInfoHandler) ParseRequest

func (handler *PodInfoHandler) ParseRequest() error

func (*PodInfoHandler) Process

func (handler *PodInfoHandler) Process() (int, interface{}, error)

func (*PodInfoHandler) QueryPodInfoWithPodUid

func (handler *PodInfoHandler) QueryPodInfoWithPodUid(key, value string) (int, interface{}, error)

func (*PodInfoHandler) RequestParams

func (handler *PodInfoHandler) RequestParams() interface{}

func (*PodInfoHandler) ValidRequest

func (handler *PodInfoHandler) ValidRequest() error

type PodInfoParams

type PodInfoParams struct {
	PodUIDName string
	PodUID     string
}

type PodListHandler

type PodListHandler struct {
	// contains filtered or unexported fields
}

func (*PodListHandler) ParseRequest

func (handler *PodListHandler) ParseRequest() error

func (*PodListHandler) Process

func (handler *PodListHandler) Process() (int, interface{}, error)

func (*PodListHandler) QueryDebuggingWithType

func (handler *PodListHandler) QueryDebuggingWithType(debugparams model.SloOptions) (int, interface{}, error)

func (*PodListHandler) RequestParams

func (handler *PodListHandler) RequestParams() interface{}

func (*PodListHandler) ValidRequest

func (handler *PodListHandler) ValidRequest() error

type PodPhaseHandler

type PodPhaseHandler struct {
	// contains filtered or unexported fields
}

func (*PodPhaseHandler) ParseRequest

func (handler *PodPhaseHandler) ParseRequest() error

func (*PodPhaseHandler) Process

func (handler *PodPhaseHandler) Process() (int, interface{}, error)

func (*PodPhaseHandler) QueryPodPhaseWithPodUid

func (handler *PodPhaseHandler) QueryPodPhaseWithPodUid(key, value string) (int, interface{}, error)

func (*PodPhaseHandler) RequestParams

func (handler *PodPhaseHandler) RequestParams() interface{}

func (*PodPhaseHandler) ValidRequest

func (handler *PodPhaseHandler) ValidRequest() error

type PodPhaseParams

type PodPhaseParams struct {
	PodUIDName string
	PodUID     string
}

type PodStatusHandler

type PodStatusHandler struct {
	// contains filtered or unexported fields
}

func (*PodStatusHandler) ParseRequest

func (handler *PodStatusHandler) ParseRequest() error

func (*PodStatusHandler) Process

func (handler *PodStatusHandler) Process() (int, interface{}, error)

func (*PodStatusHandler) QueryPodStatusWithPodUid

func (handler *PodStatusHandler) QueryPodStatusWithPodUid(key, value string) (int, interface{}, error)

func (*PodStatusHandler) RequestParams

func (handler *PodStatusHandler) RequestParams() interface{}

func (*PodStatusHandler) ValidRequest

func (handler *PodStatusHandler) ValidRequest() error

type PodStatusParams

type PodStatusParams struct {
	PodUIDName string
	PodUID     string
}

type PodType added in v0.1.10

type PodType string

type QueryPodListHandler added in v0.1.7

type QueryPodListHandler struct {
	// contains filtered or unexported fields
}

func (*QueryPodListHandler) ParseRequest added in v0.1.7

func (handler *QueryPodListHandler) ParseRequest() error

func (*QueryPodListHandler) Process added in v0.1.7

func (handler *QueryPodListHandler) Process() (int, interface{}, error)

func (*QueryPodListHandler) QueryPodListWithParams added in v0.1.7

func (handler *QueryPodListHandler) QueryPodListWithParams(params *QueryPodListParams) (int, interface{}, error)

func (*QueryPodListHandler) RequestParams added in v0.1.7

func (handler *QueryPodListHandler) RequestParams() interface{}

func (*QueryPodListHandler) ValidRequest added in v0.1.7

func (handler *QueryPodListHandler) ValidRequest() error

type QueryPodListParams added in v0.1.7

type QueryPodListParams struct {
	SearchKey   string
	SearchValue string
	From        time.Time
	To          time.Time
}

type RawHandler added in v0.1.6

type RawHandler struct {
	// contains filtered or unexported fields
}

func (*RawHandler) ParseRequest added in v0.1.6

func (handler *RawHandler) ParseRequest() error

func (*RawHandler) Process added in v0.1.6

func (handler *RawHandler) Process() (int, interface{}, error)

func (*RawHandler) RequestParams added in v0.1.6

func (handler *RawHandler) RequestParams() interface{}

func (*RawHandler) ValidRequest added in v0.1.6

func (handler *RawHandler) ValidRequest() error

type RawdataParams added in v0.1.6

type RawdataParams struct {
	// contains filtered or unexported fields
}

type RootHandler

type RootHandler struct {
	// contains filtered or unexported fields
}

func (*RootHandler) ParseRequest

func (handler *RootHandler) ParseRequest() error

func (*RootHandler) Process

func (handler *RootHandler) Process() (int, interface{}, error)

func (*RootHandler) RequestParams

func (handler *RootHandler) RequestParams() interface{}

func (*RootHandler) Root

func (handler *RootHandler) Root() (int, interface{}, error)

func (*RootHandler) ValidRequest

func (handler *RootHandler) ValidRequest() error

type RootParams

type RootParams struct {
}

type TkpBody added in v0.1.10

type TkpBody struct {
	PodNamespace string `json:"pod_namespace"`
	PodName      string `json:"pod_name"`
	//被托管的pod 生成的vtk 对应的名称
	Vtkp string `json:"vtkp"`
}

type TkpHandler added in v0.1.10

type TkpHandler struct {
	// contains filtered or unexported fields
}

func (*TkpHandler) ParseRequest added in v0.1.10

func (handler *TkpHandler) ParseRequest() error

func (*TkpHandler) Process added in v0.1.10

func (handler *TkpHandler) Process() (int, interface{}, error)

func (*TkpHandler) RequestParams added in v0.1.10

func (handler *TkpHandler) RequestParams() interface{}

func (*TkpHandler) Tkp added in v0.1.10

func (handler *TkpHandler) Tkp(params *TkpParams) (int, interface{}, error)

func (*TkpHandler) ValidRequest added in v0.1.10

func (handler *TkpHandler) ValidRequest() error

type TkpParams added in v0.1.10

type TkpParams struct {
	Cluster   string `json:"cluster"`
	Namespace string `json:"pod_namespace"`
	PodName   string `json:"pod_name"`
}

type TkpPodInfo added in v0.1.10

type TkpPodInfo struct {
	Namespace string      `json:"namespace"`
	Name      string      `json:"name"`
	Age       string      `json:"age"`
	Ip        string      `json:"ip"`
	Node      string      `json:"node"`
	Ready     string      `json:"ready"`
	Status    string      `json:"status"`
	Restarts  int         `json:"restarts"`
	OwnerRefs []OwnerRefs `json:"ownerRefs"`
}

type TkpResp added in v0.1.10

type TkpResp struct {
	Message string  `json:"message"`
	Code    int     `json:"code"`
	Data    TkpBody `json:"data"`
}

type TraceHandler

type TraceHandler struct {
	// contains filtered or unexported fields
}

func (*TraceHandler) ParseRequest

func (handler *TraceHandler) ParseRequest() error

func (*TraceHandler) Process

func (handler *TraceHandler) Process() (int, interface{}, error)

func (*TraceHandler) QueryTraceWithPodUid

func (handler *TraceHandler) QueryTraceWithPodUid(key, value string) (int, interface{}, error)

func (*TraceHandler) RequestParams

func (handler *TraceHandler) RequestParams() interface{}

func (*TraceHandler) ValidRequest

func (handler *TraceHandler) ValidRequest() error

type TraceParams

type TraceParams struct {
	PodUIDName string
	PodUID     string
}

type VTkpData added in v0.1.10

type VTkpData struct {
	VtkpNamespace string       `json:"vtkp_namespace"`
	VtkpId        string       `json:"vtkp_uid"`
	VtkpName      string       `json:"vtkp_name"`
	PeerPod       string       `json:"peer_pod"`
	PodInfos      []TkpPodInfo `json:"pod_infos"`
}

type VTkpDetailHandler added in v0.1.10

type VTkpDetailHandler struct {
	// contains filtered or unexported fields
}

func (*VTkpDetailHandler) ParseRequest added in v0.1.10

func (handler *VTkpDetailHandler) ParseRequest() error

func (*VTkpDetailHandler) Process added in v0.1.10

func (handler *VTkpDetailHandler) Process() (int, interface{}, error)

func (*VTkpDetailHandler) RequestParams added in v0.1.10

func (handler *VTkpDetailHandler) RequestParams() interface{}

func (*VTkpDetailHandler) VTkpDetail added in v0.1.10

func (handler *VTkpDetailHandler) VTkpDetail(params *VTkpDetailParams) (int, interface{}, error)

func (*VTkpDetailHandler) ValidRequest added in v0.1.10

func (handler *VTkpDetailHandler) ValidRequest() error

type VTkpDetailParams added in v0.1.10

type VTkpDetailParams struct {
	Cluster       string
	VtkpNamespace string
	VtkpName      string
}

type VTkpDetailResp added in v0.1.10

type VTkpDetailResp struct {
	Message string   `json:"message"`
	Code    int      `json:"code"`
	Data    VTkpData `json:"data"`
}

type VTkpStatusData added in v0.1.10

type VTkpStatusData struct {
	Type            string   `json:"type"`
	Status          string   `json:"status"`
	CurPhase        string   `json:"cur_phase"`
	TotalPhases     []string `json:"total_phases"`
	CompletedPhases []string `json:"completed_phases"`
}

type VTkpStatusHandler added in v0.1.10

type VTkpStatusHandler struct {
	// contains filtered or unexported fields
}

func (*VTkpStatusHandler) ParseRequest added in v0.1.10

func (handler *VTkpStatusHandler) ParseRequest() error

func (*VTkpStatusHandler) Process added in v0.1.10

func (handler *VTkpStatusHandler) Process() (int, interface{}, error)

func (*VTkpStatusHandler) RequestParams added in v0.1.10

func (handler *VTkpStatusHandler) RequestParams() interface{}

func (*VTkpStatusHandler) VTkpStatus added in v0.1.10

func (handler *VTkpStatusHandler) VTkpStatus(params *VTkpStatusParams) (int, interface{}, error)

func (*VTkpStatusHandler) ValidRequest added in v0.1.10

func (handler *VTkpStatusHandler) ValidRequest() error

type VTkpStatusParams added in v0.1.10

type VTkpStatusParams struct {
	Cluster       string `json:"cluster"`
	VtkpNamespace string `json:"vtkpNamespace"`
	VtkpName      string `json:"vtkpName"`
}

type VTkpStatusResp added in v0.1.10

type VTkpStatusResp struct {
	Message string         `json:"message"`
	Code    int            `json:"code"`
	Data    VTkpStatusData `json:"data"`
}

type YamlHandler added in v0.1.6

type YamlHandler struct {
	// contains filtered or unexported fields
}

func (*YamlHandler) GetYamls added in v0.1.6

func (handler *YamlHandler) GetYamls(params *YamlParams) (int, interface{}, error)

func (*YamlHandler) ParseRequest added in v0.1.6

func (handler *YamlHandler) ParseRequest() error

func (*YamlHandler) Process added in v0.1.6

func (handler *YamlHandler) Process() (int, interface{}, error)

func (*YamlHandler) RequestParams added in v0.1.6

func (handler *YamlHandler) RequestParams() interface{}

func (*YamlHandler) ValidRequest added in v0.1.6

func (handler *YamlHandler) ValidRequest() error

type YamlParams added in v0.1.6

type YamlParams struct {
	Resource string
	Uid      string
	Name     string
}

Jump to

Keyboard shortcuts

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