package inspection

import "github.com/go-kit/kit/examples/shipping/inspection"

Package inspection provides means to inspect cargos.

Index

Types

type EventHandler

type EventHandler interface {
	CargoWasMisdirected(*cargo.Cargo)
	CargoHasArrived(*cargo.Cargo)
}

EventHandler provides means of subscribing to inspection events.

type Service

type Service interface {
	// InspectCargo inspects cargo and send relevant notifications to
	// interested parties, for example if a cargo has been misdirected, or
	// unloaded at the final destination.
	InspectCargo(id cargo.TrackingID)
}

Service provides cargo inspection operations.

func NewService

func NewService(cargos cargo.Repository, events cargo.HandlingEventRepository, handler EventHandler) Service

NewService creates a inspection service with necessary dependencies.

Source Files

inspection.go

Version
v0.7.0
Published
Mar 19, 2018
Platform
darwin/amd64
Imports
1 packages
Last checked
58 seconds ago

Tools for package owners.