_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c4700
train
// AssignedUnits indicates an expected call of AssignedUnits
{ "resource": "" }
c4701
train
// Commit mocks base method
{ "resource": "" }
c4702
train
// Created mocks base method
{ "resource": "" }
c4703
train
// CreatedBy mocks base method
{ "resource": "" }
c4704
train
// DefaultCharmConfig mocks base method
{ "resource": "" }
c4705
train
// UnitNames mocks base method
{ "resource": "" }
c4706
train
// invoke sends the block request on the supplied channel, and waits for the // unblock channel to be closed.
{ "resource": "" }
c4707
train
// add records the block's unblock channel under the block's lease key.
{ "resource": "" }
c4708
train
// unblock closes all channels added under the supplied key and removes // them from blocks.
{ "resource": "" }
c4709
train
// NewLock creates a gate.Lock to be used to synchronise workers which // need to start after upgrades have completed. The returned Lock should // be passed to NewWorker. If the agent has already upgraded to the // current version, then the lock will be returned in the released state.
{ "resource": "" }
c4710
train
// NewWorker returns a new instance of the upgradesteps worker. It // will run any required steps to upgrade to the currently running // Juju version.
{ "resource": "" }
c4711
train
// runUpgrades runs the upgrade operations for each job type and // updates the updatedToVersion on success.
{ "resource": "" }
c4712
train
// runUpgradeSteps runs the required upgrade steps for the agent, // retrying on failure. The agent's UpgradedToVersion is set // once the upgrade is complete. // // This function conforms to the agent.ConfigMutator type and is // designed to be called via an agent's ChangeConfig method.
{ "resource": "" }
c4713
train
// jobsToTargets determines the upgrade targets corresponding to the // jobs assigned to an agent. This determines the upgrade steps // which will run during an upgrade.
{ "resource": "" }
c4714
train
// Validate returns an error if the config can't be expected // to run a functional worker.
{ "resource": "" }
c4715
train
// New returns a worker that will attempt to rescale any // applications that might be undersized.
{ "resource": "" }
c4716
train
// Handle is part of the watcher.StringsHandler interface.
{ "resource": "" }
c4717
train
// docIDInt64 generates a globally unique id value // where the model uuid is prefixed to the // given int64 localID.
{ "resource": "" }
c4718
train
// NewDeadWatcher returns a new watcher that is already dead // and always returns the given error from its Err method.
{ "resource": "" }
c4719
train
// NewWatcher returns a new Watcher.
{ "resource": "" }
c4720
train
// Watch starts watching the liveness of key. An event will // be sent onto ch to report the initial status for the key, and // from then on a new event will be sent whenever a change is // detected. Change values sent to the channel must be consumed, // or the whole watcher will blocked.
{ "resource": "" }
c4721
train
// Unwatch stops watching the liveness of key via ch.
{ "resource": "" }
c4722
train
// Sync forces the watcher to load new events from the database and blocks // until all events have been dispatched.
{ "resource": "" }
c4723
train
// Alive returns whether the key is currently considered alive by w, // or an error in case the watcher is dying.
{ "resource": "" }
c4724
train
// loop implements the main watcher loop.
{ "resource": "" }
c4725
train
// checkShouldPrune looks at whether we should run a prune step this time
{ "resource": "" }
c4726
train
// decompressPings looks at a map like 'Alive' and turns it into an array of // sequences that were seen in those maps
{ "resource": "" }
c4727
train
// sync updates the watcher knowledge from the database, and // queues events to observing channels. It fetches the last two time // slots and compares the union of both to the in-memory state.
{ "resource": "" }
c4728
train
// NewPinger returns a new Pinger to report that key is alive. // It starts reporting after Start is called.
{ "resource": "" }
c4729
train
// Start starts periodically reporting that p's key is alive.
{ "resource": "" }
c4730
train
// Stop stops p's periodical ping. // Watchers will not notice p has stopped pinging until the // previous ping times out.
{ "resource": "" }
c4731
train
// killStarted kills the pinger while it is running, by first // stopping it and then recording in the last pinged slot that // the pinger was killed.
{ "resource": "" }
c4732
train
// killStopped kills the pinger while it is not running, by // first allocating a new sequence, and then atomically recording // the new sequence both as alive and dead at once.
{ "resource": "" }
c4733
train
// loop is the main pinger loop that runs while it is // in started state.
{ "resource": "" }
c4734
train
// prepare allocates a new unique sequence for the // pinger key and prepares the pinger to use it.
{ "resource": "" }
c4735
train
// ping records updates the current time slot with the // sequence in use by the pinger.
{ "resource": "" }
c4736
train
// clockDelta returns the approximate skew between // the local clock and the database clock.
{ "resource": "" }
c4737
train
// timeSlot returns the current time slot, in seconds since the // epoch, for the provided now time. The delta skew is applied // to the now time to improve the synchronization with a // centrally agreed time. // // The result of this method may be manipulated for test purposes // by fakeTimeSlot and realTimeSlot.
{ "resource": "" }
c4738
train
// realTimeSlot disables the hardcoding introduced by fakeTimeSlot.
{ "resource": "" }
c4739
train
// RemovePresenceForModel removes all of the records of entities for a given model // across all of the collections.
{ "resource": "" }
c4740
train
// CheckName checks whether name is a valid space name.
{ "resource": "" }
c4741
train
// CheckCIDRs parses the list of strings as CIDRs, checking for // correct formatting, no duplication and no overlaps. Returns error // if no CIDRs are provided, unless cidrsOptional is true.
{ "resource": "" }
c4742
train
// NewAPI returns a SpaceAPI for the root api endpoint that the // environment command returns.
{ "resource": "" }
c4743
train
// updateCharmDir sets charm directory availability for sharing among // concurrent workers according to local operation state.
{ "resource": "" }
c4744
train
// NewMockStorageV1Interface creates a new mock instance
{ "resource": "" }
c4745
train
// StorageClasses mocks base method
{ "resource": "" }
c4746
train
// NewMockStorageClassInterface creates a new mock instance
{ "resource": "" }
c4747
train
// Phase implements ModelMigration.
{ "resource": "" }
c4748
train
// TargetInfo implements ModelMigration.
{ "resource": "" }
c4749
train
// SetPhase implements ModelMigration.
{ "resource": "" }
c4750
train
// migStatusHistoryAndOps sets the model's status history and returns ops for // setting model status according to the phase and message.
{ "resource": "" }
c4751
train
// SetStatusMessage implements ModelMigration.
{ "resource": "" }
c4752
train
// SubmitMinionReport implements ModelMigration.
{ "resource": "" }
c4753
train
// MinionReports implements ModelMigration.
{ "resource": "" }
c4754
train
// WatchMinionReports implements ModelMigration.
{ "resource": "" }
c4755
train
// Refresh implements ModelMigration.
{ "resource": "" }
c4756
train
// ModelUserAccess implements ModelMigration.
{ "resource": "" }
c4757
train
// Validate returns an error if the MigrationSpec contains bad // data. Nil is returned otherwise.
{ "resource": "" }
c4758
train
// Migration retrieves a specific ModelMigration by its id. See also // LatestMigration and LatestCompletedMigration.
{ "resource": "" }
c4759
train
// IsMigrationActive returns true if a migration is in progress for // the model with the given UUID. The State provided need not be for // the model in question.
{ "resource": "" }
c4760
train
// Decorate is part of the Decorator interface.
{ "resource": "" }
c4761
train
// List builds the list of payloads being tracked for // the given unit and IDs. If no IDs are provided then all tracked // payloads for the unit are returned.
{ "resource": "" }
c4762
train
// PopValue returns the requested key from the config map. If the value // doesn't exist, the function returns the empty string. If the value does // exist, the value is returned, and the element removed from the map.
{ "resource": "" }
c4763
train
// WarnAboutUnused emits a warning about each value in the map.
{ "resource": "" }
c4764
train
// ServeHTTP is defined on handler.Handler.
{ "resource": "" }
c4765
train
// ServeGet handles http GET requests.
{ "resource": "" }
c4766
train
// processGet handles a ReST GET request after authentication.
{ "resource": "" }
c4767
train
// processRemoteApplication handles a request for attributes on remote applications.
{ "resource": "" }
c4768
train
// NewMockNotifyWatcher creates a new mock instance
{ "resource": "" }
c4769
train
// NewMockStringsWatcher creates a new mock instance
{ "resource": "" }
c4770
train
// checkImageList creates image metadata from the oracle image list
{ "resource": "" }
c4771
train
// getImageName gets the name of the image represented by the supplied ID
{ "resource": "" }
c4772
train
// Validate returns ann error if the config cannot start a StringsWorker.
{ "resource": "" }
c4773
train
// NewStringsWorker starts a new worker that runs a StringsHandler.
{ "resource": "" }
c4774
train
// NewManagedFilesystemSource returns a storage.FilesystemSource that manages // filesystems on block devices on the host machine. // // The parameters are maps that the caller will update with information about // block devices and filesystems created by the source. The caller must not // update the maps during calls ...
{ "resource": "" }
c4775
train
// isDiskDevice reports whether or not the device is a full disk, as opposed // to a partition or a loop device. We create a partition on disks to contain // filesystems.
{ "resource": "" }
c4776
train
// watchMachine starts a machine watcher if there is not already one for the // specified tag. The watcher will notify the worker when the machine changes, // for example when it is provisioned.
{ "resource": "" }
c4777
train
// refreshMachine refreshes the specified machine's instance ID. If it is set, // then the machine watcher is stopped and pending entities' parameters are // updated. If the machine is not provisioned yet, this method is a no-op.
{ "resource": "" }
c4778
train
// machineProvisioned is called when a watched machine is provisioned.
{ "resource": "" }
c4779
train
// Manifold returns a dependency.Manifold that will run a global clock // updater worker.
{ "resource": "" }
c4780
train
// init sets up the initial data used to determine when a notify occurs.
{ "resource": "" }
c4781
train
// applicationCharmURLChange sends a notification if what is saved for its // charm lxdprofile changes. No notification is sent if the profile pointer // begins and ends as nil.
{ "resource": "" }
c4782
train
// addUnit modifies the map of applications being watched when a unit is // added to the machine. Notification is sent if a new unit whose charm has // an lxd profile is added.
{ "resource": "" }
c4783
train
// removeUnit modifies the map of applications being watched when a unit is // removed from the machine. Notification is sent if a unit being removed // has a profile and other units exist on the machine.
{ "resource": "" }
c4784
train
// provisionedChanged notifies when called. Topic subscribed to is specific to // this machine.
{ "resource": "" }
c4785
train
// ToParams returns the job as multiwatcher.MachineJob.
{ "resource": "" }
c4786
train
// params.JobsFromJobs converts state jobs to juju jobs.
{ "resource": "" }
c4787
train
// MigrationValue converts the state job into a useful human readable // string for model migration.
{ "resource": "" }
c4788
train
// ContainerType returns the type of container hosting this machine.
{ "resource": "" }
c4789
train
// SetKeepInstance sets whether the cloud machine instance // will be retained when the machine is removed from Juju. // This is only relevant if an instance exists.
{ "resource": "" }
c4790
train
// KeepInstance reports whether a machine, when removed from // Juju, will cause the corresponding cloud instance to be stopped.
{ "resource": "" }
c4791
train
// CharmProfiles returns the names of any LXD profiles used by the machine, // which were defined in the charm deployed to that machine.
{ "resource": "" }
c4792
train
// SetCharmProfiles sets the names of the charm profiles used on a machine // in its instanceData.
{ "resource": "" }
c4793
train
// WantsVote reports whether the machine is a controller // that wants to take part in peer voting.
{ "resource": "" }
c4794
train
// SetHasVote sets whether the machine is currently a voting // member of the replica set. It should only be called // from the worker that maintains the replica set.
{ "resource": "" }
c4795
train
// SetStopMongoUntilVersion sets a version that is to be checked against // the agent config before deciding if mongo must be started on a // state server.
{ "resource": "" }
c4796
train
// StopMongoUntilVersion returns the current minimum version that // is required for this machine to have mongo running.
{ "resource": "" }
c4797
train
// IsManual returns true if the machine was manually provisioned.
{ "resource": "" }
c4798
train
// AgentTools returns the tools that the agent is currently running. // It returns an error that satisfies errors.IsNotFound if the tools // have not yet been set.
{ "resource": "" }
c4799
train
// checkVersionValidity checks whether the given version is suitable // for passing to SetAgentVersion.
{ "resource": "" }