Documentation ¶
Index ¶
- Constants
- func CompressGzip(srcFilePath string, destFilePath string) error
- func FillCtx(cmdCtx *cmdcontext.CmdCtx, packCtx *PackCtx, args []string) error
- func PackInDocker(cmdCtx *cmdcontext.CmdCtx, packCtx *PackCtx, opts config.CliOpts, ...) error
- func WriteTarArchive(srcDirPath string, compressWriter io.Writer) error
- func WriteTgzArchive(srcDirPath string, destFilePath string) error
- type ArchiveCtx
- type DepRelation
- type PackCtx
- type PackDependencies
- type PackDependency
- type PackageType
- type Packer
- type RocksVersions
- type RpmDebCtx
Constants ¶
const ( PreInstScriptName = "preinst" PostInstScriptName = "postinst" )
const ( PreInstScriptContent = `` /* 527-byte string literal not displayed */ PostInstScriptContent = `` )
const ( Tgz = "tgz" Rpm = "rpm" Deb = "deb" Docker = "docker" )
Variables ¶
This section is empty.
Functions ¶
func CompressGzip ¶
CompressGzip compresses specified file with gzip.BestCompression level.
func FillCtx ¶
func FillCtx(cmdCtx *cmdcontext.CmdCtx, packCtx *PackCtx, args []string) error
FillCtx fills pack context.
func PackInDocker ¶ added in v0.4.0
func PackInDocker(cmdCtx *cmdcontext.CmdCtx, packCtx *PackCtx, opts config.CliOpts, cmdArgs []string) error
PackInDocker runs tt pack in docker container.
func WriteTarArchive ¶
WriteTarArchive creates Tar archive of specified path using specified writer
func WriteTgzArchive ¶
WriteTgzArchive creates TGZ archive of specified path.
Types ¶
type ArchiveCtx ¶
type ArchiveCtx struct { // All means pack all artifacts from bundle, including pid files etc. All bool }
ArchiveCtx contains flags specific for tgz type.
type DepRelation ¶
type DepRelation struct { Relation string `@( "=" "=" | "=" | ">" "=" | "<" "=" | ">" | "<" )` Version string `@Number` }
DepRelation tags are false-positive highlighted by golang-ci-linter. Those tags are needed for participle parser package. nolint
type PackCtx ¶
type PackCtx struct { // Type contains a type of packing. Type string // Name contains the name of packing bundle. Name string // Version contains the version of packing bundle. Version string // AppList contains applications to be packed. AppList []string // FileName contains the name of file of result package. FileName string // WithBinaries put binaries into the package regardless if tarantool is system or not. WithBinaries bool // WithoutBinaries ignores binaries regardless if tarantool is system or not. WithoutBinaries bool // WithoutModules ignores external modules. WithoutModules bool // TarantoolExecutable is a path to tarantool executable path TarantoolExecutable string // TarantoolIsSystem shows if tarantool is system. TarantoolIsSystem bool // ArchiveCtx contains flags specific for tgz type. Archive ArchiveCtx // RpmDeb contains all information about rpm and deb type of packing. RpmDeb RpmDebCtx // UseDocker is set if a package must be built in docker container. UseDocker bool // CartridgeCompat enables backward compatibility with cartridge cli. CartridgeCompat bool // TarantoolVersion specifies the version of the tarantool for pack in docker. TarantoolVersion string }
PackCtx contains all flags for tt pack command.
type PackDependencies ¶
type PackDependencies []PackDependency
type PackDependency ¶
type PackDependency struct { Name string `@Ident` Relations []DepRelation `(@@ ( "," @@ )?)?` }
PackDependency tags are false-positive highlighted by golang-ci-linter. Those tags are needed for participle parser package. nolint
type PackageType ¶
type PackageType string
type Packer ¶
type Packer interface {
Run(cmdCtx *cmdcontext.CmdCtx, packCtx *PackCtx, opts *config.CliOpts) error
}
Packer is an interface that packs an app.
func CreatePacker ¶
type RocksVersions ¶ added in v1.2.0
func LuaGetRocksVersions ¶ added in v1.2.0
func LuaGetRocksVersions(appDirPath string) (RocksVersions, error)
LuaGetRocksVersions gets map which contains {name: versions} from rocks manifest.
type RpmDebCtx ¶
type RpmDebCtx struct { // WithTarantoolDeps means to add to package dependencies versions // of tt and tarantool from the current environment. WithTarantoolDeps bool // PreInst is a path to pre-install script. PreInst string // PostInst is a path to post-install script. PostInst string // Deps is dependencies list. Format: // dependency_06>=4 Deps []string // DepsFile is a path to a file of dependencies. DepsFile string // SystemdUnitParamsFile is a path to file with systemd unit parameters. SystemdUnitParamsFile string }
RpmDebCtx contains flags specific for RPM/DEB type.