minion

package
v0.0.0-...-ea84330 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2015 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendLogToChanges

func AppendLogToChanges(logPath, changesPath, arch string) error

func Download

func Download(url string) (func(), string, error)

func FakeChanges

func FakeChanges(
	date,
	source,
	binary,
	arch,
	version,
	distribution,
	urgency string,
	files []string,
) (string, error)

func Filename

func Filename(source string, v version.Version, arch, flavor string) string

func GetBuildChannels

func GetBuildChannels(
	channels *BuildChannelMap,
	suites []BuildableSuite,
) []chan Build

func HashFile

func HashFile(path string, algo hash.Hash) (string, error)

func LogChangesFromChanges

func LogChangesFromChanges(logPath, changesPath, arch string) (string, error)

func LogChangesFromDsc

func LogChangesFromDsc(logPath string, dsc control.DSC, suite, arch string) (string, error)

Take a DSC, and a log file, and create a fake .changes to upload the log to the archive. This relies on a reprepro extension.

func MergeChanges

func MergeChanges(changes ...string) (string, error)

func ParseDscURL

func ParseDscURL(url string) (*control.DSC, error)

func Tempdir

func Tempdir() (func(), string, error)

func UploadChanges

func UploadChanges(conf MinionConfig, job Build, changesPath string) error

Types

type Archive

type Archive struct {
	Key      string
	Root     string
	Sections []string
	Suite    string
}

type BinNMU

type BinNMU struct {
	Changelog string
	Version   string
}

type Build

type Build struct {
	Archives []Archive
	Chroot   Chroot
	DSC      string
	Arch     string
	Upload   Upload
	BinNMU   BinNMU
}

func NewBuild

func NewBuild(
	host string,
	archive string,
	suite string,
	component string,
	arch string,
	dsc string,
) Build

func NextBuild

func NextBuild(channels []chan Build, heartbeat time.Duration) Build

func (Build) GetBuildChannelKey

func (b Build) GetBuildChannelKey() string

type BuildChannelMap

type BuildChannelMap map[string]chan Build

func (BuildChannelMap) Get

func (b BuildChannelMap) Get(arch string) chan Build

type BuildNeedingRequest

type BuildNeedingRequest struct {
	Repo    string
	Suite   string
	Arch    string
	Package string
}

type BuildableSuite

type BuildableSuite struct {
	Suite string
	Arch  string
}

func (*BuildableSuite) GetKey

func (b *BuildableSuite) GetKey() string

type Chroot

type Chroot struct {
	Target string
	Chroot string
}

type CoordinatorProxy

type CoordinatorProxy struct {
	*rpc.Client
}

func (*CoordinatorProxy) GetBuildNeeding

func (p *CoordinatorProxy) GetBuildNeeding(repo, suite, arch, pkg string) ([]reprepro.BuildNeedingPackage, error)

func (*CoordinatorProxy) GetOnlineMinions

func (p *CoordinatorProxy) GetOnlineMinions() ([]string, error)

func (*CoordinatorProxy) GetQueueLengths

func (p *CoordinatorProxy) GetQueueLengths() (map[string]int, error)

func (*CoordinatorProxy) Heartbeat

func (p *CoordinatorProxy) Heartbeat() ([]string, error)

func (*CoordinatorProxy) QueueBuild

func (p *CoordinatorProxy) QueueBuild(build Build) error

type CoordinatorRemote

type CoordinatorRemote struct {
	Config  *MinionConfig
	Clients *OnlineClients
	// contains filtered or unexported fields
}

func NewCoordinatorRemote

func NewCoordinatorRemote(
	buildChannels *BuildChannelMap,
	config *MinionConfig,
	clients *OnlineClients,
) CoordinatorRemote

func (*CoordinatorRemote) GetBuildNeeding

func (c *CoordinatorRemote) GetBuildNeeding(
	buildNeedingRequest BuildNeedingRequest,
	ret *[]reprepro.BuildNeedingPackage,
) error

func (*CoordinatorRemote) GetOnlineMinions

func (c *CoordinatorRemote) GetOnlineMinions(incoming bool, ret *[]string) error

func (*CoordinatorRemote) GetQueueLengths

func (c *CoordinatorRemote) GetQueueLengths(incoming bool, ret *map[string]int) error

func (*CoordinatorRemote) Heartbeat

func (c *CoordinatorRemote) Heartbeat(incoming bool, ret *[]string) error

func (*CoordinatorRemote) QueueBuild

func (c *CoordinatorRemote) QueueBuild(build Build, r *interface{}) error

type MinionConfig

type MinionConfig struct {
	Cert   string `flag:"cert"    description:"OpenSSL Client or Server .crt to serve to the world."`
	Key    string `flag:"key"     description:"OpenSSL Client or Server .key to do private key things with."`
	CaCert string `flag:"ca-cert" description:"OpenSSL CA Cert to compare the server or client certs to."`
	Host   string `flag:"host"    description:"Name of the Host that we're either serving on behalf of, or connecting to."`
	Port   int    `flag:"port"    description:"Port we're connecting to on the host."`
	Mode   string `flag:"mode"    description:"Mode to run as."`

	Administrator string `flag:"administrator" description:""`
	Templates     string `flag:"templates" description:"templates"`
	Repos         string `flag:"repos" description:"repos"`
}

type MinionProxy

type MinionProxy struct {
	*rpc.Client
}

func (*MinionProxy) Build

func (m *MinionProxy) Build(build Build) (bool, error)

func (*MinionProxy) GetBuildableSuites

func (m *MinionProxy) GetBuildableSuites() ([]BuildableSuite, error)

func (*MinionProxy) Heartbeat

func (m *MinionProxy) Heartbeat() error

type MinionRemote

type MinionRemote struct {
	BuildableSuites []BuildableSuite
	Config          MinionConfig
}

func NewMinionRemote

func NewMinionRemote(config MinionConfig, suites []BuildableSuite) MinionRemote

func (*MinionRemote) Build

func (m *MinionRemote) Build(i Build, ftbfs *bool) error

func (*MinionRemote) GetBuildableSuites

func (m *MinionRemote) GetBuildableSuites(i *bool, ret *[]BuildableSuite) error

func (*MinionRemote) Heartbeat

func (m *MinionRemote) Heartbeat(i *bool, ret *bool) error

type OnlineClient

type OnlineClient struct {
	Name  string
	Proxy *MinionProxy
}

type OnlineClients

type OnlineClients map[*OnlineClient]bool

func (OnlineClients) Add

func (o OnlineClients) Add(client *OnlineClient)

func (OnlineClients) Remove

func (o OnlineClients) Remove(client *OnlineClient)

type Upload

type Upload struct {
	Host    string
	Port    int
	Archive string
}

Jump to

Keyboard shortcuts

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