mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
21 lines
483 B
TypeScript
21 lines
483 B
TypeScript
import { Effects } from '../Effects'
|
|
import { Watchable } from './Watchable'
|
|
|
|
export class GetSslCertificate extends Watchable<[string, string, string]> {
|
|
protected readonly label = 'GetSslCertificate'
|
|
|
|
constructor(
|
|
effects: Effects,
|
|
readonly opts: {
|
|
hostnames: string[]
|
|
algorithm?: 'ecdsa' | 'ed25519'
|
|
},
|
|
) {
|
|
super(effects)
|
|
}
|
|
|
|
protected fetch(callback?: () => void) {
|
|
return this.effects.getSslCertificate({ ...this.opts, callback })
|
|
}
|
|
}
|