cpan

package module
v0.0.0-...-09eb8f6 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2014 License: MIT Imports: 17 Imported by: 1

README

go-cpan-maybe-faster

This is a half-baked idea only. don't use it for anything. Even if it resulted in something, I will change the repo name later. so don't expect this to stick

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Queue             chan *Request
	Dependencies      map[string]*sync.WaitGroup
	DistributionNames map[string]string
	WorkDir           string
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) Fetch

func (c *Client) Fetch(d *Distribution) error

func (*Client) Install

func (c *Client) Install(name string) error

func (*Client) InstallDependency

func (c *Client) InstallDependency(d *Dependency) error

func (*Client) Logf

func (c *Client) Logf(format string, args ...interface{})

func (*Client) ProcessDependency

func (c *Client) ProcessDependency(r *Request)

func (*Client) ProcessQueue

func (c *Client) ProcessQueue()

func (*Client) ResolveDistributionName

func (c *Client) ResolveDistributionName(name string) (distfile string, err error)

func (*Client) SetLocalLib

func (c *Client) SetLocalLib(l string)

func (*Client) SetLocalLibContained

func (c *Client) SetLocalLibContained(l string)

func (*Client) SetNotest

func (c *Client) SetNotest(b bool)

func (*Client) SetVerbose

func (c *Client) SetVerbose(b bool)

type Dependency

type Dependency struct {
	Name    string
	Version string
	Success bool
	Error   error
}

type Distmeta

type Distmeta struct {
	Abstract          string
	Author            []string
	BuildRequires     *Prerequisites
	ConfigureRequires *Prerequisites
	DistributionType  string
	DynamicConfig     bool
	GeneratedBy       string
	License           string
	MetaSpec          map[string]string
	ModuleName        string
	Name              string
	NoIndex           map[string]map[string]string
	Requires          *Prerequisites
	Resources         map[string]string
	Version           string
}

func LoadDistmetaFromFile

func LoadDistmetaFromFile(filename string) (*Distmeta, error)

type Distribution

type Distribution struct {
	Path    string
	WorkDir string
	Meta    *Distmeta
}

func NewDistribution

func NewDistribution(path string) *Distribution

func (*Distribution) Cleanup

func (d *Distribution) Cleanup()

func (*Distribution) Install

func (d *Distribution) Install(c *Client) error

func (*Distribution) ParseMeta

func (d *Distribution) ParseMeta() error

func (*Distribution) Unpack

func (d *Distribution) Unpack() error

type Prerequisites

type Prerequisites struct {
	List []*Dependency
}

func (*Prerequisites) FulfillRequirements

func (p *Prerequisites) FulfillRequirements() error

func (*Prerequisites) SetYAML

func (p *Prerequisites) SetYAML(tag string, value interface{}) bool

type Request

type Request struct {
	*Dependency
	Wait *sync.WaitGroup
}

Directories

Path Synopsis
cli

Jump to

Keyboard shortcuts

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