inspection

package
v0.0.0-...-9f7285a Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeatureListItem

type FeatureListItem struct {
	Id          string `json:"id"`
	Label       string `json:"label"`
	Description string `json:"description"`
	Enabled     bool   `json:"enabled"`
}

type InspectionDryRunResult

type InspectionDryRunResult struct {
	Metadata interface{} `json:"metadata"`
}

type InspectionRunResult

type InspectionRunResult struct {
	Metadata    interface{}
	ResultStore inspectiondata.Store
}

type InspectionRunner

type InspectionRunner struct {
	ID string
	// contains filtered or unexported fields
}

func NewInspectionRunner

func NewInspectionRunner(server *InspectionTaskServer) *InspectionRunner

func (*InspectionRunner) Cancel

func (i *InspectionRunner) Cancel() error

func (*InspectionRunner) DryRun

func (*InspectionRunner) FeatureList

func (i *InspectionRunner) FeatureList() ([]FeatureListItem, error)

func (*InspectionRunner) GetCurrentMetadata

func (i *InspectionRunner) GetCurrentMetadata() (*metadata.MetadataSet, error)

func (*InspectionRunner) MakeLoggers

func (i *InspectionRunner) MakeLoggers(ctx context.Context, minLevel slog.Level, m *metadata.MetadataSet, definitions []task.Definition)

func (*InspectionRunner) Metadata

func (i *InspectionRunner) Metadata() (map[string]any, error)

func (*InspectionRunner) Result

func (i *InspectionRunner) Result() (*InspectionRunResult, error)

func (*InspectionRunner) Run

func (*InspectionRunner) SetFeatureList

func (i *InspectionRunner) SetFeatureList(featureList []string) error

func (*InspectionRunner) SetInspectionType

func (i *InspectionRunner) SetInspectionType(inspectionType string) error

func (*InspectionRunner) Started

func (i *InspectionRunner) Started() bool

func (*InspectionRunner) Wait

func (i *InspectionRunner) Wait() <-chan interface{}

type InspectionTaskServer

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

InspectionTaskServer manages tasks and provides apis to get task related information in JSON convertible type.

func NewServer

func NewServer() (*InspectionTaskServer, error)

func (*InspectionTaskServer) AddInspectionType

func (s *InspectionTaskServer) AddInspectionType(newInspectionType InspectionType) error

AddInspectionType register a inspection type.

func (*InspectionTaskServer) AddTaskDefinition

func (s *InspectionTaskServer) AddTaskDefinition(taskDefinition task.Definition) error

AddTaskDefinition register a task definition usable for the inspection tasks

func (*InspectionTaskServer) CreateInspection

func (s *InspectionTaskServer) CreateInspection(inspectionType string) (string, error)

CreateInspection generates an inspection and returns inspection ID

func (*InspectionTaskServer) GetAllInspectionTypes

func (s *InspectionTaskServer) GetAllInspectionTypes() []*InspectionType

func (*InspectionTaskServer) GetAllRegisteredTasks

func (s *InspectionTaskServer) GetAllRegisteredTasks() []task.Definition

GetAllRegisteredTasks returns a cloned list of all definitions registered in this server.

func (*InspectionTaskServer) GetAllRunners

func (s *InspectionTaskServer) GetAllRunners() []*InspectionRunner

func (*InspectionTaskServer) GetInspectionType

func (s *InspectionTaskServer) GetInspectionType(inspectionTypeId string) *InspectionType

func (*InspectionTaskServer) GetTask

func (s *InspectionTaskServer) GetTask(taskId string) *InspectionRunner

Inspection returns an instance of an Inspection queried with given inspection ID.

type InspectionType

type InspectionType struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Icon        string `json:"icon"`
	Priority    int    `json:"-"`
}

type PrepareInspectionServerFunc

type PrepareInspectionServerFunc = func(inspectionServer *InspectionTaskServer) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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