Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Behavior ¶
type Behavior[T any] interface { Become(performance Performance[T]) BecomeStacked(performance Performance[T]) UnBecomeStacked() Perform(ctx T) }
type FunctionalPerformance ¶
type FunctionalPerformance[T any] func(ctx T)
FunctionalPerformance 函数式的行为表现,它实现了 Performance 接口
func (FunctionalPerformance[T]) Perform ¶
func (f FunctionalPerformance[T]) Perform(ctx T)
Perform 履行行为
type FunctionalStatefulPerformance ¶
type FunctionalStatefulPerformance[T any] func() Performance[T]
FunctionalStatefulPerformance 函数式有状态的行为表现
func (FunctionalStatefulPerformance[T]) Stateful ¶
func (f FunctionalStatefulPerformance[T]) Stateful() Performance[T]
Stateful 将其状态化
type Performance ¶
type Performance[T any] interface { // Perform 履行行为 Perform(ctx T) }
Performance 行为具体表现
Click to show internal directories.
Click to hide internal directories.