Documentation ¶
Index ¶
- type MemoryManager
- func (m *MemoryManager) Create(policy Policy) error
- func (m *MemoryManager) Delete(id string) error
- func (m *MemoryManager) FindRequestCandidates(r *Request) (Policies, error)
- func (m *MemoryManager) Get(id string) (Policy, error)
- func (m *MemoryManager) GetAll(limit, offset int64) (Policies, error)
- func (m *MemoryManager) Update(policy Policy) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryManager ¶
MemoryManager is an in-memory (non-persistent) implementation of Manager.
func NewMemoryManager ¶
func NewMemoryManager() *MemoryManager
NewMemoryManager constructs and initializes new MemoryManager with no policies.
func (*MemoryManager) Create ¶
func (m *MemoryManager) Create(policy Policy) error
Create a new pollicy to MemoryManager.
func (*MemoryManager) Delete ¶
func (m *MemoryManager) Delete(id string) error
Delete removes a policy.
func (*MemoryManager) FindRequestCandidates ¶
func (m *MemoryManager) FindRequestCandidates(r *Request) (Policies, error)
FindRequestCandidates returns candidates that could match the request object. It either returns a set that exactly matches the request, or a superset of it. If an error occurs, it returns nil and the error.
func (*MemoryManager) Get ¶
func (m *MemoryManager) Get(id string) (Policy, error)
Get retrieves a policy.
func (*MemoryManager) GetAll ¶
func (m *MemoryManager) GetAll(limit, offset int64) (Policies, error)
GetAll returns all policies.
func (*MemoryManager) Update ¶ added in v0.8.0
func (m *MemoryManager) Update(policy Policy) error
Update updates an existing policy.
Click to show internal directories.
Click to hide internal directories.