Help us shape the future of Go! Take the 2026 Go Developer Survey

provision

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT-0 Imports: 9 Imported by: 0

Documentation

Overview

Package provision creates the mxRaven domain, listeners, keys, routes, and S3 archive rule needed by a perch installation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForDNS

func WaitForDNS(ctx context.Context, baseURL, token, tenant string, result *Result, interval, timeout time.Duration, logf func(string, ...any)) error

WaitForDNS polls mxRaven until the sending domain and inbound route are verified, or the timeout expires.

Types

type Options

type Options struct {
	BaseURL                  string
	Token                    string
	Tenant                   string
	Hostname                 string
	DataDir                  string
	Domain                   string
	InboundDomain            string
	SendingDomain            string
	EnableSubmission         bool
	Storage                  config.StorageConfig
	DryRun                   bool
	AuthPolicy               string
	Rspamd                   bool
	RejectMalware            bool
	RejectHighConfidenceSpam bool
	RateLimit                *RateLimit
}

Options controls provisioning.

type RateLimit

type RateLimit struct {
	MessageRatePerMinute   float64
	RecipientRatePerMinute float64
	TaskRatePerMinute      float64
	Burst                  int32
	MaxConcurrency         int32
}

RateLimit configures an MTA listener override. Zero fields are left at zero in the request; callers normally set all fields.

type Record

type Record struct {
	Name     string
	Type     string
	Value    string
	Priority int32
	Purpose  string
}

Record is one DNS instruction returned by mxRaven.

type Result

type Result struct {
	Config   config.Config
	DNS      []Record
	Notes    []string
	DomainID uuid.UUID
	RouteID  uuid.UUID
}

Result is the generated configuration and the DNS records the user must publish.

func Run

func Run(ctx context.Context, opts Options) (*Result, error)

Run creates or reuses the mxRaven resources. It never stores the control-plane token.

Jump to

Keyboard shortcuts

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