Documentation ¶
Index ¶
- Constants
- Variables
- func NewInstance(name string, options Options) instance.Plugin
- func NewL4(name string, options Options) loadbalancer.L4
- func Run(plugins func() discovery.Plugins, name plugin.Name, config *types.Any) (transport plugin.Transport, impls map[run.PluginCode]interface{}, ...)
- type Options
Constants ¶
View Source
const ( // Kind is the canonical name of the plugin for starting up, etc. Kind = "simulator" // EnvStore is the enviornment variable to control the backend to use. e.g. 'mem', 'file' EnvStore = "mem" // EnvDir is the env for directory for file storage EnvDir = "INFRAKIT_SIMULATOR_DIR" // EnvInstanceTypes is the env var to set for the instance spi type names (comma-delimited) EnvInstanceTypes = "INFRAKIT_SIMULATOR_INSTANCE_TYPES" // EnvL4Names is the env var to set for the L4 name EnvL4Names = "INFRAKIT_SIMULATOR_L4_NAMES" // StoreMem is the value for using memory store StoreMem = "mem" // StoreFile is the value for using file store StoreFile = "file" )
Variables ¶
View Source
var DefaultOptions = Options{ Store: local.Getenv(EnvStore, "mem"), Dir: local.Getenv(EnvDir, filepath.Join(local.InfrakitHome(), "simulator")), InstanceTypes: strings.Split(local.Getenv(EnvInstanceTypes, "compute,net,disk"), ","), L4Names: strings.Split(local.Getenv(EnvL4Names, "lb1,lb2,lb3"), ","), }
DefaultOptions return an Options with default values filled in.
Functions ¶
func NewInstance ¶
NewInstance returns a typed instance plugin
Types ¶
Click to show internal directories.
Click to hide internal directories.