Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PolicyData ¶
type PolicyData struct { ID string Datasets map[string]bool GroupIds map[string]bool Name string Backend string Version int32 Data interface{} State PolicyState BackendErr string LastScrapeBytes int64 LastScrapeTS time.Time }
func (*PolicyData) GetDatasetIDs ¶
func (d *PolicyData) GetDatasetIDs() []string
type PolicyRepo ¶
type PolicyRepo interface { Exists(policyID string) bool Get(policyID string) (PolicyData, error) Remove(policyID string) error Update(data PolicyData) error GetAll() ([]PolicyData, error) GetByName(policyName string) (PolicyData, error) EnsureDataset(policyID string, datasetID string) error RemoveDataset(policyID string, datasetID string) (bool, error) EnsureGroupID(policyID string, agentGroupID string) error }
func NewMemRepo ¶
func NewMemRepo(logger *zap.Logger) (PolicyRepo, error)
type PolicyState ¶
type PolicyState int
const ( Unknown PolicyState = iota Running FailedToApply Offline )
func (*PolicyState) Scan ¶
func (s *PolicyState) Scan(value interface{}) error
func (PolicyState) String ¶
func (s PolicyState) String() string
Click to show internal directories.
Click to hide internal directories.