harvester

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TrustDomain                  spiffeid.TrustDomain
	HarvesterSocketPath          net.Addr     // UDS socket address the Harvester will listen on
	SpireSocketPath              net.Addr     // UDS socket address the SPIRE server listens on and Harvester will connect to
	GaladrielServerAddress       *net.TCPAddr // TCP address the Galadriel Server listens on and Harvester will connect to
	JoinToken                    string
	BundleUpdatesInterval        time.Duration
	FederatedBundlesPollInterval time.Duration
	SpireBundlePollInterval      time.Duration
	ServerTrustBundlePath        string
	DataDir                      string
	Logger                       logrus.FieldLogger
	ProvidersConfig              *catalog.ProvidersConfig
}

Config conveys the configuration of the Harvester.

type Harvester

type Harvester struct {
	// contains filtered or unexported fields
}

Harvester represents the Harvester agent. It starts the bundle manager and the endpoints.

func New

func New(cfg *Config) *Harvester

func (*Harvester) Run

func (h *Harvester) Run(ctx context.Context) error

Run starts the Harvester and orchestrates the main functionality. It performs the following steps: - Loads catalogs from the providers configuration. - Creates the data directory if it does not exist. - Creates a client for Galadriel Server. - Onboards the Harvester to Galadriel Server if it is not already onboarded. - Creates a SPIRE client using the provided SPIRE address. - Creates, configures and run the Harvester endpoints. - Creates and runs the BundleManager responsible for bundles synchronization.

Directories

Path Synopsis
api
admin
Package admin provides primitives to interact with the openapi HTTP API.
Package admin provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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