services

package
v0.0.0-...-d50a3c0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIURLs

func APIURLs() []string

Returns the Probely API URL

func BuildConfig

func BuildConfig(data []byte, token string) (map[string]*ConfigFile, error)

From an agent configuration archive (tar.gz), decrypt secrets and build the configuration files

func CheckWireguardTunnel

func CheckWireguardTunnel(name string) error

func FetchConfig

func FetchConfig(token, apiURL string) ([]byte, error)

Fetch the encrypted configuration for the agent

func WriteConfig

func WriteConfig(files map[string]*ConfigFile, dest string) error

Writes configuration files to dest

Types

type ConfigFile

type ConfigFile struct {
	Data   string
	Secret string
}

type HTTPResult

type HTTPResult struct {
	StatusCode int
	Data       []byte
}

func CheckHTTPEndpoint

func CheckHTTPEndpoint(url string) (*HTTPResult, error)

Jump to

Keyboard shortcuts

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