package coredeploy
import "github.com/purpleidea/mgmt/lang/core/deploy"
Index ¶
- Constants
- func BinaryPath(ctx context.Context, input []types.Value) (types.Value, error)
- func BootstrapPackages(ctx context.Context, input []types.Value) (types.Value, error)
- type AbsPathFunc
- func (obj *AbsPathFunc) ArgGen(index int) (string, error)
- func (obj *AbsPathFunc) Call(ctx context.Context, args []types.Value) (types.Value, error)
- func (obj *AbsPathFunc) Info() *interfaces.Info
- func (obj *AbsPathFunc) Init(init *interfaces.Init) error
- func (obj *AbsPathFunc) SetData(data *interfaces.FuncData)
- func (obj *AbsPathFunc) Stream(ctx context.Context) error
- func (obj *AbsPathFunc) String() string
- func (obj *AbsPathFunc) Validate() error
- type ReadFileAbsFunc
- func (obj *ReadFileAbsFunc) ArgGen(index int) (string, error)
- func (obj *ReadFileAbsFunc) Call(ctx context.Context, args []types.Value) (types.Value, error)
- func (obj *ReadFileAbsFunc) Info() *interfaces.Info
- func (obj *ReadFileAbsFunc) Init(init *interfaces.Init) error
- func (obj *ReadFileAbsFunc) SetData(data *interfaces.FuncData)
- func (obj *ReadFileAbsFunc) Stream(ctx context.Context) error
- func (obj *ReadFileAbsFunc) String() string
- func (obj *ReadFileAbsFunc) Validate() error
- type ReadFileFunc
- func (obj *ReadFileFunc) ArgGen(index int) (string, error)
- func (obj *ReadFileFunc) Call(ctx context.Context, args []types.Value) (types.Value, error)
- func (obj *ReadFileFunc) Info() *interfaces.Info
- func (obj *ReadFileFunc) Init(init *interfaces.Init) error
- func (obj *ReadFileFunc) SetData(data *interfaces.FuncData)
- func (obj *ReadFileFunc) Stream(ctx context.Context) error
- func (obj *ReadFileFunc) String() string
- func (obj *ReadFileFunc) Validate() error
Constants ¶
const ( // AbsPathFuncName is the name this function is registered as. AbsPathFuncName = "abspath" )
const ( // ModuleName is the prefix given to all the functions in this module. ModuleName = "deploy" )
const ( // ReadFileAbsFuncName is the name this function is registered as. ReadFileAbsFuncName = "readfileabs" )
const ( // ReadFileFuncName is the name this function is registered as. ReadFileFuncName = "readfile" )
Functions ¶
func BinaryPath ¶
BinaryPath returns the path to the binary of this program. This is useful for bootstrapping new machines when we want to get the path to copy it over from.
func BootstrapPackages ¶
BootstrapPackages returns the list of packages corresponding to the distro for bootstrapping new machines which will need these installed before they can run mgmt.
Types ¶
type AbsPathFunc ¶
type AbsPathFunc struct {
// contains filtered or unexported fields
}
AbsPathFunc is a function that returns the absolute, full path in the deploy from an input path that is relative to the calling file. If you pass it an empty string, you'll just get the absolute deploy directory path that you're in.
func (*AbsPathFunc) ArgGen ¶
func (obj *AbsPathFunc) ArgGen(index int) (string, error)
ArgGen returns the Nth arg name for this function.
func (*AbsPathFunc) Call ¶
Call this function with the input args and return the value if it is possible to do so at this time.
func (*AbsPathFunc) Info ¶
func (obj *AbsPathFunc) Info() *interfaces.Info
Info returns some static info about itself.
func (*AbsPathFunc) Init ¶
func (obj *AbsPathFunc) Init(init *interfaces.Init) error
Init runs some startup code for this function.
func (*AbsPathFunc) SetData ¶
func (obj *AbsPathFunc) SetData(data *interfaces.FuncData)
SetData is used by the language to pass our function some code-level context.
func (*AbsPathFunc) Stream ¶
func (obj *AbsPathFunc) Stream(ctx context.Context) error
Stream returns the changing values that this func has over time.
func (*AbsPathFunc) String ¶
func (obj *AbsPathFunc) String() string
String returns a simple name for this function. This is needed so this struct can satisfy the pgraph.Vertex interface.
func (*AbsPathFunc) Validate ¶
func (obj *AbsPathFunc) Validate() error
Validate makes sure we've built our struct properly. It is usually unused for normal functions that users can use directly.
type ReadFileAbsFunc ¶
type ReadFileAbsFunc struct {
// contains filtered or unexported fields
}
ReadFileAbsFunc is a function that reads the full contents from a file in our deploy. The file contents can only change with a new deploy, so this is static. In particular, this takes an absolute path relative to the root deploy. In general, you should use `deploy.readfile` instead. Please note that this is different from the readfile function in the os package.
func (*ReadFileAbsFunc) ArgGen ¶
func (obj *ReadFileAbsFunc) ArgGen(index int) (string, error)
ArgGen returns the Nth arg name for this function.
func (*ReadFileAbsFunc) Call ¶
Call this function with the input args and return the value if it is possible to do so at this time.
func (*ReadFileAbsFunc) Info ¶
func (obj *ReadFileAbsFunc) Info() *interfaces.Info
Info returns some static info about itself.
func (*ReadFileAbsFunc) Init ¶
func (obj *ReadFileAbsFunc) Init(init *interfaces.Init) error
Init runs some startup code for this function.
func (*ReadFileAbsFunc) SetData ¶
func (obj *ReadFileAbsFunc) SetData(data *interfaces.FuncData)
SetData is used by the language to pass our function some code-level context.
func (*ReadFileAbsFunc) Stream ¶
func (obj *ReadFileAbsFunc) Stream(ctx context.Context) error
Stream returns the changing values that this func has over time.
func (*ReadFileAbsFunc) String ¶
func (obj *ReadFileAbsFunc) String() string
String returns a simple name for this function. This is needed so this struct can satisfy the pgraph.Vertex interface.
func (*ReadFileAbsFunc) Validate ¶
func (obj *ReadFileAbsFunc) Validate() error
Validate makes sure we've built our struct properly. It is usually unused for normal functions that users can use directly.
type ReadFileFunc ¶
type ReadFileFunc struct {
// contains filtered or unexported fields
}
ReadFileFunc is a function that reads the full contents from a file in our deploy. The file contents can only change with a new deploy, so this is static. Please note that this is different from the readfile function in the os package.
func (*ReadFileFunc) ArgGen ¶
func (obj *ReadFileFunc) ArgGen(index int) (string, error)
ArgGen returns the Nth arg name for this function.
func (*ReadFileFunc) Call ¶
Call this function with the input args and return the value if it is possible to do so at this time.
func (*ReadFileFunc) Info ¶
func (obj *ReadFileFunc) Info() *interfaces.Info
Info returns some static info about itself.
func (*ReadFileFunc) Init ¶
func (obj *ReadFileFunc) Init(init *interfaces.Init) error
Init runs some startup code for this function.
func (*ReadFileFunc) SetData ¶
func (obj *ReadFileFunc) SetData(data *interfaces.FuncData)
SetData is used by the language to pass our function some code-level context.
func (*ReadFileFunc) Stream ¶
func (obj *ReadFileFunc) Stream(ctx context.Context) error
Stream returns the changing values that this func has over time.
func (*ReadFileFunc) String ¶
func (obj *ReadFileFunc) String() string
String returns a simple name for this function. This is needed so this struct can satisfy the pgraph.Vertex interface.
func (*ReadFileFunc) Validate ¶
func (obj *ReadFileFunc) Validate() error
Validate makes sure we've built our struct properly. It is usually unused for normal functions that users can use directly.
Source Files ¶
abspath.go binary.go bootstrap_packages.go deploy.go readfile.go readfileabs.go
- Version
- v0.0.0-20250322185616-c50a578426f1 (latest)
- Published
- Mar 22, 2025
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 4 days ago –
Tools for package owners.