Documentation
¶
Overview ¶
Package googlecloudlogk8snode_contract defines the contract for the googlecloudlogk8snode task.
Index ¶
Constants ¶
const (
// TaskIDPrefix is the prefix for all task IDs in this package.
TaskIDPrefix = "cloud.google.com/log/k8s-node/"
)
Variables ¶
var CommonFieldsetReaderTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "common-fieldset-reader")
CommonFieldsetReaderTaskID is the ID for a task to read the fieldset used by all parsers in node log parsers later.
var ContainerIDDiscoveryTaskID = taskid.NewDefaultImplementationID[commonlogk8sauditv2_contract.ContainerIDToContainerIdentity](TaskIDPrefix + "container-id-discovery")
var ContainerdLogFilterTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "containerd-log-filter")
ContainerdLogFilterTaskID is the ID for a task to filter only the logs for containerd.
var ContainerdLogGroupTaskID = taskid.NewDefaultImplementationID[inspectiontaskbase.LogGroupMap](TaskIDPrefix + "containerd-log-group")
ContainerdLogGroupTaskID is the ID for a task to group containerd related logs based on instance names.
var ContainerdLogLogToTimelineMapperTaskID = taskid.NewDefaultImplementationID[struct{}](TaskIDPrefix + "containerd-log-timeline-mapper")
ContainerdLogLogToTimelineMapperTaskID is the ID for a task to add events or revisions based on containerd logs.
var KubeletLogFilterTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "kubelet-log-filter")
KubeletLogFilterTaskID is the ID for a task to filter only the logs for kubelet.
var KubeletLogGroupTaskID = taskid.NewDefaultImplementationID[inspectiontaskbase.LogGroupMap](TaskIDPrefix + "kubelet-log-group")
KubeletLogGroupTaskID is the ID for a task to group kubelet related logs based on instance names.
var KubeletLogLogToTimelineMapperTaskID = taskid.NewDefaultImplementationID[struct{}](TaskIDPrefix + "kubelet-log-timeline-mapper")
KubeletLogLogToTimelineMapperTaskID is the ID for a task to add events or revisions based on kubelet logs.
var ListLogEntriesTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "query")
ListLogEntriesTaskID is the task id for the task that queries k8s node logs from Cloud Logging.
var LogIngesterTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "log-ingester")
LogIngesterTaskID is the task ID to finalize the logs to be included in the final output.
var OtherLogFilterTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "other-log-filter")
OtherLogFilterTaskID is the task ID for filtering other logs.
var OtherLogGroupTaskID = taskid.NewDefaultImplementationID[inspectiontaskbase.LogGroupMap](TaskIDPrefix + "other-log-group")
OtherLogGroupTaskID is the ID for a task to group other related logs based on instance names and component name.
var OtherLogLogToTimelineMapperTaskID = taskid.NewDefaultImplementationID[struct{}](TaskIDPrefix + "other-log-timeline-mapper")
OtherLogLogToTimelineMapperTaskID is the task ID for a task to add events or revisions based on other logs.
var PodSandboxIDDiscoveryTaskID = taskid.NewDefaultImplementationID[patternfinder.PatternFinder[*PodSandboxIDInfo]](TaskIDPrefix + "containerd-id-discovery")
PodSandboxIDDiscoveryTaskID is the ID for a task to extract pod sandbox IDs for the other parsers to corelate a log to Pods.
var TailTaskID = taskid.NewDefaultImplementationID[struct{}](TaskIDPrefix + "tail")
TailTaskID is a nop task just to require all child parsers.
Functions ¶
This section is empty.
Types ¶
type K8sNodeLogCommonFieldSet ¶
type K8sNodeLogCommonFieldSet struct {
Message *logutil.ParseStructuredLogResult
Component string
NodeName string
}
func (*K8sNodeLogCommonFieldSet) Kind ¶
func (k *K8sNodeLogCommonFieldSet) Kind() string
Kind implements log.FieldSet.
func (*K8sNodeLogCommonFieldSet) ParserType ¶
func (k *K8sNodeLogCommonFieldSet) ParserType() K8sNodeParserType
func (*K8sNodeLogCommonFieldSet) ResourcePath ¶
func (k *K8sNodeLogCommonFieldSet) ResourcePath() resourcepath.ResourcePath
type K8sNodeLogCommonFieldSetReader ¶
type K8sNodeLogCommonFieldSetReader struct {
StructuredLogParser logutil.StructuredLogParser
}
func (*K8sNodeLogCommonFieldSetReader) FieldSetKind ¶
func (k *K8sNodeLogCommonFieldSetReader) FieldSetKind() string
FieldSetKind implements log.FieldSetReader.
func (*K8sNodeLogCommonFieldSetReader) Read ¶
func (k *K8sNodeLogCommonFieldSetReader) Read(reader *structured.NodeReader) (log.FieldSet, error)
Read implements log.FieldSetReader.
type K8sNodeParserType ¶
type K8sNodeParserType string
var ( Containerd K8sNodeParserType = "containerd" Kubelet K8sNodeParserType = "kubelet" Other K8sNodeParserType = "other" )
type PodSandboxIDInfo ¶
func (*PodSandboxIDInfo) ResourcePath ¶
func (p *PodSandboxIDInfo) ResourcePath() resourcepath.ResourcePath