Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFunction = errors.New("not function") ErrInvalidFunction = errors.New("invalid function") DefaultValidKey = 1 )
Functions ¶
This section is empty.
Types ¶
type ICProducer ¶
type ICProducer func(interface{}, ...interface{}) (interface{}, error)
ICProducer defines formal producer: func(cached TypeA, args...) (value TypeA, error) Alternation: func(cached TypeA, args) (value TypeA) func(args) (value TypeA, error) func(args) (value TypeA)
func FormalizeChainedICProducer ¶
func FormalizeChainedICProducer(f interface{}) ICProducer
func FormalizeICProducer ¶
func FormalizeICProducer(f interface{}) ICProducer
func TryFormalizeChainedICProducer ¶
func TryFormalizeChainedICProducer(f interface{}) (ICProducer, error)
func TryFormalizeICProducer ¶
func TryFormalizeICProducer(f interface{}) (ICProducer, error)
type ICValidator ¶
type ICValidator func(interface{}) bool
ICValidator defines formal validator: func(cached TypeA) (validity bool)
func FormalizeICValidator ¶
func FormalizeICValidator(f interface{}) ICValidator
func TryFormalizeICValidator ¶
func TryFormalizeICValidator(f interface{}) (ICValidator, error)
type InlineCache ¶
type InlineCache struct { Producer ICProducer Validator ICValidator // contains filtered or unexported fields }
func (*InlineCache) Invalidate ¶
func (c *InlineCache) Invalidate()
func (*InlineCache) Value ¶
func (c *InlineCache) Value(args ...interface{}) interface{}
func (*InlineCache) ValueWithError ¶
func (c *InlineCache) ValueWithError(args ...interface{}) (cached interface{}, err error)
Click to show internal directories.
Click to hide internal directories.