Documentation
¶
Index ¶
- Variables
- func GenerateOnPremAPIQuery(clusterIdentity googlecloudk8scommon_contract.GoogleCloudClusterIdentity) string
- func GenerateOnPremAPIStructuredQuery(clusterIdentity googlecloudk8scommon_contract.GoogleCloudClusterIdentity) *logestimator.StructuredLogQuery
- func Register(registry coreinspection.InspectionTaskRegistry) error
- type OnPremAPIAuditTimelineMapper
- func (m *OnPremAPIAuditTimelineMapper) Dependencies() []taskid.UntypedTaskReference
- func (m *OnPremAPIAuditTimelineMapper) GroupedLogTask() taskid.TaskReference[inspectiontaskbase.LogGroupMap]
- func (m *OnPremAPIAuditTimelineMapper) LogIngesterTask() taskid.TaskReference[struct{}]
- func (m *OnPremAPIAuditTimelineMapper) ProcessLogByGroup(ctx context.Context, l *log.Log, ...) (*khifilev6.TimelineChangeSet, *googlecloudcommon_contract.GCPOperationTracker, ...)
Constants ¶
This section is empty.
Variables ¶
var ClusterIdentityAliasTask = coretask.NewAliasTask( googlecloudlogonpremapiaudit_contract.ClusterIdentityTaskID, googlecloudk8scommon_contract.ClusterIdentityTaskID.Ref(), )
var ListLogEntriesTask = googlecloudcommon_contract.NewStructuredListLogEntriesTask(&onpremAPIListLogEntriesTaskSetting{})
var LogGrouperTask = inspectiontaskbase.NewLogGrouperTask( googlecloudlogonpremapiaudit_contract.LogGrouperTaskID, googlecloudlogonpremapiaudit_contract.ListLogEntriesTaskID.Ref(), func(ctx context.Context, l *log.Log) string { resourceFieldSet, err := googlecloudlogonpremapiaudit_contract.ExtractOnPremAPIAuditResource(l.NodeReader) if err != nil { return "" } return fmt.Sprintf("%s/%s/%s", resourceFieldSet.Project, resourceFieldSet.ClusterName, resourceFieldSet.NodepoolName) }, )
LogGrouperTask is a task that groups MulticloudAPI audit logs by their resource path. This grouping allows for parallel processing of logs related to the same resource.
var LogIngesterTask = googlecloudcommon_contract.NewGCPOperationLogIngesterTask( googlecloudlogonpremapiaudit_contract.LogIngesterTaskID, googlecloudlogonpremapiaudit_contract.ListLogEntriesTaskID.Ref(), googlecloudlogonpremapiaudit_contract.LogTypeOnPremAPI, )
LogIngesterTask is a task that serializes MulticloudAPI audit logs for storage in the history builder.
var LogToTimelineMapperTask = inspectiontaskbase.NewLogToTimelineMapperTask( googlecloudlogonpremapiaudit_contract.LogToTimelineMapperTaskID, &OnPremAPIAuditTimelineMapper{}, inspectioncore_contract.FeatureTaskLabel( "On-Premises API Logs", "Gather Anthos On-Premises audit logs to visualize cluster lifecycle events (creation, deletion, enrollment, unenrollment, and upgrades) on timelines.", 9500, true, ), )
LogToTimelineMapperTask is a task that adds revisions/events regarding logs.
Functions ¶
func GenerateOnPremAPIQuery ¶ added in v0.58.2
func GenerateOnPremAPIQuery(clusterIdentity googlecloudk8scommon_contract.GoogleCloudClusterIdentity) string
GenerateOnPremAPIQuery generates a query for OnPrem API audit logs.
func GenerateOnPremAPIStructuredQuery ¶ added in v0.58.2
func GenerateOnPremAPIStructuredQuery(clusterIdentity googlecloudk8scommon_contract.GoogleCloudClusterIdentity) *logestimator.StructuredLogQuery
GenerateOnPremAPIStructuredQuery generates a structured query for OnPrem API audit logs.
func Register ¶
func Register(registry coreinspection.InspectionTaskRegistry) error
Register registers all googlecloudlogonpremapiaudit inspection tasks to the registry.
Types ¶
type OnPremAPIAuditTimelineMapper ¶ added in v0.56.0
type OnPremAPIAuditTimelineMapper struct {
inspectiontaskbase.SinglePassMapperBase[*googlecloudcommon_contract.GCPOperationTracker]
}
OnPremAPIAuditTimelineMapper maps On-Prem API audit logs to timeline elements.
func (*OnPremAPIAuditTimelineMapper) Dependencies ¶ added in v0.56.0
func (m *OnPremAPIAuditTimelineMapper) Dependencies() []taskid.UntypedTaskReference
Dependencies returns additional task dependencies of the mapper.
func (*OnPremAPIAuditTimelineMapper) GroupedLogTask ¶ added in v0.56.0
func (m *OnPremAPIAuditTimelineMapper) GroupedLogTask() taskid.TaskReference[inspectiontaskbase.LogGroupMap]
GroupedLogTask returns a reference to the task that provides the grouped logs.
func (*OnPremAPIAuditTimelineMapper) LogIngesterTask ¶ added in v0.56.0
func (m *OnPremAPIAuditTimelineMapper) LogIngesterTask() taskid.TaskReference[struct{}]
LogIngesterTask returns the task reference providing the ingested logs.
func (*OnPremAPIAuditTimelineMapper) ProcessLogByGroup ¶ added in v0.56.0
func (m *OnPremAPIAuditTimelineMapper) ProcessLogByGroup(ctx context.Context, l *log.Log, tracker *googlecloudcommon_contract.GCPOperationTracker) (*khifilev6.TimelineChangeSet, *googlecloudcommon_contract.GCPOperationTracker, error)
ProcessLogByGroup maps log entries to timeline elements.