Documentation
¶
Index ¶
Constants ¶
View Source
const ( AuthTypeToken = "token" AuthTypeAppRole = "approle" AuthTypeKubernetes = "kubernetes" AuthTypeJWT = "jwt" )
Variables ¶
View Source
var (
ErrEmptySecret = errors.New("empty secret")
)
View Source
var ErrNotModified = errors.New("CRL not modified")
Functions ¶
func NewFactory ¶
Types ¶
type AuthAppRole ¶
type AuthAppRole struct {
RoleID string `mapstructure:"role_id"`
SecretID configopaque.String `mapstructure:"secret_id"`
WrappingToken bool `mapstructure:"wrapping_token"`
MountPath string `mapstructure:"mount_path"`
}
type AuthConfig ¶
type AuthConfig struct {
AuthType string `mapstructure:"type"`
AuthToken AuthToken `mapstructure:"token"`
AuthAppRole AuthAppRole `mapstructure:"approle"`
AuthKubernetes AuthKubernetes `mapstructure:"kubernetes"`
AuthJWT AuthJWT `mapstructure:"jwt"`
}
type AuthJWT ¶
type AuthJWT struct {
RoleName string `mapstructure:"role_name"`
Token configopaque.String `mapstructure:"token"`
TokenPath string `mapstructure:"token_path"`
MountPath string `mapstructure:"mount_path"`
}
type AuthKubernetes ¶
type AuthKubernetes struct {
RoleName string `mapstructure:"role_name"`
ServiceAccountToken configopaque.String `mapstructure:"service_account_token"`
ServiceAccountTokenPath string `mapstructure:"service_account_token_path"`
MountPath string `mapstructure:"mount_path"`
}
type AuthToken ¶
type AuthToken struct {
Token configopaque.String `mapstructure:"token"`
}
type CRL ¶
type CRL struct {
// contains filtered or unexported fields
}
func NewCRL ¶
func NewCRL( logger *zap.Logger, shared *ScrapeShared, uri string, role metadata.AttributeCrlRole, kind metadata.AttributeCrlKind, ) *CRL
Creates a CRL processor for a single issuer CRL URI.
func (*CRL) Emit ¶
func (c *CRL) Emit(mb *metadata.MetricsBuilder, metrics crlMetrics)
Records CRL metrics to the metrics builder.
type Certificate ¶
type Certificate struct {
// contains filtered or unexported fields
}
func NewCertificate ¶
func NewCertificate( state *ScrapeShared, mount string, issuerId string, certificate string, ) Certificate
func (*Certificate) Collect ¶
func (c *Certificate) Collect() error
func (*Certificate) Emit ¶
func (c *Certificate) Emit()
type Config ¶
type Config struct {
scraperhelper.ControllerConfig `mapstructure:",squash"`
metadata.MetricsBuilderConfig `mapstructure:",squash"`
Address string `mapstructure:"address"`
Namespace string `mapstructure:"namespace"`
MatchRegex string `mapstructure:"match_regex"`
ConcurrencyLimit uint `mapstructure:"concurrency_limit"`
Crl CrlConfig `mapstructure:"crl"`
Auth AuthConfig `mapstructure:"auth"`
// contains filtered or unexported fields
}
type CrlConfig ¶
type CrlConfig struct {
Enabled bool `mapstructure:"enabled"`
ScrapeParent bool `mapstructure:"scrape_parent"`
CacheSize uint `mapstructure:"cache_size"`
Timeout time.Duration `mapstructure:"timeout"`
Retries uint `mapstructure:"retries"`
RetryInterval time.Duration `mapstructure:"retry_interval"`
}
type Issuer ¶
type Issuer struct {
// contains filtered or unexported fields
}
type LDAPURI ¶
type LDAPURI struct {
Scheme string // ldap, ldaps, ldapi
Host string // hostname or IP
Port string // port number (e.g., "389")
DN string // Distinguished Name (path)
Attributes []string // List of attributes to retrieve
Scope string // base, one, or sub
Filter string // Search filter
Extensions []string // Extension strings
}
Components of a parsed LDAP URI.
type Mount ¶
type Mount struct {
// contains filtered or unexported fields
}
type ScrapeShared ¶
type ScrapeShared struct {
// contains filtered or unexported fields
}
Common, per-scrape shared state.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.