Documentation
¶
Index ¶
- Constants
- func AddConfig(graph adder)
- func AddDocker(graph adder)
- func AddFilesystem(graph adder)
- func AddInternals(graph adder)
- func AddLogs(graph adder)
- func AddNetwork(graph adder)
- func AddQueries(graph adder)
- func AddShells(graph adder)
- func AddSingularity(graph adder)
- func AddUser(graph adder)
- func NewR11nQueueSet(d sous.Deployer, r sous.Registry, rf *sous.ResolveFilter, ...) *sous.R11nQueueSet
- type ArtifactOpts
- type BuildActionOpts
- type ClientBundle
- type ClientStateManager
- type ClusterManager
- type ClusterSpecificHTTPClient
- type ConfigLoader
- type CurrentGDM
- type DefaultConfig
- type DefaultLogSink
- type DeployActionOpts
- type DistStateManager
- type DryrunOption
- type ErrWriter
- type HTTPClient
- type InReader
- type LocalDockerClient
- type LocalGitClient
- type LocalGitRepo
- type LocalSousConfig
- type LocalWorkDir
- type LocalWorkDirShell
- type LogSink
- type MaybeDatabase
- type MetricsHandler
- type OutWriter
- type PossiblyInvalidConfig
- type ProfilingServer
- type RawConfig
- type RefinedResolveFilter
- type ScratchDirShell
- type ServerClusterManager
- type ServerHandler
- type ServerListData
- type ServerStateManager
- type SourceContextDiscovery
- type SousGraph
- func BuildBaseGraph(version semv.Version, in io.Reader, out, err io.Writer) *SousGraph
- func BuildGraph(v semv.Version, in io.Reader, out, err io.Writer) *SousGraph
- func BuildTestGraph(t *testing.T, v semv.Version, in io.Reader, out, err io.Writer) *SousGraph
- func DefaultTestGraph(t *testing.T) *SousGraph
- func NewSousGraph() *SousGraph
- func TestGraphWithConfig(t *testing.T, v semv.Version, in io.Reader, out, err io.Writer, cfg string) *SousGraph
- func (di *SousGraph) GetAddArtifact(opts ArtifactOpts) (actions.Action, error)
- func (di *SousGraph) GetBuild(opts BuildActionOpts) (*actions.Build, error)
- func (di *SousGraph) GetDeploy(opts DeployActionOpts) (actions.Action, error)
- func (di *SousGraph) GetGetArtifact(opts ArtifactOpts) (*actions.GetArtifact, error)
- func (di *SousGraph) GetJenkins(opts DeployActionOpts) (actions.Action, error)
- func (di *SousGraph) GetManifestGet(dff config.DeployFilterFlags, out io.Writer, upCap *restful.Updater) (*actions.ManifestGet, error)
- func (di *SousGraph) GetManifestSet(dff config.DeployFilterFlags, up *restful.Updater, in io.Reader) (*actions.ManifestSet, error)
- func (di *SousGraph) GetPlumbingNormalizeGDM() (actions.Action, error)
- func (di *SousGraph) GetPollStatus(dryrun string, dff config.DeployFilterFlags) (actions.Action, error)
- func (di *SousGraph) GetRectify(dryrun string, dff config.DeployFilterFlags) (actions.Action, error)
- func (di *SousGraph) GetServer(dff config.DeployFilterFlags, dryrun string, laddr string, gdmRepo string, ...) (*actions.Server, error)
- func (di *SousGraph) GetUpdate(dff config.DeployFilterFlags, otpl config.OTPLFlags) (actions.Action, error)
- type StateReader
- type StateWriter
- type StatusWaitStable
- type TargetDeploymentID
- type TargetManifest
- type TargetManifestID
Constants ¶
const ( // DryrunBoth specifies that both the registry and scheduler should be fake. DryrunBoth = DryrunOption("both") // DryrunRegistry means the registry should be faked for this execution. DryrunRegistry = DryrunOption("registry") // DryrunScheduler means the scheduler should be faked for this execution. DryrunScheduler = DryrunOption("scheduler") // DryrunNeither means neither the registry or scheduler should be faked. DryrunNeither = DryrunOption("none") )
const OT_ENV_FLAVOR = "OT_ENV_FLAVOR"
OT_ENV_FLAVOR is the environment name to use for flavors.
Variables ¶
This section is empty.
Functions ¶
func AddConfig ¶ added in v0.0.3
func AddConfig(graph adder)
AddConfig adds filesystem to the graph.
func AddFilesystem ¶ added in v0.0.3
func AddFilesystem(graph adder)
AddFilesystem adds filesystem to the graph.
func AddInternals ¶ added in v0.0.3
func AddInternals(graph adder)
AddInternals adds the dependency contructors that are internal to Sous.
func AddNetwork ¶ added in v0.0.3
func AddNetwork(graph adder)
AddNetwork adds features that require the network.
func AddShells ¶ added in v0.0.3
func AddShells(graph adder)
AddShells adds working shells to the graph.
func AddSingularity ¶ added in v0.0.3
func AddSingularity(graph adder)
AddSingularity adds Singularity clients to the graph.
func NewR11nQueueSet ¶ added in v1.0.1
func NewR11nQueueSet(d sous.Deployer, r sous.Registry, rf *sous.ResolveFilter, sm *ServerStateManager) *sous.R11nQueueSet
NewR11nQueueSet returns a new queue set configured to start processing r11ns immediately.
Types ¶
type ArtifactOpts ¶ added in v1.0.1
type ArtifactOpts struct { SourceID config.SourceIDFlags DockerImage string }
ArtifactOpts are options for Add Artifacts
type BuildActionOpts ¶ added in v1.0.1
type BuildActionOpts struct { DFF config.DeployFilterFlags CLIArgs []string }
BuildActionOpts are options for GetBuild.
type ClientBundle ¶ added in v1.0.1
type ClientBundle map[string]restful.HTTPClient
ClientBundle collects HTTPClients per server.
type ClientStateManager ¶ added in v1.0.1
type ClientStateManager struct{ sous.StateManager }
ClientStateManager wraps the sous.StateManager interface and is used by non-server sous commands
type ClusterManager ¶ added in v1.0.1
type ClusterManager struct{ sous.ClusterManager }
ClusterManager simply wraps the sous.ClusterManager interface
type ClusterSpecificHTTPClient ¶ added in v1.0.1
type ClusterSpecificHTTPClient struct{ restful.HTTPClient }
ClusterSpecificHTTPClient wraps the sous.HTTPClient interface
type ConfigLoader ¶ added in v0.0.3
type ConfigLoader struct{ configloader.ConfigLoader }
ConfigLoader wraps the configloader.ConfigLoader interface
func NewTestConfigLoader ¶ added in v1.0.1
func NewTestConfigLoader(configYAML configYAML) *ConfigLoader
NewTestConfigLoader produces a faked ConfigLoader
type CurrentGDM ¶
type CurrentGDM struct{ sous.Deployments }
CurrentGDM is a snapshot of the GDM at application start. In a CLI context, which this is, that is all we need to simply read the GDM.
type DefaultConfig ¶ added in v0.0.3
DefaultConfig is the default config.
type DefaultLogSink ¶ added in v1.0.1
DefaultLogSink depends only on a semv.Version so can be used prior to reading any configuration.
type DeployActionOpts ¶ added in v1.0.1
type DeployActionOpts struct { DFF config.DeployFilterFlags DryRun, InitSingularityRequestID string Force, WaitStable bool }
DeployActionOpts are options for GetDeploy.
type DistStateManager ¶ added in v1.0.1
type DistStateManager stateManagerAndErr
DistStateManager wraps sous.StateManager interfaces and is used by `sous server`
type DryrunOption ¶ added in v0.0.3
type DryrunOption string
DryrunOption specifies components that should be faked in an execution.
type HTTPClient ¶ added in v1.0.1
type HTTPClient struct{ restful.HTTPClient }
HTTPClient wraps the sous.HTTPClient interface
type LocalDockerClient ¶
type LocalDockerClient struct{ docker_registry.Client }
LocalDockerClient is a docker client object
type LocalGitClient ¶
LocalGitClient is a git client rooted in WorkdirShell.Dir.
type LocalGitRepo ¶
LocalGitRepo is the git repository containing WorkDir.
type LocalSousConfig ¶
LocalSousConfig is the configuration for Sous.
func (*LocalSousConfig) Bytes ¶
func (c *LocalSousConfig) Bytes() []byte
Bytes marshals the config to a []byte
func (*LocalSousConfig) GetValue ¶
func (c *LocalSousConfig) GetValue(name string) (string, error)
GetValue retreives and returns a particular value from the configuration
func (*LocalSousConfig) Save ¶
func (c *LocalSousConfig) Save(path string) error
Save the configuration to the configuration path (by default: $HOME/.config/sous/config)
func (*LocalSousConfig) SetValue ¶
func (c *LocalSousConfig) SetValue(path, name, value string) error
SetValue stores a particular value on the config
func (*LocalSousConfig) String ¶
func (c *LocalSousConfig) String() string
type LocalWorkDir ¶
type LocalWorkDir string
LocalWorkDir is the user's current working directory when they invoke Sous.
type LocalWorkDirShell ¶
LocalWorkDirShell is a shell for working in the user's current working directory.
type MaybeDatabase ¶ added in v1.0.1
A MaybeDatabase maybe has a DB in it.
type MetricsHandler ¶ added in v1.0.1
MetricsHandler wraps an http.Handler for metrics
type PossiblyInvalidConfig ¶ added in v0.0.3
PossiblyInvalidConfig is a config that has not been validated. This is necessary for the 'sous config' command that should still work with invalid configs.
type ProfilingServer ¶ added in v1.0.1
type ProfilingServer bool
ProfilingServer records whether a profiling server was requested
type RawConfig ¶ added in v1.0.1
type RawConfig PossiblyInvalidConfig
RawConfig is a config.Config that's been read from disk but not validated.
type RefinedResolveFilter ¶ added in v1.0.1
type RefinedResolveFilter sous.ResolveFilter
RefinedResolveFilter is a sous.ResolveFilter refined by user-requested flags.
type ScratchDirShell ¶
ScratchDirShell is a shell for working in the scratch area where things like artefacts, and build metadata are stored. It is a new, empty directory, and should be cleaned up eventually.
type ServerClusterManager ¶ added in v1.0.1
type ServerClusterManager struct{ sous.ClusterManager }
ServerClusterManager wraps the sous.ClusterManager interface and is used by `sous server`
type ServerHandler ¶ added in v1.0.1
ServerHandler wraps the http.Handler for the sous server
type ServerListData ¶ added in v1.0.1
ServerListData collects responses from /servers
type ServerStateManager ¶ added in v1.0.1
type ServerStateManager struct{ sous.StateManager }
ServerStateManager wraps the sous.StateManager interface and is used by `sous server`
type SourceContextDiscovery ¶ added in v0.0.3
type SourceContextDiscovery struct { Error error *sous.ManifestID *sous.SourceContext }
SourceContextDiscovery captures the possiblity of not finding a SourceContext
func (*SourceContextDiscovery) GetContext ¶ added in v0.0.3
func (scd *SourceContextDiscovery) GetContext() *sous.SourceContext
GetContext returns the SourceContext discovered if there were no errors in getting it. Otherwise returns a pointer to a zero SourceContext.
func (*SourceContextDiscovery) Unwrap ¶ added in v0.0.3
func (scd *SourceContextDiscovery) Unwrap(mid TargetManifestID) (*sous.SourceContext, error)
Unwrap returns the SourceContext and the returned error in trying to create it.
type SousGraph ¶
SousGraph is a dependency injector used to flesh out Sous commands with their dependencies.
func BuildBaseGraph ¶ added in v1.0.1
BuildBaseGraph constructs a graph with essentials - intended for testing
func BuildGraph ¶
BuildGraph builds the dependency injection graph, used to populate commands invoked by the user.
func BuildTestGraph ¶ added in v0.0.3
BuildTestGraph builds a standard graph suitable for testing
func DefaultTestGraph ¶ added in v1.0.1
DefaultTestGraph results a SousGraph suitable for testing without worrying about details.
func NewSousGraph ¶ added in v1.0.1
func NewSousGraph() *SousGraph
NewSousGraph returns a new sous graph.
func TestGraphWithConfig ¶ added in v0.0.3
func TestGraphWithConfig(t *testing.T, v semv.Version, in io.Reader, out, err io.Writer, cfg string) *SousGraph
TestGraphWithConfig accepts a custom Sous config string
func (*SousGraph) GetAddArtifact ¶ added in v1.0.1
func (di *SousGraph) GetAddArtifact(opts ArtifactOpts) (actions.Action, error)
GetAddArtifact will return artifact for cli add artifact
func (*SousGraph) GetBuild ¶ added in v1.0.1
func (di *SousGraph) GetBuild(opts BuildActionOpts) (*actions.Build, error)
GetBuild gets the Build action.
func (*SousGraph) GetDeploy ¶ added in v1.0.1
func (di *SousGraph) GetDeploy(opts DeployActionOpts) (actions.Action, error)
GetDeploy constructs a Deploy Action.
func (*SousGraph) GetGetArtifact ¶ added in v1.0.1
func (di *SousGraph) GetGetArtifact(opts ArtifactOpts) (*actions.GetArtifact, error)
GetGetArtifact will return artifact for cli add artifact
func (*SousGraph) GetJenkins ¶ added in v1.0.1
func (di *SousGraph) GetJenkins(opts DeployActionOpts) (actions.Action, error)
GetJenkins constructs a Jenkins Actions.
func (*SousGraph) GetManifestGet ¶ added in v1.0.1
func (di *SousGraph) GetManifestGet(dff config.DeployFilterFlags, out io.Writer, upCap *restful.Updater) (*actions.ManifestGet, error)
GetManifestGet injects a ManifestGet instances.
func (*SousGraph) GetManifestSet ¶ added in v1.0.1
func (di *SousGraph) GetManifestSet(dff config.DeployFilterFlags, up *restful.Updater, in io.Reader) (*actions.ManifestSet, error)
GetManifestSet injects a ManifestSet instance.
func (*SousGraph) GetPlumbingNormalizeGDM ¶ added in v1.0.1
GetPlumbingNormalizeGDM returns an update Action.
func (*SousGraph) GetPollStatus ¶ added in v1.0.1
func (di *SousGraph) GetPollStatus(dryrun string, dff config.DeployFilterFlags) (actions.Action, error)
GetPollStatus produces an Action to poll the status of a deployment.
func (*SousGraph) GetRectify ¶ added in v1.0.1
func (di *SousGraph) GetRectify(dryrun string, dff config.DeployFilterFlags) (actions.Action, error)
GetRectify produces a rectify Action.
type StateReader ¶
type StateReader struct{ sous.StateReader }
StateReader wraps a storage.StateReader.
type StateWriter ¶
type StateWriter struct{ sous.StateWriter }
StateWriter wraps a storage.StateWriter, and should be configured to use the current user's local storage.
type StatusWaitStable ¶ added in v0.0.3
type StatusWaitStable bool
StatusWaitStable represents if `sous plumbing status` should continue to poll until the selected t
type TargetDeploymentID ¶ added in v1.0.1
type TargetDeploymentID sous.DeploymentID
TargetDeploymentID is the manifest ID being targeted, after resolving all context and flags.
type TargetManifest ¶
type TargetManifest struct{ *sous.Manifest }
TargetManifest is a specific manifest for the current ManifestID. If the named manifest does not exist, it is created.
type TargetManifestID ¶
type TargetManifestID sous.ManifestID
TargetManifestID is the manifest ID being targeted, after resolving all context and flags.
func (TargetManifestID) QueryMap ¶ added in v1.0.1
func (mid TargetManifestID) QueryMap() map[string]string
QueryMap returns a map suitable for use with the HTTP API. xxx This needed to be defined on both TargetManifestID and sous.ManifestID - I don't understand why.