detector

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

type Detector interface {
	Config() *odrpc.Detector
	Detect(ctx context.Context, request *odrpc.DetectRequest) (*odrpc.DetectResponse, error)
	Shutdown()
}

Detector is the interface to object detectors

type Mux

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

Mux handles and routes requests to the configured detectors

func New

func New() *Mux

Create a new mux

func (*Mux) AuthFuncOverride

func (m *Mux) AuthFuncOverride(ctx context.Context, fullMethodName string) (context.Context, error)

AuthFuncOverride will handle authentication

func (*Mux) Detect

func (m *Mux) Detect(ctx context.Context, request *odrpc.DetectRequest) (*odrpc.DetectResponse, error)

Run a detection

func (*Mux) DetectStream

func (m *Mux) DetectStream(stream odrpc.Odrpc_DetectStreamServer) error

Handle a stream of detections

func (*Mux) FilterResponse added in v0.2.5

func (m *Mux) FilterResponse(request *odrpc.DetectRequest, response *odrpc.DetectResponse)

func (*Mux) GetDetectors

func (m *Mux) GetDetectors(ctx context.Context, _ *emptypb.Empty) (*odrpc.GetDetectorsResponse, error)

GetDetectors returns the configured detectors

func (*Mux) Shutdown

func (m *Mux) Shutdown()

Shutdown deallocates/shuts down any detectors

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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