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

ar

package
v1.3.97 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

Package ar pkg/services/ar/ar.go c2-vis-appsvc

address-resolver as a pkg/services.Service.

Package ar pkg/services/ar/config.go c2-vis-appsvc

Index

Constants

View Source
const Type = "address-resolver"

Type is the registry key used in services.json blocks.

Variables

This section is empty.

Functions

func New

func New(cfg *Config, log *logging.Logger) services.Service

Types

type Config

type Config struct {
	Path string `json:"-"`

	PubKey cipher.PubKey `json:"public_key,omitempty"`
	SecKey cipher.SecKey `json:"secret_key,omitempty"`

	Addr            string            `json:"addr,omitempty"`
	UDPAddr         string            `json:"udp_addr,omitempty"`
	PublicUDPAddr   string            `json:"public_udp_addr,omitempty"`
	MetricsAddr     string            `json:"metrics_addr,omitempty"`
	PprofAddr       string            `json:"pprof_addr,omitempty"`
	Redis           string            `json:"redis,omitempty"`
	RedisPoolSize   int               `json:"redis_pool_size,omitempty"`
	EntryTimeout    services.Duration `json:"entry_timeout,omitempty"`
	Tag             string            `json:"tag,omitempty"`
	LogLevel        string            `json:"log_level,omitempty"`
	Testing         bool              `json:"testing,omitempty"`
	Mode            string            `json:"mode,omitempty"`
	Whitelist       []string          `json:"whitelist_keys,omitempty"`
	SurveyWhitelist []cipher.PubKey   `json:"survey_whitelist,omitempty"`
	TestEnvironment bool              `json:"test_environment,omitempty"`

	// DmsgPort is the dmsghttp listener port (default 80).
	DmsgPort uint16 `json:"dmsg_port,omitempty"`

	// Dmsg is the dmsg-related config block — same shape across
	// every deployment service that uses it.
	Dmsg cmdutil.DmsgConfig `json:"dmsg,omitempty"`
}

Config is the JSON configuration for address-resolver.

func LoadFile

func LoadFile(path string) (*Config, error)

LoadFile reads and strict-parses a Config from path.

func ParseBlock

func ParseBlock(raw []byte) (*Config, error)

ParseBlock decodes a services.json block into a Config.

Jump to

Keyboard shortcuts

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