_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c25700 | train | // GetPV returns the PV object given the PV name | {
"resource": ""
} | ||
c25701 | train | // AddPV adds the PV object to the cache | {
"resource": ""
} | ||
c25702 | train | // DeletePV deletes the PV object from the cache | {
"resource": ""
} | ||
c25703 | train | // ListPVs returns a list of all the PVs in the cache | {
"resource": ""
} | ||
c25704 | train | // Setup sets up various prerequisites and settings for the server. If an error
// is encountered at any point it returns it instantly | {
"resource": ""
} | ||
c25705 | train | //NewGlusterBlockProvisioner create a new provisioner. | {
"resource": ""
} | ||
c25706 | train | // createVolume creates a gluster block volume i.e. the storage asset. | {
"resource": ""
} | ||
c25707 | train | //sortTargetPortal extract TP | {
"resource": ""
} | ||
c25708 | train | // IsBlock for unsupported platform returns error. | {
"resource": ""
} | ||
c25709 | train | // mapToAWSVolumeID extracts the awsVolumeID from the KubernetesVolumeID | {
"resource": ""
} | ||
c25710 | train | // LoadBalancer returns a load balancer | {
"resource": ""
} | ||
c25711 | train | // Routes returns cloud provider routes | {
"resource": ""
} | ||
c25712 | train | // Zones returns cloud provider zones | {
"resource": ""
} | ||
c25713 | train | // GetZone gets a zone from cloud provider | {
"resource": ""
} | ||
c25714 | train | // NewVolumeSnapshotter create a new VolumeSnapshotter | {
"resource": ""
} | ||
c25715 | train | // Helper function to get PV from VolumeSnapshot | {
"resource": ""
} | ||
c25716 | train | // Helper function to get PV from PV name | {
"resource": ""
} | ||
c25717 | train | // Helper function that looks up VolumeSnapshotData from a VolumeSnapshot | {
"resource": ""
} | ||
c25718 | train | // Exame the given snapshot in detail and then return the status | {
"resource": ""
} | ||
c25719 | train | // Below are the closures meant to build the functions for the GoRoutineMap operations.
// syncSnapshot is the main controller method to decide what to do to create a snapshot. | {
"resource": ""
} | ||
c25720 | train | // The function goes through the whole snapshot creation process.
// 1. Update VolumeSnapshot metadata to include the snapshotted PV name, timestamp and snapshot uid, also generate tag for cloud provider
// 2. Trigger the snapshot through cloud provider and attach the tag to the snapshot.
// 3. Create the VolumeSnapsho... | {
"resource": ""
} | ||
c25721 | train | // Update VolumeSnapshot object with current timestamp and associated PersistentVolume name in object's metadata | {
"resource": ""
} | ||
c25722 | train | // Propagates the VolumeSnapshot condition to VolumeSnapshotData | {
"resource": ""
} | ||
c25723 | train | // Update VolumeSnapshot status if the condition is changed. | {
"resource": ""
} | ||
c25724 | train | // Bind the VolumeSnapshot and VolumeSnapshotData and udpate the status | {
"resource": ""
} | ||
c25725 | train | // getClassForVolume returns StorageClass | {
"resource": ""
} | ||
c25726 | train | // NewDesiredStateOfWorldPopulator returns a new instance of DesiredStateOfWorldPopulator.
// loopSleepDuration - the amount of time the populator loop sleeps between
// successive executions
// desiredStateOfWorld - the cache to populate | {
"resource": ""
} | ||
c25727 | train | // NewDriverCall initialize the DriverCall | {
"resource": ""
} | ||
c25728 | train | //NewDriverCallWithTimeout return the DriverCall with timeout | {
"resource": ""
} | ||
c25729 | train | //AppendSpec add all option parameters to DriverCall | {
"resource": ""
} | ||
c25730 | train | //Run the command with option parameters | {
"resource": ""
} | ||
c25731 | train | // NewOptionsForDriver assemble all option parameters | {
"resource": ""
} | ||
c25732 | train | // NewJobController instantiates a new job controller. | {
"resource": ""
} | ||
c25733 | train | // processNextItem serially handles the events provided by the informer. | {
"resource": ""
} | ||
c25734 | train | // IsCleaningJobRunning returns true if a cleaning job is running for the specified PV. | {
"resource": ""
} | ||
c25735 | train | // RemoveJob returns true and deletes the job if the cleaning job has completed. | {
"resource": ""
} | ||
c25736 | train | // NewCleanupJob creates manifest for a cleaning job. | {
"resource": ""
} | ||
c25737 | train | // IsCleaningJobRunning mocks the interface method. | {
"resource": ""
} | ||
c25738 | train | // RemoveJob mocks the interface method. | {
"resource": ""
} | ||
c25739 | train | // NewOpenEBSProvisioner creates a new openebs provisioner | {
"resource": ""
} | ||
c25740 | train | // Adds a snapshot to the list of snapshots to be created. | {
"resource": ""
} | ||
c25741 | train | // Removes the snapshot from the list of existing snapshots. | {
"resource": ""
} | ||
c25742 | train | // Each iterates over the slice and apply Iterator to every item | {
"resource": ""
} | ||
c25743 | train | // Map iterates over the slice and apply ResultIterator to every item. Returns new slice as a result. | {
"resource": ""
} | ||
c25744 | train | // Find iterates over the slice and apply ConditionIterator to every item. Returns first item that meet ConditionIterator or nil otherwise. | {
"resource": ""
} | ||
c25745 | train | // Filter iterates over the slice and apply ConditionIterator to every item. Returns new slice. | {
"resource": ""
} | ||
c25746 | train | // Count iterates over the slice and apply ConditionIterator to every item. Returns count of items that meets ConditionIterator. | {
"resource": ""
} | ||
c25747 | train | // LeftTrim trim characters from the left-side of the input.
// If second argument is empty, it's will be remove leading spaces. | {
"resource": ""
} | ||
c25748 | train | // RightTrim trim characters from the right-side of the input.
// If second argument is empty, it's will be remove spaces. | {
"resource": ""
} | ||
c25749 | train | // Trim trim characters from both sides of the input.
// If second argument is empty, it's will be remove spaces. | {
"resource": ""
} | ||
c25750 | train | // WhiteList remove characters that do not appear in the whitelist. | {
"resource": ""
} | ||
c25751 | train | // ReplacePattern replace regular expression pattern in string | {
"resource": ""
} | ||
c25752 | train | // Reverse return reversed string | {
"resource": ""
} | ||
c25753 | train | // GetLine return specified line of multiline string | {
"resource": ""
} | ||
c25754 | train | // SafeFileName return safe string that can be used in file names | {
"resource": ""
} | ||
c25755 | train | // Truncate a string to the closest length without breaking words. | {
"resource": ""
} | ||
c25756 | train | // PadLeft pad left side of string if size of string is less then indicated pad length | {
"resource": ""
} | ||
c25757 | train | // PadBoth pad sides of string if size of string is less then indicated pad length | {
"resource": ""
} | ||
c25758 | train | // PadString either left, right or both sides, not the padding string can be unicode and more then one
// character | {
"resource": ""
} | ||
c25759 | train | // TruncatingErrorf removes extra args from fmt.Errorf if not formatted in the str object | {
"resource": ""
} | ||
c25760 | train | // ToJSON convert the input to a valid JSON string | {
"resource": ""
} | ||
c25761 | train | // ToFloat convert the input string to a float, or 0.0 if the input is not a float. | {
"resource": ""
} | ||
c25762 | train | // ToInt convert the input string or any int type to an integer type 64, or 0 if the input is not an integer. | {
"resource": ""
} | ||
c25763 | train | // InRange returns true if value lies between left and right border, generic type to handle int, float32 or float64, all types must the same type | {
"resource": ""
} | ||
c25764 | train | // IsExistingEmail check if the string is an email of existing domain | {
"resource": ""
} | ||
c25765 | train | // IsRequestURL check if the string rawurl, assuming
// it was received in an HTTP request, is a valid
// URL confirm to RFC 3986 | {
"resource": ""
} | ||
c25766 | train | // IsRequestURI check if the string rawurl, assuming
// it was received in an HTTP request, is an
// absolute URI or an absolute path. | {
"resource": ""
} | ||
c25767 | train | // IsLowerCase check if the string is lowercase. Empty string is valid. | {
"resource": ""
} | ||
c25768 | train | // IsUpperCase check if the string is uppercase. Empty string is valid. | {
"resource": ""
} | ||
c25769 | train | // HasLowerCase check if the string contains at least 1 lowercase. Empty string is valid. | {
"resource": ""
} | ||
c25770 | train | // HasUpperCase check if the string contians as least 1 uppercase. Empty string is valid. | {
"resource": ""
} | ||
c25771 | train | // IsInt check if the string is an integer. Empty string is valid. | {
"resource": ""
} | ||
c25772 | train | // IsFullWidth check if the string contains any full-width chars. Empty string is valid. | {
"resource": ""
} | ||
c25773 | train | // IsHalfWidth check if the string contains any half-width chars. Empty string is valid. | {
"resource": ""
} | ||
c25774 | train | // IsVariableWidth check if the string contains a mixture of full and half-width chars. Empty string is valid. | {
"resource": ""
} | ||
c25775 | train | // IsFilePath check is a string is Win or Unix file path and returns it's type. | {
"resource": ""
} | ||
c25776 | train | // IsDataURI checks if a string is base64 encoded data URI such as an image | {
"resource": ""
} | ||
c25777 | train | // IsISO3166Alpha2 checks if a string is valid two-letter country code | {
"resource": ""
} | ||
c25778 | train | // IsISO3166Alpha3 checks if a string is valid three-letter country code | {
"resource": ""
} | ||
c25779 | train | // IsISO693Alpha2 checks if a string is valid two-letter language code | {
"resource": ""
} | ||
c25780 | train | // IsISO693Alpha3b checks if a string is valid three-letter language code | {
"resource": ""
} | ||
c25781 | train | // IsPort checks if a string represents a valid port | {
"resource": ""
} | ||
c25782 | train | // IsIPv4 check if the string is an IP version 4. | {
"resource": ""
} | ||
c25783 | train | // IsRsaPublicKey check if a string is valid public key with provided length | {
"resource": ""
} | ||
c25784 | train | // ValidateStruct use tags for fields.
// result will be equal to `false` if there are any errors. | {
"resource": ""
} | ||
c25785 | train | // IsSSN will validate the given string as a U.S. Social Security Number | {
"resource": ""
} | ||
c25786 | train | // IsTime check if string is valid according to given format | {
"resource": ""
} | ||
c25787 | train | // IsISO4217 check if string is valid ISO currency code | {
"resource": ""
} | ||
c25788 | train | // ByteLength check string's length | {
"resource": ""
} | ||
c25789 | train | // IsRsaPub check whether string is valid RSA key
// Alias for IsRsaPublicKey | {
"resource": ""
} | ||
c25790 | train | // StringMatches checks if a string matches a given pattern. | {
"resource": ""
} | ||
c25791 | train | // Range check string's length | {
"resource": ""
} | ||
c25792 | train | // IsIn check if string str is a member of the set of strings params | {
"resource": ""
} | ||
c25793 | train | // ErrorByField returns error for specified field of the struct
// validated by ValidateStruct or empty string if there are no errors
// or this field doesn't exists or doesn't have any errors. | {
"resource": ""
} | ||
c25794 | train | // ErrorsByField returns map of errors of the struct validated
// by ValidateStruct or empty map if there are no errors. | {
"resource": ""
} | ||
c25795 | train | // buildDebug builds a debug binary in the current working directory | {
"resource": ""
} | ||
c25796 | train | // loadPathsToWatch loads the paths that needs to be watched for changes | {
"resource": ""
} | ||
c25797 | train | // startDelveDebugger starts the Delve debugger server | {
"resource": ""
} | ||
c25798 | train | // startWatcher starts the fsnotify watcher on the passed paths | {
"resource": ""
} | ||
c25799 | train | // ParsePackagesFromDir parses packages from a given directory | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.