Documentation
¶
Index ¶
- Variables
- func DefaultStatePath(projectID string) string
- func Main(appName string, projectID string, factories []AddFactoryFunc, ...)
- func StatePathEnvVar(projectID string) string
- func StatePathEnvVars(projectID string) []string
- type AddFactoryFunc
- type BuildCommandsFunc
- type BuildConfigSetFunc
- type CliBus
- type CliBusImpl
- func (c *CliBusImpl) GetBus() bus.Bus
- func (c *CliBusImpl) GetContext() context.Context
- func (c *CliBusImpl) GetLogger() *logrus.Entry
- func (c *CliBusImpl) GetPluginHostObjectKey() string
- func (c *CliBusImpl) GetStaticResolver() *static.Resolver
- func (c *CliBusImpl) GetVolume() volume.Volume
- func (c *CliBusImpl) GetWorldEngine() world.Engine
- func (c *CliBusImpl) GetWorldEngineID() string
- func (c *CliBusImpl) GetWorldState() world.WorldState
- func (c *CliBusImpl) Release()
Constants ¶
This section is empty.
Variables ¶
var ConfigSetFuncFromFS = plugin_entrypoint.ConfigSetFuncFromFS
ConfigSetFuncFromFS builds a ConfigSetFunc which parses a file in a FS as a ConfigSet.
Functions ¶
func DefaultStatePath ¶
DefaultStatePath returns the default state path for the CLI.
func Main ¶
func Main( appName string, projectID string, factories []AddFactoryFunc, configSets []BuildConfigSetFunc, commandBuilders []BuildCommandsFunc, )
Main boots the CliBus and runs the CLI application.
func StatePathEnvVar ¶
StatePathEnvVar returns the project-specific state path environment variable.
func StatePathEnvVars ¶
StatePathEnvVars returns the environment variables that override the state path.
Types ¶
type AddFactoryFunc ¶
type AddFactoryFunc = plugin_entrypoint.AddFactoryFunc
AddFactoryFunc is a callback to add a factory.
type BuildCommandsFunc ¶
BuildCommandsFunc is a function to build CLI commands.
type BuildConfigSetFunc ¶
type BuildConfigSetFunc = plugin_entrypoint.BuildConfigSetFunc
BuildConfigSetFunc is a function to build a list of ConfigSet to apply.
type CliBus ¶
type CliBus interface {
// GetContext returns the bus context.
GetContext() context.Context
// GetBus returns the controller bus.
GetBus() bus.Bus
// GetLogger returns the root logger.
GetLogger() *logrus.Entry
// GetVolume returns the volume used for state.
GetVolume() volume.Volume
// GetWorldEngineID returns the world engine ID.
GetWorldEngineID() string
// GetWorldEngine returns the world engine instance.
GetWorldEngine() world.Engine
// GetWorldState returns the world state instance.
GetWorldState() world.WorldState
// GetPluginHostObjectKey returns the plugin host object key.
GetPluginHostObjectKey() string
// Release releases all resources held by the bus.
Release()
}
CliBus is the common interface for CLI bus implementations.
type CliBusImpl ¶
type CliBusImpl struct {
// contains filtered or unexported fields
}
CliBusImpl implements the CliBus interface for CLI binaries.
func BuildCliBus ¶
BuildCliBus builds a lightweight bus for CLI binaries.
func (*CliBusImpl) GetBus ¶
func (c *CliBusImpl) GetBus() bus.Bus
GetBus returns the controller bus.
func (*CliBusImpl) GetContext ¶
func (c *CliBusImpl) GetContext() context.Context
GetContext returns the bus context.
func (*CliBusImpl) GetLogger ¶
func (c *CliBusImpl) GetLogger() *logrus.Entry
GetLogger returns the root logger.
func (*CliBusImpl) GetPluginHostObjectKey ¶
func (c *CliBusImpl) GetPluginHostObjectKey() string
GetPluginHostObjectKey returns the plugin host object key.
func (*CliBusImpl) GetStaticResolver ¶
func (c *CliBusImpl) GetStaticResolver() *static.Resolver
GetStaticResolver returns the static controller resolver.
func (*CliBusImpl) GetVolume ¶
func (c *CliBusImpl) GetVolume() volume.Volume
GetVolume returns the volume used for state.
func (*CliBusImpl) GetWorldEngine ¶
func (c *CliBusImpl) GetWorldEngine() world.Engine
GetWorldEngine returns the world engine instance.
func (*CliBusImpl) GetWorldEngineID ¶
func (c *CliBusImpl) GetWorldEngineID() string
GetWorldEngineID returns the world engine ID.
func (*CliBusImpl) GetWorldState ¶
func (c *CliBusImpl) GetWorldState() world.WorldState
GetWorldState returns the world state instance.
func (*CliBusImpl) Release ¶
func (c *CliBusImpl) Release()
Release releases all resources held by the bus.