Documentation ¶
Index ¶
- Constants
- type CPUCoresPartition
- type CPUPowerPartition
- type Configuration
- func (c *Configuration) APIPort() int
- func (c *Configuration) APITimeout() time.Duration
- func (c *Configuration) CPUCoresPartitions() []CPUCoresPartition
- func (c *Configuration) CPUPowerPartitions() []CPUPowerPartition
- func (c *Configuration) CheckContainersInterval() time.Duration
- func (c *Configuration) ChordHashSizeBits() int
- func (c *Configuration) ChordNumSuccessors() int
- func (c *Configuration) ChordTimeout() time.Duration
- func (c *Configuration) ChordVirtualNodes() int
- func (c *Configuration) DiscoveryBackend() string
- func (c *Configuration) DockerAPIVersion() string
- func (c *Configuration) HostIP() string
- func (c *Configuration) ImagesStorageBackend() string
- func (c *Configuration) MaxRefreshesFailed() int
- func (c *Configuration) MaxRefreshesMissed() int
- func (c *Configuration) OverlayName() string
- func (c *Configuration) OverlayPort() int
- func (c *Configuration) Print()
- func (c *Configuration) RAMPartitions() []RAMPartition
- func (c *Configuration) RandBackendMaxRetries() int
- func (c *Configuration) RefreshMissedTimeout() time.Duration
- func (c *Configuration) RefreshesCheckInterval() time.Duration
- func (c *Configuration) RefreshingInterval() time.Duration
- func (c *Configuration) ResourcesOvercommit() int
- func (c *Configuration) Simulation() bool
- func (c *Configuration) SpreadOffersInterval() time.Duration
- func (c *Configuration) SupplyingInterval() time.Duration
- type RAMPartition
- type ResourcesPartition
Constants ¶
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 CPUCoresPartition ¶
type CPUCoresPartition struct { ResourcesPartition Cores int }
Partition for the number of CPU cores.
type CPUPowerPartition ¶
type CPUPowerPartition struct { ResourcesPartition Class int }
Partition for CPU power.
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) CPUCoresPartitions ¶
func (c *Configuration) CPUCoresPartitions() []CPUCoresPartition
func (*Configuration) CPUPowerPartitions ¶
func (c *Configuration) CPUPowerPartitions() []CPUPowerPartition
func (*Configuration) CheckContainersInterval ¶
func (c *Configuration) CheckContainersInterval() time.Duration
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 ¶ added in v0.3.0
func (c *Configuration) DiscoveryBackend() string
func (*Configuration) DockerAPIVersion ¶
func (c *Configuration) DockerAPIVersion() string
func (*Configuration) HostIP ¶
func (c *Configuration) HostIP() string
func (*Configuration) ImagesStorageBackend ¶
func (c *Configuration) ImagesStorageBackend() string
func (*Configuration) MaxRefreshesFailed ¶
func (c *Configuration) MaxRefreshesFailed() int
func (*Configuration) MaxRefreshesMissed ¶
func (c *Configuration) MaxRefreshesMissed() int
func (*Configuration) OverlayName ¶ added in v0.3.0
func (c *Configuration) OverlayName() string
func (*Configuration) OverlayPort ¶
func (c *Configuration) OverlayPort() int
func (*Configuration) Print ¶
func (c *Configuration) Print()
Print the current configurations in order to debug the programs behavior.
func (*Configuration) RAMPartitions ¶
func (c *Configuration) RAMPartitions() []RAMPartition
func (*Configuration) RandBackendMaxRetries ¶ added in v0.3.0
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) ResourcesOvercommit ¶
func (c *Configuration) ResourcesOvercommit() int
func (*Configuration) Simulation ¶
func (c *Configuration) Simulation() bool
func (*Configuration) SpreadOffersInterval ¶
func (c *Configuration) SpreadOffersInterval() time.Duration
func (*Configuration) SupplyingInterval ¶
func (c *Configuration) SupplyingInterval() time.Duration
type RAMPartition ¶
type RAMPartition struct { ResourcesPartition RAM int }
Partition for the amount of RAM.
type ResourcesPartition ¶
type ResourcesPartition struct {
Percentage int
}
Represents a configuration partition in terms of percentage,