store

package
v0.0.0-...-e70f483 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package store is provides persistent local storage for network device configurations (for NCM) utilizing bbolt - enabling rollback of configs w/o sending data to the Datadog backend

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigStore

type ConfigStore interface {
	Close(context.Context) error
	StoreConfig(deviceID string, configType types.ConfigType, rawConfig string) (string, error)
	GetConfig(configUUID string) (string, *types.ConfigMetadata, error)
	CheckDuplicate(deviceID string, configType types.ConfigType, rawHash string) (string, error)
}

ConfigStore implements persistent KV store for configurations for rollbacks whenever a config is retrieved, we will store agent-side along with the payload sent to intake to enable "rollbacks" without sending sensitive data (in configs) back and forth

func NewMemStore

func NewMemStore() ConfigStore

NewMemStore creates a ConfigStore backed by in-memory maps (for use in tests).

func Open

func Open(path string) (ConfigStore, error)

Open creates a new ConfigStore and initializes the underlying boltDB + required buckets

Jump to

Keyboard shortcuts

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