Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source is the File implementation of the policy.Source interface.
func (*Source) MonitorIDs ¶
func (s *Source) MonitorIDs(ctx context.Context, req policy.MonitorIDsReq)
MonitorIDs satisfies the MonitorIDs function of the policy.Source interface.
func (*Source) MonitorPolicy ¶
func (s *Source) MonitorPolicy(ctx context.Context, req policy.MonitorPolicyReq)
MonitorPolicy reads policy from a file on disk and writes it to req.ResultCh. Any error doing so will be sent to req.ErrCh. If MonitorPolicy receives on s.ReloadCh, it will re-check the file on disk, and write again to req.ResultCh if the policy has changed. Note: MonitorPolicy should only return when ctx is done.
func (*Source) Name ¶
func (s *Source) Name() policy.SourceName
Name satisfies the Name function of the policy.Source interface.
func (*Source) ReloadIDsMonitor ¶
func (s *Source) ReloadIDsMonitor()
ReloadIDsMonitor satisfies the ReloadIDsMonitor function of the policy.Source interface.
Click to show internal directories.
Click to hide internal directories.