Documentation
¶
Index ¶
Constants ¶
View Source
const ( StateClosed = State(iota) StateOpen StateFinalizing )
View Source
const ( CoffeeEspresso = CoffeeKind("espresso") CoffeeLungo = CoffeeKind("lungo") CoffeeCafeLatte = CoffeeKind("cafe-latte") CoffeeCappucino = CoffeeKind("cappuccino") CofeeFlatWhite = CoffeeKind("flat-white") )
View Source
const ( ExtraShot = Extra("shot") ExtraCinnamon = Extra("cinnamon") ExtraBaileys = Extra("baileys") ExtraCondencedMilk = Extra("condenced-milk") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coffee ¶
type Coffee struct {
Kind CoffeeKind
Extras []Extra
}
type CoffeeKind ¶
type CoffeeKind string
type CoffeeShop ¶
type CoffeeShop struct {
// contains filtered or unexported fields
}
func NewCoffeeShop ¶
func NewCoffeeShop(timeScale int) *CoffeeShop
func (*CoffeeShop) Open ¶
func (c *CoffeeShop) Open(ctx context.Context, baristasNum int) error
Open opens a coffeeshop with desired context
func (*CoffeeShop) PlaceOrder ¶
PlaceOrder allocates one barista to make caller a coffee. The duration of making depends on order complexity
Click to show internal directories.
Click to hide internal directories.