configuration

package
v0.0.0-...-10b4495 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultFilePath = "configuration.toml"

Directory path to where search for the configuration file. (Directory of binary execution)

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUClassPartition

type CPUClassPartition struct {
	ResourcesPartition `json:"ResourcesPartition"`
	CPUCores           []CPUCoresPartition `json:"CPUCoresPartitions"`
}

type CPUCoresPartition

type CPUCoresPartition struct {
	ResourcesPartition `json:"ResourcesPartition"`
	Memory             []MemoryPartition `json:"MemoryPartitions"`
}

type Configuration

type Configuration struct {
	Host          host                 `json:"Host"`
	Caravela      caravela             `json:"Caravela"`
	ImagesStorage imagesStorageBackend `json:"ImagesStorage"`
	Overlay       overlay              `json:"Overlay"`
}

Configuration holds all the configurations parameters for the CARAVELA.

func Default

func Default(hostIP string) *Configuration

Default returns the configuration structure with all the default values for the system to work.

func ObtainExternal

func ObtainExternal(hostIP string, config *Configuration) (*Configuration, error)

ObtainExternal returns configuration structured based on a given structure that. Used to pass the system configurations between nodes, usually during the joining process.

func ReadFromFile

func ReadFromFile(hostIP, configFilePath string) (*Configuration, error)

ReadFromFile returns a configuration structure reading from the configuration file and filling the rest with the default values

func (*Configuration) APIPort

func (c *Configuration) APIPort() int

func (*Configuration) APITimeout

func (c *Configuration) APITimeout() time.Duration

func (*Configuration) CPUOvercommit

func (c *Configuration) CPUOvercommit() int

func (*Configuration) CPUSlices

func (c *Configuration) CPUSlices() int

func (*Configuration) ChordHashSizeBits

func (c *Configuration) ChordHashSizeBits() int

func (*Configuration) ChordNumSuccessors

func (c *Configuration) ChordNumSuccessors() int

func (*Configuration) ChordTimeout

func (c *Configuration) ChordTimeout() time.Duration

func (*Configuration) ChordVirtualNodes

func (c *Configuration) ChordVirtualNodes() int

func (*Configuration) DiscoveryBackend

func (c *Configuration) DiscoveryBackend() string

func (*Configuration) DockerAPIVersion

func (c *Configuration) DockerAPIVersion() string

func (*Configuration) GUIDEstimatedNetworkSize

func (c *Configuration) GUIDEstimatedNetworkSize() int

Debug performance flag.

func (*Configuration) GUIDScaleFactor

func (c *Configuration) GUIDScaleFactor() int

Debug performance flag.

func (*Configuration) HostIP

func (c *Configuration) HostIP() string

func (*Configuration) ImagesStorageBackend

func (c *Configuration) ImagesStorageBackend() string

func (*Configuration) MaxPartitionsSearch

func (c *Configuration) MaxPartitionsSearch() int

func (*Configuration) MaxRefreshesFailed

func (c *Configuration) MaxRefreshesFailed() int

func (*Configuration) MaxRefreshesMissed

func (c *Configuration) MaxRefreshesMissed() int

func (*Configuration) MemoryOvercommit

func (c *Configuration) MemoryOvercommit() int

func (*Configuration) OverlayName

func (c *Configuration) OverlayName() string

func (*Configuration) OverlayPort

func (c *Configuration) OverlayPort() int

func (*Configuration) PartitionsStateBufferSize

func (c *Configuration) PartitionsStateBufferSize() int

func (*Configuration) Print

func (c *Configuration) Print()

Print the current configurations in order to debug the programs behavior.

func (*Configuration) PseudoSuperPeers

func (c *Configuration) PseudoSuperPeers() bool

Debug performance flag.

func (*Configuration) RandBackendMaxRetries

func (c *Configuration) RandBackendMaxRetries() int

func (*Configuration) RefreshMissedTimeout

func (c *Configuration) RefreshMissedTimeout() time.Duration

func (*Configuration) RefreshesCheckInterval

func (c *Configuration) RefreshesCheckInterval() time.Duration

func (*Configuration) RefreshingInterval

func (c *Configuration) RefreshingInterval() time.Duration

func (*Configuration) ResourcesPartitions

func (c *Configuration) ResourcesPartitions() ResourcesPartitions

func (*Configuration) SchedulingPolicy

func (c *Configuration) SchedulingPolicy() string

func (*Configuration) Simulation

func (c *Configuration) Simulation() bool

func (*Configuration) SpreadOffers

func (c *Configuration) SpreadOffers() bool

Debug performance flag.

func (*Configuration) SpreadOffersInterval

func (c *Configuration) SpreadOffersInterval() time.Duration

func (*Configuration) SpreadPartitionsState

func (c *Configuration) SpreadPartitionsState() bool

Debug performance flag.

func (*Configuration) SupplyingInterval

func (c *Configuration) SupplyingInterval() time.Duration

type MemoryPartition

type MemoryPartition struct {
	ResourcesPartition `json:"ResourcesPartition"`
}

type ResourcesPartition

type ResourcesPartition struct {
	Value      int `json:"Value"`
	Percentage int `json:"Percentage"`
}

type ResourcesPartitions

type ResourcesPartitions struct {
	CPUClasses []CPUClassPartition `json:"CPUClasses"`
}

Jump to

Keyboard shortcuts

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