Documentation ¶
Index ¶
- type Policy
- type PolicyChangeSubscriber
- type Storage
- func (s *Storage) AddPolicyChangeSubscriber(subscriber PolicyChangeSubscriber)
- func (s *Storage) GetRefreshPolicies(ctx context.Context) ([]*Policy, error)
- func (s *Storage) ListenPolicyDataChanges(ctx context.Context) error
- func (s *Storage) Policy(ctx context.Context, group, name, version string) (*Policy, error)
- func (s *Storage) PostponeRefresh(ctx context.Context, policies []*Policy) error
- func (s *Storage) SetPolicyLock(ctx context.Context, group, name, version string, lock bool) error
- func (s *Storage) Transaction(ctx context.Context, ...) (interface{}, error)
- func (s *Storage) UpdateNextRefreshTime(ctx context.Context, p *Policy, nextDataRefreshTime time.Time) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PolicyChangeSubscriber ¶
type PolicyChangeSubscriber interface {
PolicyDataChange()
}
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) AddPolicyChangeSubscriber ¶
func (s *Storage) AddPolicyChangeSubscriber(subscriber PolicyChangeSubscriber)
func (*Storage) GetRefreshPolicies ¶
func (*Storage) ListenPolicyDataChanges ¶
func (*Storage) PostponeRefresh ¶
PostponeRefresh adds a refreshPostponePeriod Duration to each policy's nextDataRefreshTimeField in order to prevent concurrent data refresh
func (*Storage) SetPolicyLock ¶
func (*Storage) Transaction ¶
Click to show internal directories.
Click to hide internal directories.