Documentation
¶
Overview ¶
Package mediator is an example of the Mediator Pattern.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func СonnectСolleagues ¶
СonnectСolleagues connects all colleagues.
Types ¶
type Cannery ¶
type Cannery struct {
// contains filtered or unexported fields
}
Cannery implements a Cannery colleague.
func (*Cannery) SetMediator ¶
SetMediator sets mediator.
type ConcreteMediator ¶
Тип ConcreteMediator, реализует посредника
func (*ConcreteMediator) Notify ¶
func (m *ConcreteMediator) Notify(msg string)
Notify implementation.
type Farmer ¶
type Farmer struct {
// contains filtered or unexported fields
}
Farmer implements a Farmer colleague
func (*Farmer) SetMediator ¶
SetMediator sets mediator.
type Mediator ¶
type Mediator interface {
Notify(msg string)
}
Mediator provides a mediator interface.
type Shop ¶
type Shop struct {
// contains filtered or unexported fields
}
Shop implements a Shop colleague.
func (*Shop) SellKetchup ¶
SellKetchup converts ketchup to money.
Click to show internal directories.
Click to hide internal directories.