initialize

package
v4.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

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
	// 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