Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultPort is the port used by the application per default. // It was selected such that it doesn't seem that other applications use it as // a default. DefaultPort = "6545" DefaultPrivateKeySize = 4096 DefaultPublicKeyFingerprintLength = 8 DefaultPublicKeyFingerprintChallengeLevel = 21 )
View Source
const ( DefaultMaxWorkerTimeoutInSeconds = 100 DefaultMaxRequestTimeoutInSeconds = 24 * 60 * 60 DefaultCertificateValidFor = 365 * 24 * time.Hour )
View Source
const ( DefaultUpdateRegistrationIntervalInSeconds = 10 DefaultRegistrationTimeoutInSeconds = 10 * DefaultUpdateRegistrationIntervalInSeconds )
Variables ¶
View Source
var DefaultCertificateHosts = []string{"localhost", "127.0.0.1"}
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { // DbPath points to a directory were the database files are stored in. // The files are named after the Drop / Worker name and created if not existing. DbPath string // PrivateKeyPath refers to a path containing private key files for each Drop and Worker. // The files will contain ASN.1 PKCS#1 DER encoded private RSA keys. // They are named after the Drop / Worker name, suffixed by ".private.pem" and created if not existing. PrivateKeyPath string // CertPath refers to a path containing certificate files for each Drop. // The files are named after the Drop name and created if not existing. CertPath string // Workers configured in this application Workers []Worker // Drops configured in this application Drops []Drop // PublicKeyFingerprintLength influences the length of the public keys fingerprint. The greater the length, the // more reliable the fingerprint is, but the harder it is to remember for human users. PublicKeyFingerprintLength uint // PublicKeyFingerprintChallengeLevel influences the time it takes to generate the fingerprint. The greater the // level, the more secure the fingerprint is against pre-image attacks, but the longer it takes to generate and // validate the fingerprint. PublicKeyFingerprintChallengeLevel uint }
Application configuration, created once in application lifecycle.
func Dummy ¶
func Dummy() *Application
type Drop ¶
type Drop struct { // Name identifies this drop uniquely Name string // ListenAddress defines the the local network address this drop // shall listen on. ListenAddress string // MaxWorkerTimeoutInSeconds limits the time period a worker registration may be considered active without having // received an update from the worker. MaxWorkerTimeoutInSeconds int // MaxRequestTimeoutInSeconds limits the time period during which a request and its response may be processed and // retrieved. MaxRequestTimeoutInSeconds int // PrivateKeySize is the size of the private RSA key in bits, mostly 2048 oder 4096. PrivateKeySize int // CertificateValidFor determines how long a autogenerated certificate is valid, starting from now. CertificateValidFor time.Duration // CertificateHosts is a list of IP addresses or hostnames a autogenerated certificate is valid for. CertificateHosts []string }
Drop configuration, created once per configured drop
type Worker ¶
type Worker struct { // Name identifies this worker for human users Name string // DropUrl identifies the drop instances this worker should connect to DropUrl *url.URL // UpdateRegistrationIntervalInSeconds specifies how often the worker sends a registration update to the drop. UpdateRegistrationIntervalInSeconds int // RegistrationTimeoutInSeconds specifies how long the registration at the drop is requested to be valid without // sending an update. RegistrationTimeoutInSeconds int // PrivateKeySize is the size of the private RSA key in bits, mostly 2048 oder 4096. PrivateKeySize int // DropFingerprint allows to validate the Drops TLS certificate using the fingerprint mechanism. If empty, the // usual certificate validation is used. DropFingerprint string }
Worker configuration, created once per configured worker.
Click to show internal directories.
Click to hide internal directories.