Documentation ¶
Index ¶
- Variables
- func CatchSignals(logger blog.Logger, callback func())
- func Clock() clock.Clock
- func FailOnError(err error, msg string)
- func FilterShutdownErrors(err error) error
- func LoadCert(path string) (cert []byte, err error)
- func NewLogger(logConf SyslogConfig) blog.Logger
- func ReadConfigFile(filename string, out interface{}) error
- func StatsAndLogging(logConf SyslogConfig, addr string) (metrics.Scope, blog.Logger)
- func VersionString() string
- type CAADistributedResolverConfig
- type ConfigDuration
- type DBConfig
- type GRPCClientConfig
- type GRPCServerConfig
- type GoogleSafeBrowsingConfig
- type HostnamePolicyConfig
- type LogDescription
- type OCSPUpdaterConfig
- type PAConfig
- type PasswordConfig
- type PortConfig
- type RPCServerConfig
- type SMTPConfig
- type ServiceConfig
- type StatsdConfig
- type SyslogConfig
- type TLSConfig
Constants ¶
This section is empty.
Variables ¶
var ErrDurationMustBeString = errors.New("cannot JSON unmarshal something other than a string into a ConfigDuration")
ErrDurationMustBeString is returned when a non-string value is presented to be deserialized as a ConfigDuration
Functions ¶
func CatchSignals ¶
CatchSignals catches SIGTERM, SIGINT, SIGHUP and executes a callback method before exiting
func Clock ¶
Clock functions similarly to clock.Default(), but the returned value can be changed using the FAKECLOCK environment variable if the 'integration' build flag is set.
This function returns the default Clock.
func FailOnError ¶
FailOnError exits and prints an error message if we encountered a problem
func FilterShutdownErrors ¶
FilterShutdownErrors returns the input error, with the exception of "use of closed network connection," on which it returns nil Per https://github.com/grpc/grpc-go/issues/1017, a gRPC server's `Serve()` will always return an error, even when GracefulStop() is called. We don't want to log graceful stops as errors, so we filter out the meaningless error we get in that situation.
func LoadCert ¶
LoadCert loads a PEM-formatted certificate from the provided path, returning it as a byte array, or an error if it couldn't be decoded.
func NewLogger ¶
func NewLogger(logConf SyslogConfig) blog.Logger
func ReadConfigFile ¶
ReadConfigFile takes a file path as an argument and attempts to unmarshal the content of the file into a struct containing a configuration of a boulder component.
func StatsAndLogging ¶
StatsAndLogging constructs a metrics.Scope and an AuditLogger based on its config parameters, and return them both. It also spawns off an HTTP server on the provided port to report the stats and provide pprof profiling handlers. Crashes if any setup fails. Also sets the constructed AuditLogger as the default logger, and configures the cfssl, mysql, and grpc packages to use our logger. This must be called before any gRPC code is called, because gRPC's SetLogger doesn't use any locking.
func VersionString ¶
func VersionString() string
VersionString produces a friendly Application version string.
Types ¶
type CAADistributedResolverConfig ¶
type CAADistributedResolverConfig struct { Timeout ConfigDuration MaxFailures int Proxies []string }
CAADistributedResolverConfig specifies the HTTP client setup and interfaces needed to resolve CAA addresses over multiple paths
type ConfigDuration ¶
ConfigDuration is just an alias for time.Duration that allows serialization to YAML as well as JSON.
func (ConfigDuration) MarshalJSON ¶
func (d ConfigDuration) MarshalJSON() ([]byte, error)
MarshalJSON returns the string form of the duration, as a byte array.
func (*ConfigDuration) UnmarshalJSON ¶
func (d *ConfigDuration) UnmarshalJSON(b []byte) error
UnmarshalJSON parses a string into a ConfigDuration using time.ParseDuration. If the input does not unmarshal as a string, then UnmarshalJSON returns ErrDurationMustBeString.
func (*ConfigDuration) UnmarshalYAML ¶
func (d *ConfigDuration) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML uses the same frmat as JSON, but is called by the YAML parser (vs. the JSON parser).
type DBConfig ¶
type DBConfig struct { DBConnect string // A file containing a connect URL for the DB. DBConnectFile string MaxDBConns int MaxIdleDBConns int }
DBConfig defines how to connect to a database. The connect string may be stored in a file separate from the config, because it can contain a password, which we want to keep out of configs.
type GRPCClientConfig ¶
type GRPCClientConfig struct { ServerAddresses []string Timeout ConfigDuration }
GRPCClientConfig contains the information needed to talk to the gRPC service
type GRPCServerConfig ¶
type GRPCServerConfig struct { Address string `json:"address"` // ClientNames is a list of allowed client certificate subject alternate names // (SANs). The server will reject clients that do not present a certificate // with a SAN present on the `ClientNames` list. ClientNames []string `json:"clientNames"` }
GRPCServerConfig contains the information needed to run a gRPC service
type GoogleSafeBrowsingConfig ¶
GoogleSafeBrowsingConfig is the JSON config struct for the VA's use of the Google Safe Browsing API.
type HostnamePolicyConfig ¶
type HostnamePolicyConfig struct {
HostnamePolicyFile string
}
HostnamePolicyConfig specifies a file from which to load a policy regarding what hostnames to issue for.
type LogDescription ¶
LogDescription contains the information needed to submit certificates to a CT log and verify returned receipts
type OCSPUpdaterConfig ¶
type OCSPUpdaterConfig struct { ServiceConfig DBConfig NewCertificateWindow ConfigDuration OldOCSPWindow ConfigDuration MissingSCTWindow ConfigDuration RevokedCertificateWindow ConfigDuration NewCertificateBatchSize int OldOCSPBatchSize int MissingSCTBatchSize int RevokedCertificateBatchSize int OCSPMinTimeToExpiry ConfigDuration OCSPStaleMaxAge ConfigDuration OldestIssuedSCT ConfigDuration ParallelGenerateOCSPRequests int AkamaiBaseURL string AkamaiClientToken string AkamaiClientSecret string AkamaiAccessToken string AkamaiPurgeRetries int AkamaiPurgeRetryBackoff ConfigDuration SignFailureBackoffFactor float64 SignFailureBackoffMax ConfigDuration Publisher *GRPCClientConfig SAService *GRPCClientConfig OCSPGeneratorService *GRPCClientConfig Features map[string]bool }
OCSPUpdaterConfig provides the various window tick times and batch sizes needed for the OCSP (and SCT) updater
type PAConfig ¶
PAConfig specifies how a policy authority should connect to its database, what policies it should enforce, and what challenges it should offer.
func (PAConfig) CheckChallenges ¶
CheckChallenges checks whether the list of challenges in the PA config actually contains valid challenge names
type PasswordConfig ¶
PasswordConfig either contains a password or the path to a file containing a password
func (*PasswordConfig) Pass ¶
func (pc *PasswordConfig) Pass() (string, error)
Pass returns a password, either directly from the configuration struct or by reading from a specified file
type PortConfig ¶
PortConfig specifies what ports the VA should call to on the remote host when performing its checks.
type RPCServerConfig ¶
type RPCServerConfig struct { Server string // Queue name where the server receives requests RPCTimeout ConfigDuration }
RPCServerConfig contains configuration particular to a specific RPC server type (e.g. RA, SA, etc)
type SMTPConfig ¶
type SMTPConfig struct { PasswordConfig Server string Port string Username string }
type ServiceConfig ¶
type ServiceConfig struct { // DebugAddr is the address to run the /debug handlers on. DebugAddr string GRPC *GRPCServerConfig TLS TLSConfig }
ServiceConfig contains config items that are common to all our services, to be embedded in other config structs.
type StatsdConfig ¶
StatsdConfig defines the config for Statsd.
type SyslogConfig ¶
SyslogConfig defines the config for syslogging.