Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultConcurrency = 20
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IngestParams ¶
type IngestParams struct { // Src holds the charmstore client to ingest from. Src *csclient.Client // Dest holds the charmstore client to ingest into. Dest *csclient.Client // Whitelist holds a slice of entities to ingest. Whitelist []WhitelistEntity // Concurrency holds the maximum number of // remote operations that will be allowed to proceed // at once. If this is zero, DefaultConcurrency will // be used. Concurrency int // MaxDisk holds the maximum amount of disk space that // can be used when transferring resources. If SoftDiskLimit // is true, then the true upper bound is the maximum of // MaxDisk and the size of the largest single resource. // // If MaxDisk is zero, there is no limit. MaxDisk int64 // SoftDiskLimit allows the MaxDisk value to be exceeded // if any single resource is larger than MaxDisk. SoftDiskLimit bool // Owner holds the name of the user that will be // given write permission on the transferred entities. // If this is empty, no-one will be given write permission. Owner string // TempDir holds the directory to store temporary files in. // If blank the default system temporary directory will be used. TempDir string // Log is used to send logging messages if it's not nil. Log func(string) }
IngestParams holds information about the charmstores to use for ingestion and the entities to whitelist
type IngestStats ¶
type IngestStats struct { BaseEntityCount int EntityCount int FailedEntityCount int ResourceCount int ArchivesCopiedCount int // ResourcesCopiedCount int // TODO Errors []string }
func Ingest ¶
func Ingest(params IngestParams) IngestStats
Ingest retrieves whitelisted entities from one charmstore and adds them to another, returning statistics on this operation.
type WhitelistEntity ¶
type WhitelistEntity struct { // EntityId holds the id of the charm or bundle to be whitelisted. // If it has no revision number, then the latest revision for each // requested channel will be copied. EntityId string // Channels holds a list of the channels that the entity should // be published to. If the entity id has no revision number, // the latest revision for that channel will be used as the // current revision. Channels []params.Channel // Resources holds a map from resource name to the resource // revisions of that resource to include for this entity. Resources map[string][]int }
WhitelistEntity describes an entity to be whitelisted.
Click to show internal directories.
Click to hide internal directories.