func NewAcquiredStrategyToken(inFlightCount int, releaseFunc func()) StrategyToken {
	return &StaticStrategyToken{
		acquired:      true,
		inFlightCount: inFlightCount,
		releaseFunc:   releaseFunc,
	}
}
NewAcquiredStrategyToken will create a new acquired strategy token.
package core
import (
	"context"
)
type StrategyToken interface {
	IsAcquired() bool
	InFlightCount() int
	Release()
}
type StaticStrategyToken struct {
	acquired      bool
	inFlightCount int
	releaseFunc   func()
}
func (t *StaticStrategyToken) IsAcquired() bool {
	return t.acquired
}
func (t *StaticStrategyToken) InFlightCount() int {
	return t.inFlightCount
}
func (t *StaticStrategyToken) Release() {
	if t.releaseFunc != nil {
		t.releaseFunc()
	}
}
func NewNotAcquiredStrategyToken(inFlightCount int) StrategyToken {
	return &StaticStrategyToken{
		acquired:      false,
		inFlightCount: inFlightCount,
		releaseFunc:   func() {},
	}
}