Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureDirExists ¶ added in v0.0.3
EnsureDirExists creates the named directory if it does not exist.
Types ¶
type Config ¶
type Config struct { // StateLocation is either a file containing a pre-compiled state, or // a directory containing the state as a tree. StateLocation string `env:"SOUS_STATE_LOCATION"` // Server is the location of a Sous Server which this sous instance // considers the master. If this is not set, this node is considered // to be a master. This value must be in URL format. Server string `env:"SOUS_SERVER"` // SiblingURLs is a temporary measure for setting up a distributed cluster // of sous servers. Each server must be configured with accessible URLs for // all the servers in production, as named by cluster. // (someday this should be replaced with a gossip protocol) SiblingURLs map[string]string // BuildStateDir is a directory where information about builds // performed by this user on this machine are stored. BuildStateDir string `env:"SOUS_BUILD_STATE_DIR"` // Docker is the Docker configuration. Docker docker.Config }
Config contains the core Sous configuration, shared by both the client and server. The client and server may additionally have their own configuration.
func (*Config) FillDefaults ¶
FillDefaults fills in default values in this Config where they are currently zero values.
type DeployFilterFlags ¶
type DeployFilterFlags struct { Source string Repo string Offset string Flavor string Tag string Revision string Cluster string All bool }
DeployFilterFlags are CLI flags used to configure the underlying deployments a given command will refer to N.b. that not every command will use every filter
func (*DeployFilterFlags) BuildFilter ¶ added in v0.0.3
func (f *DeployFilterFlags) BuildFilter(parseSL func(string) (sous.SourceLocation, error)) (*sous.ResolveFilter, error)
func (*DeployFilterFlags) BuildPredicate ¶
func (f *DeployFilterFlags) BuildPredicate(parseSL func(string) (sous.SourceLocation, error)) (sous.DeploymentPredicate, error)
BuildPredicate returns a predicate used for filtering targeted deployments.
It returns an error if the combination of flags is invalid, or if parseSL returns an error parsing Source.
type OTPLFlags ¶
type OTPLFlags struct { UseOTPLDeploy bool `flag:"use-otpl-deploy"` IgnoreOTPLDeploy bool `flag:"ignore-otpl-deploy"` }
OTPLFlags set options for sniffing otpl-deploy configuration during manifest initialisation.
type PolicyFlags ¶
type PolicyFlags struct {
ForceClone, Strict bool
}
PolicyFlags capture user intent about the processing of a build
type User ¶
User represents the user environment of the account running Sous
func (*User) ConfigDir ¶
ConfigDir returns the directory we should use to store Sous configuration data
func (*User) ConfigFile ¶
ConfigFile returns the path to the local Sous config file
func (*User) DefaultConfig ¶
DefaultConfig builds a default configuration for this user