icu

package module
v0.0.101 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

README

ICU Cloud Native Buildpack

The ICU CNB provides International Components for Unicode libraries.

Integration

The ICU CNB provides icu as a dependency. Downstream buildpacks, like Dotnet Core Conf CNB can require the icu dependency by generating a Build Plan TOML file that looks like the following:

[[requires]]

  # The name of the ICU dependency is "icu". This value is considered
  # part of the public API for the buildpack and will not change without a plan
  # for deprecation.
  name = "icu"

  # The version of the ICU dependency is not required. In the case it
  # is not specified, the buildpack will provide the newest version, which can
  # be seen in the buildpack.toml file.
  # If you wish to request a specific version, the buildpack supports
  # specifying a semver constraint in the form of "66.*", "66.1.*", or even
  # "66.1.0".
  version = "66.1.0"

  # The ICU CNB supports some non-required metadata options.
  [requires.metadata]

    # Setting the build flag to true will ensure that the ICU
    # depdendency is available on the $PATH for subsequent buildpacks during
    # their build phase. If you are writing a buildpack that needs to run ICU
    # during its build process, this flag should be set to true.
    build = true

    # Setting the launch flag to true will ensure that the ICU dependency is
    # available on the $PATH for the running application. If you are writing an
    # application that needs to run ICU at runtime, this flag should be set to
    # true.
    launch = true

Usage

To package this buildpack for consumption:

$ ./scripts/package.sh

This builds the buildpack's Go source using GOOS=linux by default. You can supply another value as the first argument to package.sh.

buildpack.yml Configurations

The icu buildpack does not support configurations using buildpack.yml.

Documentation

Index

Constants

View Source
const (
	ICULayerName       = "icu"
	ICUDependency      = "icu"
	DependencyCacheKey = "dependency-sha"
)

Variables

This section is empty.

Functions

func Build

func Build(entryResolver EntryResolver,
	dependencyManager DependencyManager,
	layerArranger LayerArranger,
	clock chronos.Clock,
	logger LogEmitter,
) packit.BuildFunc

func Detect

func Detect() packit.DetectFunc

Types

type DependencyManager

type DependencyManager interface {
	Resolve(path, id, version, stack string) (postal.Dependency, error)
	Install(dependency postal.Dependency, cnbPath, layerPath string) error
}

type EntryResolver

type EntryResolver interface {
	Resolve([]packit.BuildpackPlanEntry) packit.BuildpackPlanEntry
}

type ICULayerArranger

type ICULayerArranger struct{}

func NewICULayerArranger

func NewICULayerArranger() ICULayerArranger

func (ICULayerArranger) Arrange

func (a ICULayerArranger) Arrange(path string) error

type LayerArranger

type LayerArranger interface {
	Arrange(path string) error
}

type LogEmitter

type LogEmitter struct {
	// Logger is embedded and therefore delegates all of its functions to the
	// LogEmitter.
	scribe.Logger
}

func NewLogEmitter

func NewLogEmitter(output io.Writer) LogEmitter

type PlanEntryResolver

type PlanEntryResolver struct{}

func NewPlanEntryResolver

func NewPlanEntryResolver() PlanEntryResolver

func (PlanEntryResolver) Resolve

Directories

Path Synopsis
dependency
retrieval Module

Jump to

Keyboard shortcuts

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