Documentation ¶
Index ¶
- func ConstructLogDetails(podID string, rawLogs string, container string, logSelector *log.Selection) *log.LogDetails
- func Filter(c *gin.Context, object runtime.Object) (*int, error)
- func GetConfigMap(c *gin.Context)
- func GetFeatureConfig(c *gin.Context)
- func GetLogDetails(client kubernetes.Interface, namespace, podID string, container string, ...) (*log.LogDetails, error)
- func GetPodContainerLog(c *gin.Context)
- func GetProxyPodContainerLog(c *gin.Context)
- func IngressDomainSuffix(c *gin.Context)
- func SetExtendHandler(resource enum.ResourceTypeEnum, extendFunc ExtendFunc)
- type ExtendContext
- type ExtendFunc
- type ExtendHandler
- type PodLog
- type ProxyHandler
- type ProxyPodLog
- type ResponseFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructLogDetails ¶
func ConstructLogDetails(podID string, rawLogs string, container string, logSelector *log.Selection) *log.LogDetails
ConstructLogDetails creates a new log details structure for given parameters.
func GetConfigMap ¶
GetConfigMap show system configMap all users have read-only access ability
func GetFeatureConfig ¶
GetFeatureConfig shows layout of integrated components all users have read-only access ability
func GetLogDetails ¶
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 ¶
GetPodContainerLog get k8s pod log and page log Deprecated: Use GetProxyPodContainerLog instead, get better performance
func GetProxyPodContainerLog ¶
GetProxyPodContainerLog get native k8s pod container log
func IngressDomainSuffix ¶
IngressDomainSuffix Get Ingress Domain Suffix by cluster and project
func SetExtendHandler ¶
func SetExtendHandler(resource enum.ResourceTypeEnum, extendFunc ExtendFunc)
SetExtendHandler the func to register real handler func
Types ¶
type ExtendContext ¶
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 ¶
type ExtendFunc func(extendCtx ExtendContext) (interface{}, *errcode.ErrorInfo)
type ExtendHandler ¶
type ExtendHandler struct { NginxNamespace string NginxTcpServiceConfigMap string NginxUdpServiceConfigMap string // contains filtered or unexported fields }
func NewExtendHandler ¶
func NewExtendHandler(namespace string, tcpCm string, udpCm string) *ExtendHandler
func (*ExtendHandler) ExtendHandle ¶
func (e *ExtendHandler) ExtendHandle(c *gin.Context)
ExtendHandle api/v1/kube/extend/clusters/{cluster}/namespaces/{namespace}/{resourceType}
type PodLog ¶
type PodLog struct {
// contains filtered or unexported fields
}
func (*PodLog) HandleLogs ¶
type ProxyHandler ¶
type ProxyHandler struct {
// contains filtered or unexported fields
}
func NewProxyHandler ¶
func NewProxyHandler(enableConvert bool) *ProxyHandler
func (*ProxyHandler) ProxyHandle ¶
func (h *ProxyHandler) ProxyHandle(c *gin.Context)
ProxyHandle proxy all requests access to k8s, request uri format like below api/v1/kube/proxy/clusters/{cluster}/{k8s_url}
type ProxyPodLog ¶
type ProxyPodLog struct {
// contains filtered or unexported fields
}
func NewProxyPodLog ¶
func (*ProxyPodLog) HandleLogs ¶
func (podLog *ProxyPodLog) HandleLogs(c *gin.Context)
HandleLogs @router /api/v1/namespaces/{namespace}/proxy/pods/{resourceName}/log [get] resourceName: pod name, required namespace: pod namespace, required container: container name, required tailLines: tail lines, required timestamps: show timestamps or not, optional limitBytes: limit bytes, required sinceSeconds: since seconds, optional follow: follow or not, optional
type ResponseFilter ¶
type ResponseFilter struct { Condition *filter.Condition ConverterContext *filter.ConverterContext }