resourcemanage

package
v1.8.6 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructLogDetails added in v1.2.2

func ConstructLogDetails(podID string, rawLogs string, container string, logSelector *log.Selection) *log.LogDetails

ConstructLogDetails creates a new log details structure for given parameters.

func Filter

func Filter(c *gin.Context, object runtime.Object) (*int, error)

product match/sort/page to other function

func GetConfigMap added in v1.1.0

func GetConfigMap(c *gin.Context)

GetConfigMap show system configMap all users have read-only access ability

func GetFeatureConfig added in v1.0.3

func GetFeatureConfig(c *gin.Context)

GetFeatureConfig shows layout of integrated components all users have read-only access ability

func GetLogDetails added in v1.2.2

func GetLogDetails(client kubernetes.Interface, namespace, podID string, container string,
	logSelector *log.Selection, usePreviousLogs bool) (*log.LogDetails, error)

GetLogDetails returns logs for particular pod and container. When container is null, logs for the first one are returned. Previous indicates to read archived logs created by log rotation or container crash

func GetPodContainerLog added in v1.2.2

func GetPodContainerLog(c *gin.Context)

func IngressDomainSuffix added in v1.2.0

func IngressDomainSuffix(c *gin.Context)

IngressDomainSuffix Get Ingress Domain Suffix by cluster and project

func SetExtendHandler added in v1.2.2

func SetExtendHandler(resource enum.ResourceTypeEnum, extendFunc ExtendFunc)

SetExtendHandler the func to register real handler func

Types

type ExtendContext added in v1.8.5

type ExtendContext struct {
	Cluster      string
	Namespace    string
	Username     string
	Action       string
	ResourceName string

	// todo: remove this customize field to suitable place
	NginxNamespace           string
	NginxTcpServiceConfigMap string
	NginxUdpServiceConfigMap string
	Body                     []byte
	NodeStatus               string

	GinContext      *gin.Context
	FilterCondition *filter.Condition
	AuditHandler    *audit.Handler
}

type ExtendFunc added in v1.2.2

type ExtendFunc func(extendCtx ExtendContext) (interface{}, *errcode.ErrorInfo)

type ExtendHandler added in v1.2.1

type ExtendHandler struct {
	NginxNamespace           string
	NginxTcpServiceConfigMap string
	NginxUdpServiceConfigMap string
	// contains filtered or unexported fields
}

func NewExtendHandler added in v1.2.1

func NewExtendHandler(namespace string, tcpCm string, udpCm string) *ExtendHandler

func (*ExtendHandler) ExtendHandle added in v1.2.1

func (e *ExtendHandler) ExtendHandle(c *gin.Context)

ExtendHandle api/v1/cube/extend/clusters/{cluster}/namespaces/{namespace}/{resourceType}

type PodLog added in v1.2.2

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

func NewPodLog added in v1.2.2

func NewPodLog(client client.Client, namespace string, condition *filter.Condition) PodLog

func (*PodLog) HandleLogs added in v1.2.2

func (podLog *PodLog) HandleLogs(c *gin.Context)

type ProxyHandler added in v1.2.0

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

func NewProxyHandler added in v1.2.0

func NewProxyHandler(enableConvert bool) *ProxyHandler

func (*ProxyHandler) ProxyHandle added in v1.2.0

func (h *ProxyHandler) ProxyHandle(c *gin.Context)

ProxyHandle proxy all requests access to k8s, request uri format like below api/v1/cube/proxy/clusters/{cluster}/{k8s_url}

type ResponseFilter added in v1.7.3

type ResponseFilter struct {
	Condition        *filter.Condition
	ConverterContext *filter.ConverterContext
}

Jump to

Keyboard shortcuts

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