Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Exists ¶ added in v0.9.0
Exists returns true if the supplied (merged) Option already contains a context.
TODO(jaypipes): We can get rid of this when we combine the option and context packages, which will make it easier to detect the presence of a pre-setup Context.
func WithContext ¶ added in v0.9.0
WithContext returns an option.Option that contains a pre-existing Context struct. This is useful for some internal code that sets up snapshots.
Types ¶
type Context ¶
type Context struct { Chroot string EnableTools bool SnapshotPath string SnapshotRoot string SnapshotExclusive bool PathOverrides option.PathOverrides // contains filtered or unexported fields }
Context contains the merged set of configuration switches that act as an execution context when calling internal discovery methods
func FromEnv ¶
func FromEnv() *Context
FromEnv returns a Context that has been populated from the environs or default options values
func (*Context) Setup ¶
Setup prepares the extra optional data a Context may use. `Context`s are ready to use once returned by `New`. Optional features, like snapshot unpacking, may require extra steps. Run `Setup` to perform them. You should call `Setup` just once. It is safe to call `Setup` if you don't make use of optional extra features - `Setup` will do nothing.