Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var APIToken string
APIToken is an authentication token used for the backend API as an alternative to oauth flows.
var BackoffMaxTime time.Duration
BackoffMaxTime is the maximum time for which data gatherers will be retried
var ClientID string
ClientID is the clientID in case of Venafi Cloud mode
var ConfigFilePath string
ConfigFilePath is where the agent will try to load the configuration from
var CredentialsPath string
CredentialsPath is where the agent will try to loads the credentials. (Experimental)
var InputPath string
InputPath is where the agent will read data from instead of gathering from clusters if specified
var OneShot bool
OneShot flag causes agent to run once
var OutputPath string
OutputPath is where the agent will write data to locally if specified
var Period time.Duration
Period is the time waited between scans
var PrivateKeyPath string
PrivateKeyPath is the path for the service account private key in case of Venafi Cloud mode
var Profiling bool
Profiling flag enabled pprof endpoints to run on the agent
var Prometheus bool
Prometheus flag enabled Prometheus metrics endpoint to run on the agent
var StrictMode bool
StrictMode flag causes the agent to fail at the first attempt
var VenafiCloudMode bool
VenafiCloudMode flag determines which format to load for config and credential type
Functions ¶
Types ¶
type Config ¶
type Config struct { Schedule string `yaml:"schedule"` Period time.Duration `yaml:"period"` // Deprecated: Endpoint is being replaced with Server. Endpoint Endpoint `yaml:"endpoint"` // Server is the base url for the Preflight server. // It defaults to https://preflight.jetstack.io. Server string `yaml:"server"` // OrganizationID within Preflight that will receive the data. OrganizationID string `yaml:"organization_id"` // ClusterID is the cluster that the agent is scanning. ClusterID string `yaml:"cluster_id"` ClusterDescription string `yaml:"cluster_description"` DataGatherers []DataGatherer `yaml:"data-gatherers"` // InputPath replaces DataGatherers with input data file InputPath string `yaml:"input-path"` // OutputPath replaces Server with output data file OutputPath string `yaml:"output-path"` VenafiCloud *VenafiCloudConfig `yaml:"venafi-cloud,omitempty"` }
Config wraps the options for a run of the agent.
func ParseConfig ¶
ParseConfig reads config into a struct used to configure running agents
type DataGatherer ¶ added in v0.1.32
type DataGatherer struct { Kind string `yaml:"kind"` Name string `yaml:"name"` DataPath string `yaml:"data_path"` Config datagatherer.Config }
func (*DataGatherer) UnmarshalYAML ¶ added in v0.1.32
func (dg *DataGatherer) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML unmarshals a dataGatherer resolving the type according to Kind.