Documentation ¶
Overview ¶
Package shipping implements the SockShop shipping microservice.
All the shipping microservice does is push the shipment to a queue. The queue-master service pulls shipments from the queue and "processes" them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ShippingService ¶
type ShippingService interface { // Submit a shipment to be shipped. The actual handling of the // shipment will happen asynchronously by the queue-master service. // // Returns the submitted shipment or an error PostShipping(ctx context.Context, shipment Shipment) (Shipment, error) // Get a shipment's status GetShipment(ctx context.Context, id string) (Shipment, error) // Update a shipment's status; called by the queue master UpdateStatus(ctx context.Context, id, status string) error }
ShippingService implements the SockShop shipping microservice
func NewShippingService ¶
func NewShippingService(ctx context.Context, queue backend.Queue, db backend.NoSQLDatabase) (ShippingService, error)
Instantiates a shipping service that submits all shipments to a queue for asynchronous background processing
Click to show internal directories.
Click to hide internal directories.