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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (ic *InterceptorsContainer) Len() int
Len returns the length of the added objects
func (*InterceptorsContainer) Remove ¶
func (ic *InterceptorsContainer) Remove(key string)
Remove will remove an object at a given key
func (*InterceptorsContainer) Replace ¶
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.