external

package
v1.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	IndexPodUid      = "pod.uid"
	IndexNamespace   = "namespace"
	IndexPodName     = "pod.name"
	IndexContainerId = "container.id"
)
View Source
const SystemContainerLogsPath = "containerLogs"

Variables

View Source
var (
	Cluster string
)

Functions

func DelDynamicPaths added in v1.3.0

func DelDynamicPaths(pipelineName string)

func GetByContainerId

func GetByContainerId(containerId string) *corev1.Pod

func GetByPodNamespaceName

func GetByPodNamespaceName(namespace string, name string) *corev1.Pod

func GetByPodUid

func GetByPodUid(uid string) *corev1.Pod

func InitDynamicLogIndexer added in v1.3.0

func InitDynamicLogIndexer()

func InitGlobalPodIndexer

func InitGlobalPodIndexer(podIndexer cache.Indexer, podLister v1.PodLister)

func SetDynamicPaths added in v1.3.0

func SetDynamicPaths(pipelineName string, sourceName string, pair []PathFieldsPair)

Types

type CustomPodIndexer

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

func (*CustomPodIndexer) GetByContainerId

func (c *CustomPodIndexer) GetByContainerId(containerId string) (*corev1.Pod, error)

func (*CustomPodIndexer) GetByNamespaceName

func (c *CustomPodIndexer) GetByNamespaceName(namespace string, name string) (*corev1.Pod, error)

func (*CustomPodIndexer) GetByUid

func (c *CustomPodIndexer) GetByUid(uid string) (*corev1.Pod, error)

type DynamicLogIndexer added in v1.3.0

type DynamicLogIndexer struct {
	PipelineSourceToPaths map[string][]PathFieldsPair // key: (pipelineName/sourceName), value: file source paths
	PipelineToSource      map[string]sets.String      // key: pipelineName, value: sourceName
	// contains filtered or unexported fields
}

DynamicLogIndexer store all paths corresponding to pipeline/source and associated fields.

type PathFieldsPair added in v1.3.0

type PathFieldsPair struct {
	Paths  []string
	Fields map[string]interface{}
}

func GetDynamicPaths added in v1.3.0

func GetDynamicPaths(pipelineName string, sourceName string) ([]PathFieldsPair, bool)

type PodIndexer

type PodIndexer interface {
	GetByNamespaceName(namespace string, name string) (*corev1.Pod, error)
	GetByUid(uid string) (*corev1.Pod, error)
	GetByContainerId(containerId string) (*corev1.Pod, error)
}

Jump to

Keyboard shortcuts

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