Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CmdRepo = &cobra.Command{ Use: "repo CONFIG-FILE", Short: "Named Data Networking Data Repository", GroupID: "run", Version: utils.NDNdVersion, Args: cobra.ExactArgs(1), Run: run, }
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Name is the name of the repo service.
Name string `json:"name"`
// StorageDir is the directory to store data.
StorageDir string `json:"storage_dir"`
// URI specifying KeyChain location.
KeyChainUri string `json:"keychain"`
// List of trust anchor full names.
TrustAnchors []string `json:"trust_anchors"`
// IgnoreValidity skips validity period checks when fetching remote data (e.g. SVS snapshots).
IgnoreValidity bool `json:"ignore_validity"`
// NameN is the parsed name of the repo service.
NameN enc.Name
}
func DefaultConfig ¶
func DefaultConfig() *Config
(AI GENERATED DESCRIPTION): Returns a new Config with default placeholder values: empty Name and StorageDir strings, and a nil NameN slice.
func (*Config) Parse ¶
(AI GENERATED DESCRIPTION): Parses the configuration by validating the repository name, ensuring a storage directory is specified, converting it to an absolute path, and creating the directory if necessary.
func (*Config) TrustAnchorNames ¶
(AI GENERATED DESCRIPTION): Returns the trust‑anchor names stored in the Config as parsed enc.Name objects, panicking if any string cannot be parsed.
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func NewRepo ¶
(AI GENERATED DESCRIPTION): Creates a new Repo instance, initializing it with the supplied configuration and an empty map for its groupsSvs.
func (*Repo) Start ¶
(AI GENERATED DESCRIPTION): Initializes and starts the NDN data repository by setting up storage, network engine, keychain, trust configuration, and object client, then attaching the management command handler and announcing its prefix.
type RepoSvs ¶
type RepoSvs struct {
// contains filtered or unexported fields
}
func NewRepoSvs ¶
(AI GENERATED DESCRIPTION): Creates a new `RepoSvs` instance initialized with the given configuration, NDN client, and SyncJoin command.
func (*RepoSvs) Start ¶
(AI GENERATED DESCRIPTION): Initializes and starts the repository SVS ALO, configuring snapshots, multicast, prefix announcements, and publisher subscriptions.