initialize

package
v4.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultUpdatePeriod is the default period used for running updaters
	// within matcher processes.
	DefaultUpdatePeriod = 30 * time.Minute
	// NotifierIssuer is the value used for the issuer claim of any outgoing
	// HTTP requests the notifier makes, if PSK auth is configured.
	NotifierIssuer = `clair-notifier`
)

Variables

This section is empty.

Functions

func LogLevel

func LogLevel(level string) zerolog.Level

Types

type Init

type Init struct {

	// a global ctx with an embedded logger
	// enables downstream logging and global application cancelation
	GlobalCTX context.Context
	// A global cancel func providing cancelation to all
	// routines passed GlobalCTX
	GlobalCancel context.CancelFunc
	// A local or remote Indexer service
	Indexer indexer.Service
	// A local or remote Matcher service
	Matcher matcher.Service
	// A local or remote Notifier service
	Notifier notifier.Service
	// The primary http server implementing Clair's functionality
	HttpTransport *httptransport.Server
	// Introspection provides metrics and trace exporters,
	// a pprof diagnostics server, and a healthz endpoint
	Introspection *introspection.Server
	// contains filtered or unexported fields
}

func New

func New(conf config.Config) (*Init, error)

New wil begin an init process and return an Init object on success

func (*Init) Logging

func (i *Init) Logging() error

Logging will set the global logging level for Clair, create a global logger embedded into a CTX, and sets this CTX as our application's GlobalCTX.

func (*Init) Services

func (i *Init) Services() error

Services will initialize the correct ClairCore services dependent on operation mode.

Services maybe local or remote (over a network).

Jump to

Keyboard shortcuts

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