platform

package
v4.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidPlatformName is returned when a platform with an invalid name is created.
	ErrInvalidPlatformName = errors.New("invalid platform name")
)

Functions

This section is empty.

Types

type Components

type Components struct {
	Machines    machines.Machines
	Storage     storage.Storage
	Cluster     orchestrator.Cluster
	Store       store.Store
	Secrets     secrets.Secrets
	EmailSender email.Sender
}

Components lists the components used to initialize a Platform.

type Platform

type Platform interface {
	// GetName returns the platform name.
	GetName() string

	// Storage returns a storage.Storage component.
	Storage() storage.Storage

	// Machines returns a machines.Machines component.
	Machines() machines.Machines

	// Orchestrator returns a orchestrator.Cluster component.
	Orchestrator() orchestrator.Cluster

	// Store returns a store.Store component.
	Store() store.Store

	// Secrets returns a secrets.Secrets component.
	Secrets() secrets.Secrets

	// EmailSender returns an email.Sender component.
	EmailSender() email.Sender
}

Platform groups a set of components for managing simulations. Each application will make use of one platform to run their simulations. The cloudsim team provides a default Kubernetes and AWS implementation of this Platform. Other combinations could be implemented after adding their respective subcomponents.

func NewPlatform

func NewPlatform(name string, components Components) (Platform, error)

NewPlatform initializes a new platform using the given components.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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