kinitq

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package kinitq provides the KInit quality inspection kit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inspector

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

Inspector represents a container inspector.

func Global

func Global() *Inspector

Global returns the global inspector.

func NewInspector

func NewInspector() *Inspector

NewInspector returns a new inspector.

func (*Inspector) Ignore

func (i *Inspector) Ignore(t reflect.Type) error

Ignore registers the given ignored type in this inspector.

func (*Inspector) Inspect

func (i *Inspector) Inspect(ctr *kinit.Container, opt *Options) error

Inspect inspects the given container for the absence of cyclic and unsatisfied dependencies.

func (*Inspector) MustIgnore

func (i *Inspector) MustIgnore(t reflect.Type)

MustIgnore us a variant of the Ignore that panics on error.

func (*Inspector) MustInspect

func (i *Inspector) MustInspect(ctr *kinit.Container, opt *Options)

MustInspect is a variant of the Inspect that panics on error.

func (*Inspector) MustRequire

func (i *Inspector) MustRequire(t reflect.Type)

MustRequire us a variant of the Require that panics on error.

func (*Inspector) Require

func (i *Inspector) Require(t reflect.Type) error

Require registers the given required type in this inspector.

type Options

type Options struct {
	// InspectOnlyRequired specifies whether to inspect only required types
	// skipping all constructors and processors unnecessary for their satisfaction.
	InspectOnlyRequired bool
	// AllowIrrelevantProcessors specifies whether to suppress errors indicating
	// the presence of processors for types without constructors.
	//
	// This option only applies if the InspectOnlyRequired is false.
	AllowIrrelevantProcessors bool
}

Options represents inspection options.

Jump to

Keyboard shortcuts

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