server

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2018 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Analyzers []lookout.AnalyzerConfig
}

Config is a server configuration

type LogPoster added in v0.1.4

type LogPoster struct {
	Log log.Logger
}

func (*LogPoster) Post added in v0.1.4

func (p *LogPoster) Post(ctx context.Context, e lookout.Event,
	aCommentsList []lookout.AnalyzerComments) error

func (*LogPoster) Status added in v0.1.4

func (p *LogPoster) Status(ctx context.Context, e lookout.Event,
	status lookout.AnalysisStatus) error

type Server

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

Server implements glue between providers / data-server / analyzers

func NewServer

func NewServer(
	p lookout.Poster,
	fileGetter lookout.FileGetter,
	analyzers map[string]lookout.Analyzer,
	eventOp store.EventOperator,
	commentOp store.CommentOperator,
	reviewTimeout time.Duration,
	pushTimeout time.Duration,
) *Server

NewServer creates new Server

func (*Server) HandleEvent added in v0.3.0

func (s *Server) HandleEvent(ctx context.Context, e lookout.Event) error

HandleEvent processes the event calling the analyzers, and posting the results

func (*Server) HandlePush

func (s *Server) HandlePush(ctx context.Context, e *lookout.PushEvent) error

HandlePush sends request to analyzers concurrently

func (*Server) HandleReview

func (s *Server) HandleReview(ctx context.Context, e *lookout.ReviewEvent) error

HandleReview sends request to analyzers concurrently

Jump to

Keyboard shortcuts

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