routing

package
v0.0.0-...-d2b98b7 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeFactory

func InitializeFactory(mapService dependencies.IMapService)

Types

type Component

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

Component is in charge of fetching the distance and duration to travel from A to B at a particular time using a specific vehicle.

func (Component) Execute

func (c Component) Execute(ctx context.Context) (output, error)

type Input

type Input interface {
	GetVehicleTypeID() int64
	GetPickUpLocation() dto.Location
	GetDropOffLocation() dto.Location
	GetPickUpTime() time.Time
}

type RoutingFuture

type RoutingFuture interface {
	GetDistanceInKM() float64
	GetDurationInSeconds() float64
}

func GetExecutorFuture

func GetExecutorFuture(input Input) (component.Executor[output], RoutingFuture)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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