Documentation ¶
Overview ¶
Package langpuppet implements an integration entrypoint that combines lang and Puppet.
Index ¶
Constants ¶
const ( // Name is the name of this frontend. Name = "langpuppet" // FlagPrefix gets prepended to each flag of both the puppet and lang GAPI. FlagPrefix = "lp-" )
const ( // MergePrefixLang is how a mergeable vertex name starts in mcl code. MergePrefixLang = "puppet_" // MergePrefixPuppet is how a mergeable Puppet class name starts. MergePrefixPuppet = "mgmt_" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GAPI ¶
type GAPI struct {
// contains filtered or unexported fields
}
GAPI implements the main langpuppet GAPI interface. It wraps the Puppet and Lang GAPIs and receives graphs from both. It then runs a merging algorithm that mainly just makes a union of both the sets of vertices and edges. Some vertices are merged using a naming convention. Details can be found in the langpuppet.mergeGraphs function.
func (*GAPI) Cli ¶
Cli takes a cli.Context, and returns our GAPI if activated. All arguments should take the prefix of the registered name. On activation, if there are any validation problems, you should return an error. If this was not activated, then you should return a nil GAPI and a nil error.
func (*GAPI) CliFlags ¶
CliFlags returns a list of flags used by this deploy subcommand. It consists of all flags accepted by lang and puppet mode, with a respective "lp-" prefix.