Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DelayingMediator ¶
func NewDelayingMediator ¶
func NewDelayingMediator(delay string) *DelayingMediator
func (*DelayingMediator) Mediate ¶
func (dm *DelayingMediator) Mediate(message model.RequestMessage, responses <-chan model.ResponseMessage) <-chan model.ResponseMessage
type GeneratingMediator ¶
type GeneratingMediator struct {
// contains filtered or unexported fields
}
func NewGeneratingMediator ¶
func NewGeneratingMediator(quantity int, bodyTempalte []string) *GeneratingMediator
func (*GeneratingMediator) Mediate ¶
func (gm *GeneratingMediator) Mediate(message model.RequestMessage, responses <-chan model.ResponseMessage) <-chan model.ResponseMessage
type MatchingMediator ¶
type MatchingMediator struct {
// contains filtered or unexported fields
}
func NewMatchingMediator ¶
func NewMatchingMediator(pattern matchers.Pattern, matchers []matchers.Matcher) *MatchingMediator
func (*MatchingMediator) Mediate ¶
func (mm *MatchingMediator) Mediate(message model.RequestMessage, responses <-chan model.ResponseMessage) <-chan model.ResponseMessage
type Mediator ¶
type Mediator interface { // Mediate is a function that should be done with message Mediate(message model.RequestMessage, _ <-chan model.ResponseMessage) <-chan model.ResponseMessage }
Mediator is an interface that should be implemented by all mediators
type MediatorChain ¶
type MediatorChain struct {
// contains filtered or unexported fields
}
func (*MediatorChain) Append ¶
func (mc *MediatorChain) Append(mediator Mediator)
func (*MediatorChain) Prepend ¶
func (mc *MediatorChain) Prepend(mediator Mediator)
func (*MediatorChain) Run ¶
func (mc *MediatorChain) Run(request model.RequestMessage, base model.ResponseMessage) <-chan model.ResponseMessage
type RandomDelayingMediator ¶
func NewRandomDelayingMediator ¶
func NewRandomDelayingMediator(minDelay, maxDelay string) *RandomDelayingMediator
func (*RandomDelayingMediator) Mediate ¶
func (rdm *RandomDelayingMediator) Mediate(message model.RequestMessage, responses <-chan model.ResponseMessage) <-chan model.ResponseMessage
Click to show internal directories.
Click to hide internal directories.