Documentation ¶
Index ¶
- type DiscoveryConfig
- func (a *DiscoveryConfig) CheckAndSetDefaults() error
- func (a *DiscoveryConfig) CloneResource() types.ResourceWithLabels
- func (m *DiscoveryConfig) Equal(n *DiscoveryConfig) bool
- func (a *DiscoveryConfig) GetDiscoveryGroup() string
- func (a *DiscoveryConfig) GetMetadata() types.Metadata
- func (m *DiscoveryConfig) IsEqual(n *DiscoveryConfig) bool
- func (a *DiscoveryConfig) MatchSearch(values []string) bool
- type Spec
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscoveryConfig ¶
type DiscoveryConfig struct { // ResourceHeader is the common resource header for all resources. header.ResourceHeader // Spec is the specification for the discovery config. Spec Spec `json:"spec" yaml:"spec"` // Status is the status for the discovery config. Status Status `json:"status" yaml:"status"` }
DiscoveryConfig describes extra discovery matchers that are added to DiscoveryServices that share the same Discovery Group.
func NewDiscoveryConfig ¶
func NewDiscoveryConfig(metadata header.Metadata, spec Spec) (*DiscoveryConfig, error)
NewDiscoveryConfig will create a new discovery config.
func (*DiscoveryConfig) CheckAndSetDefaults ¶
func (a *DiscoveryConfig) CheckAndSetDefaults() error
CheckAndSetDefaults validates fields and populates empty fields with default values.
func (*DiscoveryConfig) CloneResource ¶
func (a *DiscoveryConfig) CloneResource() types.ResourceWithLabels
CloneResource returns a copy of the resource as types.ResourceWithLabels.
func (*DiscoveryConfig) Equal ¶
func (m *DiscoveryConfig) Equal(n *DiscoveryConfig) bool
Equal checks if the discovery config is equal to another. Deprecated: use IsEqual.
func (*DiscoveryConfig) GetDiscoveryGroup ¶
func (a *DiscoveryConfig) GetDiscoveryGroup() string
GetDiscoveryGroup returns the DiscoveryGroup from the discovery config.
func (*DiscoveryConfig) GetMetadata ¶
func (a *DiscoveryConfig) GetMetadata() types.Metadata
GetMetadata returns metadata. This is specifically for conforming to the Resource interface, and should be removed when possible.
func (*DiscoveryConfig) IsEqual ¶
func (m *DiscoveryConfig) IsEqual(n *DiscoveryConfig) bool
IsEqual checks if the discovery config is equal to another.
func (*DiscoveryConfig) MatchSearch ¶
func (a *DiscoveryConfig) MatchSearch(values []string) bool
MatchSearch goes through select field values of a resource and tries to match against the list of search values.
type Spec ¶
type Spec struct { // DiscoveryGroup is the Discovery Group for the current DiscoveryConfig. // DiscoveryServices should include all the matchers if the DiscoveryGroup matches with their own group. DiscoveryGroup string `json:"discovery_group" yaml:"discovery_group"` // AWS is a list of matchers for the supported resources in AWS. AWS []types.AWSMatcher `json:"aws,omitempty" yaml:"aws"` // Azure is a list of matchers for the supported resources in Azure. Azure []types.AzureMatcher `json:"azure,omitempty" yaml:"azure"` // GCP is a list of matchers for the supported resources in GCP. GCP []types.GCPMatcher `json:"gcp,omitempty" yaml:"gcp"` // Kube is a list of matchers for the supported resources in Kubernetes. Kube []types.KubernetesMatcher `json:"kube,omitempty" yaml:"kube"` // AccessGraph is the configuration for the Access Graph Cloud sync. AccessGraph *types.AccessGraphSync `json:"access_graph,omitempty" yaml:"access_graph"` }
Spec is the specification for a discovery config.
type Status ¶
type Status struct { // State is the current state of the discovery config. State string `json:"state" yaml:"state"` // ErrorMessage holds the error message when state is DISCOVERY_CONFIG_STATE_ERROR. ErrorMessage *string `json:"error_message,omitempty" yaml:"error_message,omitempty"` // DiscoveredResources holds the count of the discovered resources in the previous iteration. DiscoveredResources uint64 `json:"discovered_resources" yaml:"discovered_resources"` // LastSyncTime is the timestamp when the Discovery Config was last sync. LastSyncTime time.Time `json:"last_sync_time,omitempty" yaml:"last_sync_time,omitempty"` // IntegrationDiscoveredResources maps an integration to a summary of resources that were found using that integration. IntegrationDiscoveredResources map[string]*discoveryconfigv1.IntegrationDiscoveredSummary `json:"integration_discovered_resources,omitempty" yaml:"integration_discovered_resources,omitempty"` }
Status holds dynamic information about the discovery configuration running status such as errors, state and count of the resources.