MCPcopy Create free account
hub / github.com/kataras/iris / myCustomContextPool

Struct myCustomContextPool

_examples/routing/custom-context/main.go:38–40  ·  view source on GitHub ↗

* Custom Context Pool */ Create the context sync pool for our custom context, the pool must implement Acquire() T and Release(T) methods to satisfy the iris.ContextPool interface.

Source from the content-addressed store, hash-verified

36// Create the context sync pool for our custom context,
37// the pool must implement Acquire() T and Release(T) methods to satisfy the iris.ContextPool interface.
38type myCustomContextPool struct {
39 pool sync.Pool
40}
41
42// Acquire returns a new custom context from the pool.
43func (p *myCustomContextPool) Acquire(ctx iris.Context) *myCustomContext {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected