Types
AutotlsCert = ref object cert*: TLSCertificate privkey*: TLSPrivateKey expiry*: Moment
- Source Edit
AutotlsConfig = object acmeServerURL*: Uri nameResolver*: NameResolver renewCheckTime*: Duration renewBufferTime*: Duration issueRetries*: int issueRetryTime*: Duration brokerURL*: string dnsServerURL*: string dnsRetries*: int dnsRetryTime*: Duration acmeRetries*: int acmeRetryTime*: Duration finalizeRetries*: int finalizeRetryTime*: Duration
- Source Edit
AutotlsService = ref object of Service acmeClient*: ACMEClient broker*: AutotlsBroker cert*: Opt[AutotlsCert] certReady*: AsyncEvent running*: AsyncEvent config*: AutotlsConfig rng*: Rng
- Source Edit
Consts
AutoTLSDNSServer = "libp2p.direct"
- Source Edit
DefaultRenewBufferTime = (value: 3600000000000)
- Source Edit
DefaultRenewCheckTime = (value: 3600000000000)
- Source Edit
Procs
proc new(T: typedesc[AutotlsCert]; cert: TLSCertificate; privkey: TLSPrivateKey; expiry: Moment): T:type {....raises: [].}
- Source Edit
proc new(T: typedesc[AutotlsConfig]; ipAddress: Opt[IpAddress] = Opt.none(IpAddress); nameServers: seq[TransportAddress] = DefaultDnsServers; acmeServerURL: Uri = parseUri(LetsEncryptURL); renewCheckTime: Duration = DefaultRenewCheckTime; renewBufferTime: Duration = DefaultRenewBufferTime; issueRetries: int = DefaultIssueRetries; issueRetryTime: Duration = DefaultIssueRetryTime; brokerURL: string = DefaultBrokerURL; dnsServerURL: string = AutoTLSDNSServer; dnsRetries: int = 10; dnsRetryTime: Duration = 1.seconds; acmeRetries: int = 10; acmeRetryTime: Duration = 1.seconds; finalizeRetries: int = 10; finalizeRetryTime: Duration = 1.seconds): T:type {....raises: [].}
- Source Edit
proc new(T: typedesc[AutotlsService]; rng: Rng; config: AutotlsConfig = AutotlsConfig.new()): T:type {....raises: [].}
- Source Edit
Methods
method getCertWhenReady(self: AutotlsService): InternalRaisesFuture[AutotlsCert, (AutoTLSError, CancelledError)] {.base, ...stackTrace: false, raises: [], gcsafe, raises: [], tags: [RootEffect], forbids: [].}
- Source Edit
method setup(self: AutotlsService; switch: Switch) {. ...raises: [ServiceSetupError], raises: [], tags: [ReadIOEffect, RootEffect, WriteIOEffect], forbids: [].}
- Source Edit
method start(self: AutotlsService; switch: Switch): InternalRaisesFuture[void, (CancelledError,)] {....stackTrace: false, raises: [], gcsafe, raises: [], tags: [RootEffect], forbids: [].}
- Source Edit
method stop(self: AutotlsService; switch: Switch): InternalRaisesFuture[void, (CancelledError,)] {....stackTrace: false, raises: [], gcsafe, raises: [], tags: [RootEffect], forbids: [].}
- Source Edit