oxidized

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = errors.New("not implemented")

ErrNotImplemented is returned by GetDevice, which oxidized has no single- device lookup API for - only a full router.db dump (LoadDevices/GetDevices) or a fetch of a device's last stored config (GetDeviceConfig).

Functions

func FetchRemoteConfig

func FetchRemoteConfig(factumConfig *util.ConfigFactum) (*util.ConfigOxidized, error)

FetchRemoteConfig pulls the Oxidized API connection settings from the primary, authenticated with factumConfig.Token (checked against the primary's Settings.FactumApiToken - see web.Controller.checkServiceToken).

func NewOxidizedClient

func NewOxidizedClient(c util.ConfigOxidized) *oxidizedClient

func RemoteClient

func RemoteClient(factumConfig *util.ConfigFactum) (*oxidizedClient, error)

RemoteClient is the FetchRemoteConfig + NewOxidizedClient convenience most callers want.

Types

type FactumOxidizedClient

type FactumOxidizedClient struct {
	Config         *util.ConfigFactum
	OxidizedConfig *util.ConfigOxidized
	Oxidized       *oxidizedClient
}

func NewFactumOxidizedClient

func NewFactumOxidizedClient(config *util.ConfigFactum) (*FactumOxidizedClient, error)

NewFactumOxidizedClient fetches the Oxidized API connection settings and the oxidized-sync settings (router.db path, ignore lists) from the primary over REST - config.Oxidized is never used, since factum-oxidized typically runs on a different host than the primary and has no local oxidized config of its own (see util.ConfigOxidized's doc comment).

func (*FactumOxidizedClient) Sync

func (foc *FactumOxidizedClient) Sync(reporter jobevent.Reporter) error

Sync fetches devices from the Factum API, filters out those that don't need backup, writes oxidized's router.db, and asks oxidized to reload if anything changed.

type OxidizedDevice

type OxidizedDevice struct {
	Name  string
	Model string
}

OxidizedDevice is one entry from oxidized's own router.db file.

Jump to

Keyboard shortcuts

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