langpuppet

package
v0.0.0-...-328360e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package langpuppet implements an integration entrypoint that combines lang and Puppet.

Index

Constants

View Source
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_"
)
View Source
const (
	// Name is the name of this frontend.
	Name = "langpuppet"
)

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

func (obj *GAPI) Cli(info *gapi.Info) (*gapi.Deploy, error)

Cli takes an *Info struct, and returns our deploy if activated, and if there are any validation problems, you should return an error. If there is no deploy, then you should return a nil deploy and a nil error.

func (*GAPI) Close

func (obj *GAPI) Close() error

Close shuts down the Puppet GAPI.

func (*GAPI) Graph

func (obj *GAPI) Graph() (*pgraph.Graph, error)

Graph returns a current Graph.

func (*GAPI) Init

func (obj *GAPI) Init(data *gapi.Data) error

Init initializes the langpuppet GAPI struct.

func (*GAPI) Next

func (obj *GAPI) Next() chan gapi.Next

Next returns nil errors every time there could be a new graph.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL