Documentation ¶
Index ¶
- type InterceptorsContainer
- func (ic *InterceptorsContainer) Add(key string, interceptor process.Interceptor) error
- func (ic *InterceptorsContainer) AddMultiple(keys []string, interceptors []process.Interceptor) error
- func (ic *InterceptorsContainer) Get(key string) (process.Interceptor, error)
- func (ic *InterceptorsContainer) Len() int
- func (ic *InterceptorsContainer) Remove(key string)
- func (ic *InterceptorsContainer) Replace(key string, interceptor process.Interceptor) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InterceptorsContainer ¶ added in v1.0.3
type InterceptorsContainer struct {
// contains filtered or unexported fields
}
InterceptorsContainer is an interceptors holder organized by type
func NewInterceptorsContainer ¶
func NewInterceptorsContainer() *InterceptorsContainer
NewInterceptorsContainer will create a new instance of a container
func (*InterceptorsContainer) Add ¶ added in v1.0.3
func (ic *InterceptorsContainer) Add(key string, interceptor process.Interceptor) error
Add will add an object at a given key. Returns an error if the element already exists
func (*InterceptorsContainer) AddMultiple ¶ added in v1.0.3
func (ic *InterceptorsContainer) AddMultiple(keys []string, interceptors []process.Interceptor) error
AddMultiple will add objects with given keys. Returns an error if one element already exists, lengths mismatch or an interceptor is nil
func (*InterceptorsContainer) Get ¶ added in v1.0.3
func (ic *InterceptorsContainer) Get(key string) (process.Interceptor, error)
Get returns the object stored at a certain key. Returns an error if the element does not exist
func (*InterceptorsContainer) Len ¶ added in v1.0.3
func (ic *InterceptorsContainer) Len() int
Len returns the length of the added objects
func (*InterceptorsContainer) Remove ¶ added in v1.0.3
func (ic *InterceptorsContainer) Remove(key string)
Remove will remove an object at a given key
func (*InterceptorsContainer) Replace ¶ added in v1.0.3
func (ic *InterceptorsContainer) Replace(key string, interceptor process.Interceptor) error
Replace will add (or replace if it already exists) an object at a given key
Click to show internal directories.
Click to hide internal directories.