Documentation
¶
Index ¶
Constants ¶
View Source
const ( AVAILABLE_SEATS int = 5 DAILY_CUSTOMERS int = 25 CUTTING_TIME = 5 * time.Second )
Hard constants
View Source
const ( EVENT_SHOP_OPEN int = iota EVENT_CUSTOMER_ARRIVAL EVENT_CUSTOMER_DEPARTURE EVENT_SEATING_VACANT EVENT_JOB_COMPLETION EVENT_SHOP_CLOSE )
Shop Events
Variables ¶
View Source
var SHOP_SERVICES = []string{"Haircut", "Shave", "Facial", "Bleaching", "Massage", "Hair Colouring"}
Functions ¶
Types ¶
type BarberShop ¶
type BarberShop struct {
// contains filtered or unexported fields
}
func (*BarberShop) ExecuteJob ¶
func (shop *BarberShop) ExecuteJob(j *Job, mutex *sync.Mutex)
Start a Job
func (*BarberShop) HandleBarberShopEvents ¶
func (shop *BarberShop) HandleBarberShopEvents()
Handle BarberShop events: Events listen for BarberShop Activities
func (*BarberShop) PerformShopActivities ¶
func (shop *BarberShop) PerformShopActivities()
Perform the BarberShop Activities
Click to show internal directories.
Click to hide internal directories.