ybundle

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleName

type BundleName string

BundleName represents name of the Bundle

type BundleVersion

type BundleVersion string

BundleVersion represents version of the Bundle

type HTTPRepository

type HTTPRepository struct {
	BaseURL string
	Client  interface {
		Do(req *http.Request) (*http.Response, error)
	}
}

HTTPRepository represents remote bundle repository which is accessed via HTTP.

func NewHTTPRepository

func NewHTTPRepository(cfg RepositoryConfig) *HTTPRepository

NewHTTPRepository creates new instance of HTTPRepository.

func (*HTTPRepository) BundleReader

func (p *HTTPRepository) BundleReader(name BundleName, version BundleVersion) (r io.Reader, closer func(), err error)

BundleReader calls repository for a specific bundle and returns means to read bundle content.

func (*HTTPRepository) IndexReader

func (p *HTTPRepository) IndexReader() (r io.Reader, closer func(), err error)

IndexReader acquire repository index.

type Loader

type Loader struct {
	// contains filtered or unexported fields
}

Loader provides loading of bundles from repository and representing them as bundles and charts.

func NewLoader

func NewLoader(tmpDir string, log *logrus.Entry) *Loader

NewLoader returns new instance of Loader.

func (*Loader) Load

func (l *Loader) Load(in io.Reader) (*internal.Bundle, []*chart.Chart, error)

Load takes stream with compressed tgz archive as io.Reader, tries to unpack it to tmp directory, and then loads it as YBundle and helm Chart

func (Loader) LoadDir

func (l Loader) LoadDir(path string) (*internal.Bundle, []*chart.Chart, error)

LoadDir takes uncompressed chart in specified directory and loads it.

type LocalRepository

type LocalRepository struct {
	// contains filtered or unexported fields
}

LocalRepository provide access to bundles repository

func NewLocalRepository

func NewLocalRepository(path string) *LocalRepository

NewLocalRepository creates structure which allow us to access local repository

func (*LocalRepository) GetBundlePath

func (p *LocalRepository) GetBundlePath(name string) (string, error)

GetBundlePath returns path to the bundle from local repository

func (*LocalRepository) GetIndexFile

func (p *LocalRepository) GetIndexFile() (io.Reader, func(), error)

GetIndexFile returns index.yaml file from local repository

type Populator

type Populator struct {
	// contains filtered or unexported fields
}

Populator is responsible for populating bundles and charts into storage. Source data is provided by bundleLoader.

func NewPopulator

func NewPopulator(p repository, bundleLoader bundleLoader, bundleInterface bundleUpserter, chartInterface chartUpserter, log *logrus.Entry) *Populator

NewPopulator creates new instance of Populator.

func (*Populator) Init

func (b *Populator) Init() error

Init triggers population process.

type RepositoryConfig

type RepositoryConfig struct {
	BaseURL string `json:"baseUrl" valid:"required"`
}

RepositoryConfig provides configuration for HTTP Repository.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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