nomad

package
v2.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostDomain

func HostDomain(hostKey types.PublicKey) string

HostDomain generates the host domain for a given public key.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

A Client is a client for the nomad service that issues certificates and updates DNS records.

func NewClient

func NewClient(hostKey types.PrivateKey) *Client

NewClient creates a new nomad client with the given host key.

func (*Client) IssueCertificate

func (c *Client) IssueCertificate(ctx context.Context) (*rsa.PrivateKey, []*x509.Certificate, error)

IssueCertificate issues a new certificate for the host.

func (*Client) UpdateDNS

func (c *Client) UpdateDNS(ctx context.Context, update UpdateDNSRequest, hostKey types.PrivateKey) (string, error)

UpdateDNS updates the DNS records for the host with the given IPv4 and/or IPv6 addresses. It returns the domain that was updated.

type UpdateDNSRequest

type UpdateDNSRequest struct {
	IPv4 string `json:"ipv4"`
	IPv6 string `json:"ipv6"`
}

An UpdateDNSRequest is a request to update DNS records

type UpdateDNSResponse

type UpdateDNSResponse struct {
	Domain string `json:"domain"` // the domain that was updated
}

An UpdateDNSResponse is the response from a DNS update request

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL