analyst

package
v0.0.0-...-4aa7239 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: OSL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer interface {
	Run(context.Context, *contracts.PendingResearchItem)
	Errors() <-chan error
	CompletedWorkItems() <-chan *contracts.CompletedResearchItem
	Done() <-chan struct{}
}

An Analyzer is anything that can take a PendingResearchItem, conduct an analysis, and return a channel of CompletedResearchItem in response.

type Command

type Command interface {
	StdoutPipe() (ReadCloser, error)
	StdinPipe() (WriteCloser, error)
	StderrPipe() (ReadCloser, error)
	Start() error
	Wait() error
}

A Command is able to Start a command, Wait for it to complete, and communicate with it bia stdin and stdout.

type CommandBuilder

type CommandBuilder interface {
	CommandContext(context.Context, string, ...string) Command
}

A CommandBuilder is able to build commands.

type ExecCmdFacade

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

ExecCmdFacade is a facade for an exec.Cmd

func (*ExecCmdFacade) Start

func (c *ExecCmdFacade) Start() error

Start is a facade for exec.Cmd.Start.

func (*ExecCmdFacade) StderrPipe

func (c *ExecCmdFacade) StderrPipe() (ReadCloser, error)

StderrPipe is a facade for exec.Cmd.StderrPipe.

func (*ExecCmdFacade) StdinPipe

func (c *ExecCmdFacade) StdinPipe() (WriteCloser, error)

StdinPipe is a facade for exec.Cmd.StdinPipe.

func (*ExecCmdFacade) StdoutPipe

func (c *ExecCmdFacade) StdoutPipe() (ReadCloser, error)

StdoutPipe is a facade for exec.Cmd.StdoutPipe.

func (*ExecCmdFacade) Wait

func (c *ExecCmdFacade) Wait() error

Wait is a facade for exec.Cmd.Wait.

type ExecFacade

type ExecFacade struct{}

ExecFacade is a facade for the exec package.

func (*ExecFacade) CommandContext

func (*ExecFacade) CommandContext(ctx context.Context, name string, arg ...string) Command

CommandContext is a facade for exec.CommandContext

type ReadCloser

type ReadCloser interface {
	io.ReadCloser
}

ReadCloser is an io.ReadCloser that has been reimplemented to ease mock generation.

type WriteCloser

type WriteCloser interface {
	io.WriteCloser
}

WriteCloser is an io.ReadCloser that has been reimplemented to ease mock generation.

Directories

Path Synopsis
adapters

Jump to

Keyboard shortcuts

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