config

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: BSD-2-Clause, Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ReferenceTime SyncTime
	Globals       *Config
)

Functions

func InitViper added in v0.2.6

func InitViper()

Types

type BuiltinController added in v0.2.6

type BuiltinController string
const (
	NaiveController    BuiltinController = "naive"
	PipelineController BuiltinController = "pipeline"
)

type Config

type Config struct {
	// Blackboard configuration
	BlackboardHTTPAddress    string // <hostname>:<port> of HTTP interface
	NoSplash                 bool   // disable the splash screen
	OutputWidth              int    // limit blackboard output to OutputWidth (columns); does not impact other CLI output;
	BlackboardAudio          bool   // experimental feature where agents emit a chirp when they send a message to the blackboard
	BlackboardAutoRun        bool   // Allow blackboard to match jobs to runners (the blackboard implementation is allowed to define how this is done)
	NoOutput                 bool   // Disable blackboard save (saving is underdeveloped; not recommended for now)
	OutputFile               string // save blackboard to OutputFile
	ObjectSizeThreshold      int    // Data sizes greater than ObjectSizeThreshold will be sent to object store
	ObjectStoreAddress       string // Address on which the simple service should be started, or where the blackboard should connect to a running object service
	Controller               string
	ShutdownOnControllerHalt bool // NOT FULLY SUPPORTED Whether or not the blackboard should shutdown once controllers complete
}

Config is a structure for global configuration.

GeminiAPIKey             string // NOT FULLY SUPPORTED API key to use Google Gemini API for Dockerfile compilation

func ConfigFromViper

func ConfigFromViper() *Config

ConfigFromViper generates a core config file from viper.

func DefaultConfig added in v0.2.6

func DefaultConfig() *Config

type SyncTime

type SyncTime struct {
	time.Time
	// contains filtered or unexported fields
}

SyncTime attempts to keep timestamps relatively sane accross agents and blackboards by using some sort of shared time server. Very low latency transfers are still likely to have misreported latencies due to the limitations of the NTP protocol.

func (*SyncTime) Now

func (t *SyncTime) Now() time.Time

func (*SyncTime) String

func (t *SyncTime) String() string

func (*SyncTime) Synchronize

func (t *SyncTime) Synchronize(serv string) error

Most NTP servers are rate limited, so avoid hitting public servers like time.nist.gov or other big ones inside of your agents as these will quickly interfere with proper execution and could get your IP blocked from certain networks.

Jump to

Keyboard shortcuts

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