Documentation ¶
Index ¶
- func Default(namespace, name string, new func() any)
- func DefaultNoCtx(namespace, name string, new func() any)
- func Get[T object.ObjectInterface](namespace, name string, ctx object.CtxInterface) T
- func GetNoCtx[T object.ObjNoCtxInterface](namespace, name string) T
- func GetObjNoCtx(namespace, name string) object.ObjNoCtxInterface
- func GetObject(namespace, name string, ctx object.CtxInterface) object.ObjectInterface
- func Put[T object.ObjectInterface](obj T)
- func PutNoCtx[T object.ObjNoCtxInterface](obj T)
- func Reg(pool PoolInterface)
- func RegNoCtx(pool PoolNoCtxInterface)
- type Context
- type Pool
- type PoolInterface
- type PoolNoCtx
- type PoolNoCtxInterface
- type PoolNoCtxs
- type Pools
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultNoCtx ¶ added in v0.0.3
func Get ¶
func Get[T object.ObjectInterface](namespace, name string, ctx object.CtxInterface) T
func GetNoCtx ¶ added in v0.0.2
func GetNoCtx[T object.ObjNoCtxInterface](namespace, name string) T
func GetObjNoCtx ¶ added in v0.0.2
func GetObjNoCtx(namespace, name string) object.ObjNoCtxInterface
func GetObject ¶
func GetObject(namespace, name string, ctx object.CtxInterface) object.ObjectInterface
func Put ¶
func Put[T object.ObjectInterface](obj T)
func PutNoCtx ¶ added in v0.0.2
func PutNoCtx[T object.ObjNoCtxInterface](obj T)
func Reg ¶
func Reg(pool PoolInterface)
func RegNoCtx ¶ added in v0.0.2
func RegNoCtx(pool PoolNoCtxInterface)
Types ¶
type Context ¶ added in v0.0.3
func NewContext ¶ added in v0.0.3
func (*Context) Get ¶ added in v0.0.3
func (c *Context) Get(namespace, name string) object.ObjectInterface
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) Get ¶
func (p *Pool) Get(ctx object.CtxInterface) object.ObjectInterface
func (*Pool) Put ¶
func (p *Pool) Put(obj object.ObjectInterface)
type PoolInterface ¶
type PoolInterface interface { Put(object.ObjectInterface) Get(object.CtxInterface) object.ObjectInterface Name() string }
type PoolNoCtx ¶ added in v0.0.2
type PoolNoCtx struct {
// contains filtered or unexported fields
}
func NewPoolNoCtx ¶ added in v0.0.2
func (*PoolNoCtx) Get ¶ added in v0.0.2
func (p *PoolNoCtx) Get() object.ObjNoCtxInterface
func (*PoolNoCtx) Put ¶ added in v0.0.2
func (p *PoolNoCtx) Put(obj object.ObjNoCtxInterface)
type PoolNoCtxInterface ¶ added in v0.0.2
type PoolNoCtxInterface interface { Put(object.ObjNoCtxInterface) Get() object.ObjNoCtxInterface Name() string }
type PoolNoCtxs ¶ added in v0.0.2
type PoolNoCtxs struct {
// contains filtered or unexported fields
}
func NewPoolNoCtxs ¶ added in v0.0.2
func NewPoolNoCtxs() *PoolNoCtxs
func (*PoolNoCtxs) Get ¶ added in v0.0.2
func (p *PoolNoCtxs) Get(namespace, name string) object.ObjNoCtxInterface
func (*PoolNoCtxs) Put ¶ added in v0.0.2
func (p *PoolNoCtxs) Put(obj object.ObjNoCtxInterface)
func (*PoolNoCtxs) Reg ¶ added in v0.0.2
func (p *PoolNoCtxs) Reg(pool PoolNoCtxInterface)
type Pools ¶
type Pools struct {
// contains filtered or unexported fields
}
func (*Pools) Get ¶
func (p *Pools) Get(namespace, name string, ctx object.CtxInterface) object.ObjectInterface
func (*Pools) Put ¶
func (p *Pools) Put(obj object.ObjectInterface)
func (*Pools) Reg ¶
func (p *Pools) Reg(pool PoolInterface)
Click to show internal directories.
Click to hide internal directories.