text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func checkrequestStatus(d *schema.ResourceData, config Config, requestID string, timeOut int) error {
timeout := time.After(time.Duration(timeOut) * time.Second)
for {
select {
case <-time.After(1 * time.Second):
status, state, err := checkServiceRequestStatus(config, requestID)
if err == nil {
if state... | [
-0.7387233972549438,
-0.13481104373931885,
0.7679026126861572,
0.48795971274375916,
-0.1304813176393509,
0.6037033200263977,
-1.112470269203186,
-0.46149545907974243,
-0.19400815665721893,
1.022299885749817,
0.20581744611263275,
0.700408935546875,
-0.16912077367305756,
0.9495352506637573,
... |
func checkServiceRequestStatus(config Config, requestID string) (string, string, error) {
url := "api/service_requests/" + requestID
request, err := http.NewRequest("GET", url, nil)
if err != nil {
log.Printf("[ERROR] Error in creating http Request %s", err)
return "", "", fmt.Errorf("[ERROR] Error in creating ... | [
-0.7608115077018738,
-1.1462445259094238,
0.8901383280754089,
-0.4652726352214813,
-0.22033341228961945,
0.5704653263092041,
-0.6079705357551575,
-0.19259895384311676,
-0.40301772952079773,
0.8005841970443726,
-0.3492012321949005,
0.5868300199508667,
-0.40552255511283875,
0.759418785572052... |
func ReadJSON(inputFileName string, href string) ([]byte, []byte, error) {
jsonFile, err := os.Open(inputFileName)
if err != nil {
fmt.Println(err)
return nil, nil, err
}
defer jsonFile.Close()
fileData, _ := ioutil.ReadFile(inputFileName)
var result map[string]map[string]interface{}
var result1 map[string]... | [
-0.8228819966316223,
-1.2662023305892944,
0.9136069416999817,
-0.8221017122268677,
-0.18312542140483856,
0.6232197284698486,
0.44149935245513916,
0.20219847559928894,
-0.9894969463348389,
-0.20237495005130768,
-0.20224279165267944,
0.696601927280426,
-0.01776081882417202,
0.358462393283844... |
func nextInt() func() int {
i := 0
return func() int {
i++
return i
}
} | [
0.13626828789710999,
0.11530259996652603,
0.3249758780002594,
0.03557167947292328,
-0.5432637333869934,
-0.012388134375214577,
0.8760144710540771,
-0.706912636756897,
-0.8994149565696716,
-0.8158270716667175,
-0.7359984517097473,
-0.02246393822133541,
0.31330791115760803,
-0.38161465525627... |
func (s *Server) saveTimestamp(now time.Time) error {
data := uint64ToBytes(uint64(now.UnixNano()))
key := getTimestampPath(s.cfg.RootPath)
ctx, cancel := context.WithTimeout(context.Background(), requestTimeout)
resp, err := s.client.Txn(ctx).
If(s.leaderCmp()).
Then(clientv3.OpPut(key, string(data))).
Comm... | [
-0.8264232277870178,
0.34496980905532837,
0.5311829447746277,
-0.08541876077651978,
0.9505770802497864,
-0.23450437188148499,
-0.31713050603866577,
-0.3333492577075958,
0.13364262878894806,
0.20885051786899567,
-1.4608179330825806,
-0.6506202220916748,
-1.3446096181869507,
0.75375396013259... |
func (policy *ServersConnectionPolicy) GetConditions() conditions.Conditions {
return policy.Status.Conditions
} | [
0.15639610588550568,
-0.7886199355125427,
0.17425550520420074,
-0.07084707170724869,
0.2340770810842514,
0.893022894859314,
-0.6265411972999573,
-0.301670104265213,
0.26111388206481934,
-0.0615137554705143,
-0.09546646475791931,
0.029860438778996468,
-0.9967177510261536,
0.3323241472244262... |
func (policy *ServersConnectionPolicy) SetConditions(conditions conditions.Conditions) {
policy.Status.Conditions = conditions
} | [
-0.3961746096611023,
-0.6759297847747803,
0.07039865851402283,
-0.3045770823955536,
0.18659964203834534,
1.5359715223312378,
-0.728309154510498,
0.30778658390045166,
0.1921483278274536,
0.30032509565353394,
-0.5842068791389465,
-0.19075196981430054,
-0.7895684242248535,
0.9075945019721985,... |
func (policy *ServersConnectionPolicy) ConvertFrom(hub conversion.Hub) error {
source, ok := hub.(*v20211101s.ServersConnectionPolicy)
if !ok {
return fmt.Errorf("expected sql/v1api20211101storage/ServersConnectionPolicy but received %T instead", hub)
}
return policy.AssignProperties_From_ServersConnectionPolicy... | [
0.187209814786911,
-0.5259807109832764,
0.2753840684890747,
-0.14688944816589355,
-0.1843159794807434,
0.9019394516944885,
-0.04396478459239006,
-0.18037095665931702,
0.6940417885780334,
0.35016828775405884,
0.26233774423599243,
-0.00496123731136322,
0.2928847670555115,
0.6945870518684387,... |
func (policy *ServersConnectionPolicy) ConvertTo(hub conversion.Hub) error {
destination, ok := hub.(*v20211101s.ServersConnectionPolicy)
if !ok {
return fmt.Errorf("expected sql/v1api20211101storage/ServersConnectionPolicy but received %T instead", hub)
}
return policy.AssignProperties_To_ServersConnectionPolic... | [
-0.43309661746025085,
-0.17930404841899872,
0.42398032546043396,
-0.706684947013855,
0.6444928646087646,
0.559637725353241,
0.06240375339984894,
-0.2947066128253937,
0.26639533042907715,
0.5309914946556091,
0.10157134383916855,
0.45333972573280334,
0.2052500993013382,
0.35376015305519104,
... |
func (policy *ServersConnectionPolicy) Default() {
policy.defaultImpl()
var temp any = policy
if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok {
runtimeDefaulter.CustomDefault()
}
} | [
-0.14821460843086243,
0.46806836128234863,
0.021909160539507866,
-0.03954894095659256,
1.5603618621826172,
0.38258087635040283,
-0.5100585222244263,
0.5154787302017212,
0.26955896615982056,
-0.27216917276382446,
-0.03027641400694847,
0.5249869227409363,
-0.9413720369338989,
1.3153457641601... |
func (policy *ServersConnectionPolicy) defaultImpl() {} | [
0.06852149218320847,
0.12653596699237823,
0.12655530869960785,
-0.45808425545692444,
0.870327889919281,
1.096304178237915,
0.17337654531002045,
-0.06605324894189835,
0.40829870104789734,
0.48000749945640564,
-0.45095348358154297,
-0.7961284518241882,
-0.5873486995697021,
0.3426953852176666... |
func (policy *ServersConnectionPolicy) InitializeSpec(status genruntime.ConvertibleStatus) error {
if s, ok := status.(*Servers_ConnectionPolicy_STATUS); ok {
return policy.Spec.Initialize_From_Servers_ConnectionPolicy_STATUS(s)
}
return fmt.Errorf("expected Status of type Servers_ConnectionPolicy_STATUS but rece... | [
0.5835610032081604,
-0.04373304545879364,
0.6200144290924072,
-0.4185999631881714,
0.45698097348213196,
0.6022217273712158,
-0.09927456080913544,
0.33332306146621704,
0.07688744366168976,
0.2469504475593567,
0.13020052015781403,
0.4270398020744324,
0.6665892601013184,
0.7536219954490662,
... |
func (policy *ServersConnectionPolicy) AzureName() string {
return "default"
} | [
-0.1683782935142517,
-0.701185941696167,
0.4936182200908661,
-0.37458643317222595,
-0.3471105694770813,
1.1227093935012817,
-1.1803354024887085,
0.3602423071861267,
-0.08523796498775482,
1.1286295652389526,
0.29852283000946045,
-0.0854426771402359,
-0.8579005599021912,
0.46621233224868774,... |
func (policy ServersConnectionPolicy) GetAPIVersion() string {
return string(APIVersion_Value)
} | [
-0.13395065069198608,
-0.8112748265266418,
0.1833696812391281,
-1.2600960731506348,
-0.012469014152884483,
1.1207059621810913,
-0.5654459595680237,
0.31590041518211365,
0.4365016520023346,
0.7886402010917664,
-0.4409695267677307,
0.3760957717895508,
-0.764176070690155,
0.03605891764163971,... |
func (policy *ServersConnectionPolicy) GetResourceScope() genruntime.ResourceScope {
return genruntime.ResourceScopeResourceGroup
} | [
-0.11161725223064423,
-0.3472338616847992,
0.09866182506084442,
-0.9995895028114319,
-0.13558486104011536,
0.33680394291877747,
0.06228780746459961,
-0.13268421590328217,
-0.2748405337333679,
0.3502502143383026,
0.8973076939582825,
0.1577654778957367,
-0.9447866678237915,
0.459657818078994... |
func (policy *ServersConnectionPolicy) GetSpec() genruntime.ConvertibleSpec {
return &policy.Spec
} | [
0.7945106625556946,
0.21370583772659302,
0.19770848751068115,
-0.35785701870918274,
0.6712083220481873,
1.3318215608596802,
-0.10247418284416199,
-0.08553340286016464,
0.024523168802261353,
-0.11551697552204132,
0.3768576979637146,
0.6969367861747742,
-0.030280521139502525,
0.0263400226831... |
func (policy *ServersConnectionPolicy) GetStatus() genruntime.ConvertibleStatus {
return &policy.Status
} | [
-0.08857670426368713,
-0.10617762804031372,
0.1167355626821518,
-0.5434037446975708,
0.6420886516571045,
1.7036784887313843,
-0.10124826431274414,
0.36664146184921265,
0.4911949038505554,
-0.08008499443531036,
-0.36360037326812744,
0.7131997346878052,
-0.8571611642837524,
0.562324643135070... |
func (policy *ServersConnectionPolicy) GetType() string {
return "Microsoft.Sql/servers/connectionPolicies"
} | [
1.0121846199035645,
0.2645920515060425,
0.3090657889842987,
-0.5976002216339111,
1.259784460067749,
1.7413880825042725,
-0.8772870898246765,
-0.5888403058052063,
0.7817973494529724,
1.198396921157837,
0.5106063485145569,
0.21638229489326477,
-1.0136929750442505,
0.0726776123046875,
0.197... |
func (policy *ServersConnectionPolicy) NewEmptyStatus() genruntime.ConvertibleStatus {
return &Servers_ConnectionPolicy_STATUS{}
} | [
-0.5458234548568726,
-0.7118917107582092,
0.0611516535282135,
-1.1332597732543945,
-0.5624718070030212,
1.0200532674789429,
-0.8521588444709778,
0.10586097091436386,
-0.7299372553825378,
-0.4504360854625702,
-0.8645766973495483,
0.6543465256690979,
-0.2391965538263321,
0.4064573645591736,
... |
func (policy *ServersConnectionPolicy) Owner() *genruntime.ResourceReference {
group, kind := genruntime.LookupOwnerGroupKind(policy.Spec)
return &genruntime.ResourceReference{
Group: group,
Kind: kind,
Name: policy.Spec.Owner.Name,
}
} | [
-0.39301103353500366,
-0.8360342383384705,
0.24442708492279053,
-0.12979725003242493,
-0.8175135850906372,
0.465825617313385,
0.30856841802597046,
-0.41234326362609863,
0.12374794483184814,
-0.06821835786104202,
0.797996997833252,
0.6935315132141113,
-0.3227052092552185,
-0.053139097988605... |
func (policy *ServersConnectionPolicy) SetStatus(status genruntime.ConvertibleStatus) error {
// If we have exactly the right type of status, assign it
if st, ok := status.(*Servers_ConnectionPolicy_STATUS); ok {
policy.Status = *st
return nil
}
// Convert status to required version
var st Servers_ConnectionP... | [
-0.9367395043373108,
-0.4319775402545929,
0.35434308648109436,
-0.2225719690322876,
0.12294460088014603,
1.7433363199234009,
-0.6111472249031067,
0.8475067615509033,
0.434864342212677,
0.32034340500831604,
-0.48453474044799805,
0.5420547127723694,
-0.21248582005500793,
0.9982172846794128,
... |
func (policy *ServersConnectionPolicy) ValidateCreate() (admission.Warnings, error) {
validations := policy.createValidations()
var temp any = policy
if runtimeValidator, ok := temp.(genruntime.Validator); ok {
validations = append(validations, runtimeValidator.CreateValidations()...)
}
return genruntime.Validat... | [
-0.712148904800415,
0.1423719972372055,
0.5397671461105347,
0.2857057452201843,
0.7464759349822998,
0.9662183523178101,
-0.08931301534175873,
-1.2582229375839233,
-0.5305485725402832,
-0.022390102967619896,
0.4921293258666992,
-0.2788926661014557,
-0.5971053242683411,
1.435930609703064,
... |
func (policy *ServersConnectionPolicy) ValidateDelete() (admission.Warnings, error) {
validations := policy.deleteValidations()
var temp any = policy
if runtimeValidator, ok := temp.(genruntime.Validator); ok {
validations = append(validations, runtimeValidator.DeleteValidations()...)
}
return genruntime.Validat... | [
-0.1458260864019394,
-0.050236478447914124,
0.6170984506607056,
0.5572247505187988,
0.8030630946159363,
0.4292806088924408,
0.1995648592710495,
-0.8289477825164795,
0.5264769792556763,
-0.07585448026657104,
0.7078472971916199,
0.1567755788564682,
-1.289137601852417,
1.0989928245544434,
0... |
func (policy *ServersConnectionPolicy) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
validations := policy.updateValidations()
var temp any = policy
if runtimeValidator, ok := temp.(genruntime.Validator); ok {
validations = append(validations, runtimeValidator.UpdateValidations()...)
}
return ... | [
-1.0377802848815918,
-0.656093418598175,
0.5395551323890686,
0.07781911641359329,
-0.3043798804283142,
0.651509702205658,
-0.09636372327804565,
-0.8367917537689209,
0.48805704712867737,
0.31640464067459106,
0.5520119667053223,
0.14848600327968597,
-0.5824875831604004,
1.077135443687439,
... |
func (policy *ServersConnectionPolicy) createValidations() []func() (admission.Warnings, error) {
return []func() (admission.Warnings, error){policy.validateResourceReferences}
} | [
0.2965633273124695,
0.10644140094518661,
0.40751996636390686,
-0.45596373081207275,
0.6466773152351379,
1.0788443088531494,
0.4090157747268677,
-1.1783119440078735,
0.19918455183506012,
0.12142538279294968,
0.01767854578793049,
-0.6021756529808044,
-0.5917832851409912,
1.0261406898498535,
... |
func (policy *ServersConnectionPolicy) deleteValidations() []func() (admission.Warnings, error) {
return nil
} | [
-0.13942712545394897,
0.5299447774887085,
0.6247473359107971,
0.49632665514945984,
0.21769241988658905,
0.9781613945960999,
0.7541418671607971,
-0.595943033695221,
0.6192125082015991,
-0.022393612191081047,
-0.21826744079589844,
0.33686572313308716,
-1.0077749490737915,
0.6748674511909485,... |
func (policy *ServersConnectionPolicy) updateValidations() []func(old runtime.Object) (admission.Warnings, error) {
return []func(old runtime.Object) (admission.Warnings, error){
func(old runtime.Object) (admission.Warnings, error) {
return policy.validateResourceReferences()
},
policy.validateWriteOnceProper... | [
-0.8994033336639404,
-0.5733670592308044,
0.4404643774032593,
-0.16675207018852234,
-0.2928811013698578,
0.6687759757041931,
0.5822685956954956,
-0.9850519299507141,
0.3394276201725006,
0.42963936924934387,
0.3515304923057556,
0.22223462164402008,
-0.5367493629455566,
0.9594026803970337,
... |
func (policy *ServersConnectionPolicy) validateResourceReferences() (admission.Warnings, error) {
refs, err := reflecthelpers.FindResourceReferences(&policy.Spec)
if err != nil {
return nil, err
}
return genruntime.ValidateResourceReferences(refs)
} | [
-0.16458368301391602,
-0.6172154545783997,
0.3995260000228882,
-1.424067497253418,
0.055294137448072433,
0.7830235958099365,
0.9968149065971375,
-0.8410863280296326,
-0.4212142825126648,
0.29475241899490356,
0.8932042717933655,
-0.003260577330365777,
-0.897602915763855,
1.3793309926986694,... |
func (policy *ServersConnectionPolicy) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) {
oldObj, ok := old.(*ServersConnectionPolicy)
if !ok {
return nil, nil
}
return genruntime.ValidateWriteOnceProperties(oldObj, policy)
} | [
-0.5585565567016602,
-0.2604655623435974,
0.22927962243556976,
-0.2216835469007492,
0.4266873896121979,
0.5343788862228394,
0.7569287419319153,
-0.47899723052978516,
0.1367872804403305,
0.2250562161207199,
0.4873445928096771,
-0.06261836737394333,
-0.5804802179336548,
0.9155265688896179,
... |
func (policy *ServersConnectionPolicy) AssignProperties_From_ServersConnectionPolicy(source *v20211101s.ServersConnectionPolicy) error {
// ObjectMeta
policy.ObjectMeta = *source.ObjectMeta.DeepCopy()
// Spec
var spec Servers_ConnectionPolicy_Spec
err := spec.AssignProperties_From_Servers_ConnectionPolicy_Spec(&... | [
0.2528359591960907,
-0.6088556051254272,
0.17983150482177734,
-0.718687117099762,
-0.19777248799800873,
1.2404741048812866,
0.2940119802951813,
0.12717297673225403,
0.2370651662349701,
0.6445791721343994,
-0.3753092288970947,
-0.05259323492646217,
0.028306003659963608,
0.7578080892562866,
... |
func (policy *ServersConnectionPolicy) AssignProperties_To_ServersConnectionPolicy(destination *v20211101s.ServersConnectionPolicy) error {
// ObjectMeta
destination.ObjectMeta = *policy.ObjectMeta.DeepCopy()
// Spec
var spec v20211101s.Servers_ConnectionPolicy_Spec
err := policy.Spec.AssignProperties_To_Servers... | [
-0.39215564727783203,
-0.6342936754226685,
0.2151487022638321,
-1.1014034748077393,
0.7035725116729736,
1.1355750560760498,
0.32799920439720154,
-0.0717964768409729,
-0.4012756943702698,
0.6981293559074402,
-0.13298121094703674,
0.2805255353450775,
0.07001492381095886,
0.8010729551315308,
... |
func (policy *ServersConnectionPolicy) OriginalGVK() *schema.GroupVersionKind {
return &schema.GroupVersionKind{
Group: GroupVersion.Group,
Version: policy.Spec.OriginalVersion(),
Kind: "ServersConnectionPolicy",
}
} | [
0.5648356080055237,
-0.4849960207939148,
0.20349133014678955,
-0.1947747766971588,
-1.2747631072998047,
1.0936970710754395,
0.2007923126220703,
-0.024416828528046608,
-0.22915853559970856,
0.7362308502197266,
0.043011896312236786,
1.1457045078277588,
0.004770927596837282,
-0.09486953169107... |
func (policy *Servers_ConnectionPolicy_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
if policy == nil {
return nil, nil
}
result := &Servers_ConnectionPolicy_Spec_ARM{}
// Set property "Name":
result.Name = resolved.Name
// Set property "Properties":
if policy.Con... | [
-0.05408390238881111,
-0.5561878681182861,
0.5255241990089417,
-1.2618111371994019,
0.4610121250152588,
0.7920658588409424,
-0.6119641661643982,
0.12197232991456985,
0.47522079944610596,
0.33221036195755005,
0.1923169642686844,
0.2681978940963745,
-0.534725546836853,
0.35386231541633606,
... |
func (policy *Servers_ConnectionPolicy_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus {
return &Servers_ConnectionPolicy_Spec_ARM{}
} | [
0.382098525762558,
-0.21183282136917114,
0.025569196790456772,
-0.82340407371521,
-0.40012314915657043,
0.9766717553138733,
-0.047748107463121414,
0.29432711005210876,
-0.6529514193534851,
-0.17053458094596863,
-0.02894059382379055,
0.4273936152458191,
0.6545812487602234,
0.844438970088958... |
func (policy *Servers_ConnectionPolicy_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
typedInput, ok := armInput.(Servers_ConnectionPolicy_Spec_ARM)
if !ok {
return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Servers_ConnectionPolicy_S... | [
-0.0009239197243005037,
0.2322305291891098,
0.490845263004303,
-0.20984549820423126,
0.7449865937232971,
0.9762900471687317,
0.03709089010953903,
-0.5897493362426758,
0.28643766045570374,
0.6396852135658264,
0.8075018525123596,
0.500806987285614,
0.15606704354286194,
0.7991846203804016,
... |
func (policy *Servers_ConnectionPolicy_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error {
src, ok := source.(*v20211101s.Servers_ConnectionPolicy_Spec)
if ok {
// Populate our instance from source
return policy.AssignProperties_From_Servers_ConnectionPolicy_Spec(src)
}
// Convert to an intermedia... | [
0.03571568801999092,
-0.3297995626926422,
0.3788650631904602,
-0.8203741908073425,
-0.2585833966732025,
0.752902090549469,
-0.17475517094135284,
0.12276314198970795,
0.2235589474439621,
0.5745071172714233,
0.0838797390460968,
0.2411823719739914,
0.7165721654891968,
0.5882115960121155,
1.... |
func (policy *Servers_ConnectionPolicy_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error {
dst, ok := destination.(*v20211101s.Servers_ConnectionPolicy_Spec)
if ok {
// Populate destination from our instance
return policy.AssignProperties_To_Servers_ConnectionPolicy_Spec(dst)
}
// Convert to an... | [
0.07394424825906754,
-0.3860499858856201,
0.6683548092842102,
-0.6816462874412537,
0.021433090791106224,
0.8546798825263977,
-0.31818288564682007,
0.4152189791202545,
-0.17588162422180176,
0.7796254754066467,
0.20642700791358948,
0.6106237769126892,
0.9129887223243713,
0.15525247156620026,... |
func (policy *Servers_ConnectionPolicy_Spec) AssignProperties_From_Servers_ConnectionPolicy_Spec(source *v20211101s.Servers_ConnectionPolicy_Spec) error {
// ConnectionType
if source.ConnectionType != nil {
connectionType := ServerConnectionPolicyProperties_ConnectionType(*source.ConnectionType)
policy.Connectio... | [
0.2427728772163391,
-0.7960474491119385,
0.17975696921348572,
-0.6101083755493164,
0.3327610194683075,
1.1271287202835083,
0.14184044301509857,
0.15788723528385162,
0.01985584758222103,
0.9315065741539001,
0.15597492456436157,
-0.005189858376979828,
0.3658198118209839,
0.8168544769287109,
... |
func (policy *Servers_ConnectionPolicy_Spec) AssignProperties_To_Servers_ConnectionPolicy_Spec(destination *v20211101s.Servers_ConnectionPolicy_Spec) error {
// Create a new property bag
propertyBag := genruntime.NewPropertyBag()
// ConnectionType
if policy.ConnectionType != nil {
connectionType := string(*polic... | [
-0.5535327792167664,
-1.0974081754684448,
0.32775014638900757,
-0.9392287135124207,
0.9576230645179749,
1.005025863647461,
0.06189001351594925,
0.08366566151380539,
-0.32349681854248047,
1.0594828128814697,
0.17951951920986176,
0.10730718821287155,
0.4563872218132019,
0.5393872857093811,
... |
func (policy *Servers_ConnectionPolicy_Spec) Initialize_From_Servers_ConnectionPolicy_STATUS(source *Servers_ConnectionPolicy_STATUS) error {
// ConnectionType
if source.ConnectionType != nil {
connectionType := ServerConnectionPolicyProperties_ConnectionType(*source.ConnectionType)
policy.ConnectionType = &conn... | [
0.32398721575737,
-0.49599382281303406,
0.2998863160610199,
-0.5008228421211243,
0.20554505288600922,
0.9007946252822876,
-0.5734119415283203,
0.5075181126594543,
0.4183858633041382,
0.7929219603538513,
-0.28525954484939575,
0.12620286643505096,
0.2075553834438324,
0.8373826146125793,
0.... |
func (policy *Servers_ConnectionPolicy_Spec) OriginalVersion() string {
return GroupVersion.Version
} | [
0.9105527400970459,
-1.3325386047363281,
0.09847910702228546,
-0.3718985915184021,
-0.6275930404663086,
1.6570789813995361,
0.5298903584480286,
0.5645011067390442,
0.08986085653305054,
0.5033994317054749,
0.461665540933609,
0.27726608514785767,
-0.5907891988754272,
-0.301501989364624,
0.... |
func (policy *Servers_ConnectionPolicy_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error {
src, ok := source.(*v20211101s.Servers_ConnectionPolicy_STATUS)
if ok {
// Populate our instance from source
return policy.AssignProperties_From_Servers_ConnectionPolicy_STATUS(src)
}
// Convert to an ... | [
0.03198571503162384,
-0.5873944163322449,
0.12688864767551422,
-0.5570046305656433,
-0.4901244342327118,
1.0458532571792603,
-0.639772891998291,
0.5059851408004761,
0.5634454488754272,
-0.01663794368505478,
-0.4456668794155121,
0.03009546920657158,
0.3291876018047333,
0.7635136246681213,
... |
func (policy *Servers_ConnectionPolicy_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error {
dst, ok := destination.(*v20211101s.Servers_ConnectionPolicy_STATUS)
if ok {
// Populate destination from our instance
return policy.AssignProperties_To_Servers_ConnectionPolicy_STATUS(dst)
}
// Con... | [
-0.5215801000595093,
-0.338448166847229,
0.5823984146118164,
-0.5812461972236633,
-0.214660182595253,
0.7981902956962585,
-0.4687514305114746,
0.7499665021896362,
-0.5063042640686035,
0.4800664484500885,
-0.6773433089256287,
0.698959231376648,
0.7077668309211731,
0.05975131690502167,
0.9... |
func (policy *Servers_ConnectionPolicy_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
return &Servers_ConnectionPolicy_STATUS_ARM{}
} | [
0.4809440076351166,
-0.5994871258735657,
-0.08597919344902039,
-0.6466830372810364,
-0.4827260673046112,
1.1024274826049805,
-0.38030990958213806,
0.32749292254447937,
-0.5343478918075562,
-0.5260693430900574,
-0.46541523933410645,
0.24754609167575836,
0.2851909399032593,
0.970748186111450... |
func (policy *Servers_ConnectionPolicy_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
typedInput, ok := armInput.(Servers_ConnectionPolicy_STATUS_ARM)
if !ok {
return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Servers_ConnectionPoli... | [
-0.1879020631313324,
-0.5878278613090515,
0.48064491152763367,
-0.6394758224487305,
0.43419501185417175,
0.9896664619445801,
-0.35033270716667175,
-0.39678749442100525,
0.37694990634918213,
0.7736719250679016,
0.32552507519721985,
0.2819933593273163,
-0.40863731503486633,
0.648268043994903... |
func (policy *Servers_ConnectionPolicy_STATUS) AssignProperties_From_Servers_ConnectionPolicy_STATUS(source *v20211101s.Servers_ConnectionPolicy_STATUS) error {
// Conditions
policy.Conditions = genruntime.CloneSliceOfCondition(source.Conditions)
// ConnectionType
if source.ConnectionType != nil {
connectionTyp... | [
-0.1899586319923401,
-1.282525658607483,
-0.07633481919765472,
-0.9922085404396057,
-0.3122372627258301,
1.3784691095352173,
-0.6005341410636902,
0.37483346462249756,
0.04162862151861191,
0.765773355960846,
-0.5742069482803345,
0.07716160267591476,
0.007859536446630955,
0.7241228222846985,... |
func (policy *Servers_ConnectionPolicy_STATUS) AssignProperties_To_Servers_ConnectionPolicy_STATUS(destination *v20211101s.Servers_ConnectionPolicy_STATUS) error {
// Create a new property bag
propertyBag := genruntime.NewPropertyBag()
// Conditions
destination.Conditions = genruntime.CloneSliceOfCondition(policy.... | [
-0.8872305750846863,
-1.5244303941726685,
0.08727170526981354,
-1.2550654411315918,
0.32194948196411133,
1.2409850358963013,
-0.6615450382232666,
0.26525041460990906,
-0.3323689103126526,
0.8083406090736389,
-0.4375443756580353,
0.3106860816478729,
-0.07661936432123184,
0.48593395948410034... |
func ActionProperties(opts PropertiesOpts) carapace.Action {
return carapace.ActionCallback(func(c carapace.Context) carapace.Action {
args := []string{"show"}
if opts.User {
args = append(args, "user")
}
args = append(args, opts.Units...)
return carapace.ActionExecCommand("systemctl", args...)(func(outpu... | [
0.25719234347343445,
-1.1458256244659424,
0.4814949333667755,
0.28403037786483765,
-0.20431771874427795,
-0.1549186408519745,
0.3145241141319275,
0.5256696939468384,
0.09674636274576187,
0.008751203306019306,
0.39064115285873413,
1.0213950872421265,
-0.031076477840542793,
-0.34908598661422... |
func NewDataNode(cfg *meta.ClusterConfig, nodeUUID, nodeURL, dbPath string, logger log.Logger) (*DNode, error) {
// Start a rpc server
rpcSrv, err := rpckit.NewRPCServer(globals.Citadel, nodeURL, rpckit.WithLoggerEnabled(false))
if err != nil {
logger.Errorf("failed to listen to %s: Err %v", nodeURL, err)
return... | [
-0.23754121363162994,
0.6085717082023621,
0.8627287745475769,
-1.001161813735962,
0.8547950387001038,
0.2908523380756378,
-0.828300952911377,
0.7416501641273499,
-0.04723826423287392,
0.5049745440483093,
-0.34934568405151367,
1.2917218208312988,
-0.08248420059680939,
-0.2688754200935364,
... |
func (dn *DNode) getDbFiles(clusterType string) map[string]string {
dbfiles := map[string]string{}
if fds, err := ioutil.ReadDir(fmt.Sprintf("%s/%s", dn.dbPath, clusterType)); err == nil {
for _, f := range fds {
dbfiles[fmt.Sprintf("%s/%s/%v", dn.dbPath, clusterType, f.Name())] = f.Name()
}
}
return dbfil... | [
-0.8272769451141357,
0.9759500622749329,
0.8266692161560059,
-0.0065856571309268475,
-0.031083188951015472,
0.06313882768154144,
-0.14472638070583344,
-0.8377516865730286,
-0.49973511695861816,
0.38329872488975525,
-0.2858124375343323,
0.026074057444930077,
-0.7736075520515442,
0.868444204... |
func (dn *DNode) getDbPath(clusterType string, replicaID uint64) string {
return fmt.Sprintf("%s/%s/%d", dn.dbPath, clusterType, replicaID)
} | [
-0.36501672863960266,
1.2522516250610352,
0.42018476128578186,
0.3430461585521698,
0.39943942427635193,
0.21895669400691986,
0.103890560567379,
-0.7066559195518494,
0.008103684522211552,
0.192954421043396,
0.6146358847618103,
0.9058436155319214,
-0.7216432094573975,
0.38262397050857544,
... |
func (dn *DNode) readAllShards(cfg *meta.ClusterConfig) error {
// read current state of the cluster and restore the shards
// FIXME: if etcd was unreachable when we come up we need to handle it
if cfg.EnableTstore {
dbfiles := dn.getDbFiles(meta.ClusterTypeTstore)
cluster, err := meta.GetClusterState(cfg, meta... | [
-0.03257949277758598,
0.1210479810833931,
0.6073760986328125,
-1.110029935836792,
0.12469489127397537,
-0.20313437283039093,
-0.49649545550346375,
0.5211790204048157,
-0.018795419484376907,
0.37759533524513245,
0.3671623468399048,
0.46165043115615845,
0.12383721023797989,
-0.06667724996805... |
func (dn *DNode) CreateShard(ctx context.Context, req *tproto.ShardReq) (*tproto.StatusResp, error) {
var resp tproto.StatusResp
dn.logger.Infof("%s Received CreateShard req %+v", dn.nodeUUID, req)
switch req.ClusterType {
case meta.ClusterTypeTstore:
if dn.clusterCfg.EnableTstore {
// find the shard from re... | [
-0.1568707823753357,
0.7864544987678528,
0.7140952944755554,
-0.37845608592033386,
0.1910126805305481,
-0.1967829018831253,
-0.37786006927490234,
0.016153262928128242,
0.7368306517601013,
0.678196132183075,
0.2431301474571228,
0.5278177261352539,
-0.2913505434989929,
-0.04069381579756737,
... |
func (dn *DNode) UpdateShard(ctx context.Context, req *tproto.ShardReq) (*tproto.StatusResp, error) {
var resp tproto.StatusResp
dn.logger.Infof("%s Received UpdateShard req %+v", dn.nodeUUID, req)
switch req.ClusterType {
case meta.ClusterTypeTstore:
// find the shard from replica id
val, ok := dn.tshards.Lo... | [
-0.6580626964569092,
0.07699954509735107,
0.6342915892601013,
-0.07292675971984863,
0.09364545345306396,
-0.35478365421295166,
-0.16812412440776825,
-0.11915144324302673,
0.6148595809936523,
0.4632464051246643,
-0.18139977753162384,
1.3368161916732788,
-0.1824929118156433,
0.08207900822162... |
func (dn *DNode) DeleteShard(ctx context.Context, req *tproto.ShardReq) (*tproto.StatusResp, error) {
var resp tproto.StatusResp
dn.logger.Infof("%s Received DeleteShard req %+v", dn.nodeUUID, req)
switch req.ClusterType {
case meta.ClusterTypeTstore:
// find the shard from replica id
val, ok := dn.tshards.Lo... | [
0.13540177047252655,
0.5657271146774292,
0.6825762987136841,
0.013274597004055977,
-0.017213864251971245,
-0.24739103019237518,
-0.008374908939003944,
0.3751521408557892,
0.6193221807479858,
0.3729729950428009,
0.5650157928466797,
0.935607373714447,
-0.5291686654090881,
0.7703301906585693,... |
func (dn *DNode) GetCluster(clusterType string) *meta.TscaleCluster {
return dn.watcher.GetCluster(clusterType)
} | [
0.2126466929912567,
1.091416835784912,
0.24530887603759766,
0.013611930422484875,
0.9096591472625732,
-0.4681810140609741,
0.06108479201793671,
-1.0140053033828735,
0.17109398543834686,
-0.43733373284339905,
0.9544572830200195,
0.8780391216278076,
0.8258159160614014,
0.4833134114742279,
... |
func (dn *DNode) IsLeader() bool {
return dn.metaNode.IsLeader()
} | [
-0.3499200940132141,
0.505711019039154,
0.3594898283481598,
-1.039398431777954,
-0.17306473851203918,
0.07358665019273758,
-0.9467806816101074,
0.3243800401687622,
0.6405595541000366,
-0.19240818917751312,
0.4179246425628662,
0.04537816345691681,
-0.04699341580271721,
0.3438429832458496,
... |
func (dn *DNode) IsStopped() bool {
return dn.isStopped
} | [
-2.07120418548584,
0.6754398345947266,
0.4325754642486572,
-0.667592465877533,
0.5408245325088501,
0.3213885724544525,
-0.07274488359689713,
0.44469600915908813,
0.34733855724334717,
0.022770915180444717,
-0.8565828800201416,
0.5721778869628906,
0.3631613254547119,
-0.8281951546669006,
-... |
func (dn *DNode) HasPendingSync() bool {
var retVal bool
dn.tshards.Range(func(key interface{}, value interface{}) bool {
shard := value.(*TshardState)
shard.syncLock.Lock()
defer shard.syncLock.Unlock()
if shard.syncPending {
dn.logger.Infof("Datanode %s tstore shard %d replica %d has sync pending", dn.no... | [
-0.154245525598526,
0.7906209230422974,
0.6075921058654785,
-1.0204601287841797,
-0.28547611832618713,
-1.0089776515960693,
-0.46468886733055115,
0.2273821234703064,
-0.6012502908706665,
0.07256525009870529,
-0.9030216336250305,
-0.05088648572564125,
0.8502591848373413,
0.43291884660720825... |
func (dn *DNode) SoftRestart() error {
var err error
// first stop everythig
dn.isStopped = true
dn.watcher.Stop()
dn.tshards.Range(func(key interface{}, value interface{}) bool {
shard := value.(*TshardState)
// clean up syncbuffer
dn.deleteShardSyncBuffer(&shard.syncBuffer)
if shard.store != nil {
s... | [
-0.1185048520565033,
-0.08047294616699219,
0.7756158113479614,
-1.2082264423370361,
0.44304367899894714,
0.14452779293060303,
0.025381209328770638,
-0.5396661162376404,
-0.07026515156030655,
-0.05957687646150589,
-0.17649559676647186,
0.8580065369606018,
-0.8879009485244751,
-0.27561718225... |
func (dn *DNode) Stop() error {
dn.isStopped = true
dn.metaNode.Stop()
dn.watcher.Stop()
dn.tshards.Range(func(key interface{}, value interface{}) bool {
shard := value.(*TshardState)
// clean up sync buffer
dn.deleteShardSyncBuffer(&shard.syncBuffer)
if shard.store != nil {
shard.store.Close()
shard... | [
-0.5132525563240051,
0.4716068208217621,
0.6177683472633362,
-1.0342557430267334,
0.5434418320655823,
0.10076592862606049,
0.3687146008014679,
-0.6365874409675598,
-0.47996553778648376,
0.14792248606681824,
-0.34809020161628723,
0.458865225315094,
-0.43667691946029663,
0.009100435301661491... |
func (dn *DNode) getDnclient(clusterType, nodeUUID string) (tproto.DataNodeClient, error) {
// if we already have a connection, just return it
eclient, ok := dn.rpcClients.Load(nodeUUID)
if ok {
return tproto.NewDataNodeClient(eclient.(*rpckit.RPCClient).ClientConn), nil
}
// find the node
cl := dn.watcher.Get... | [
-0.30917122960090637,
0.3565160632133484,
0.7428140640258789,
-1.2314478158950806,
0.19987404346466064,
-0.6493822932243347,
-0.4618090093135834,
-0.4995943605899811,
-0.3624938726425171,
-0.05808325484395027,
-0.11862397193908691,
1.277582049369812,
-0.515098512172699,
-0.7136124968528748... |
func (dn *DNode) reconnectDnclient(clusterType, nodeUUID string) (tproto.DataNodeClient, error) {
// close and delete existing rpc client
eclient, ok := dn.rpcClients.Load(nodeUUID)
if ok {
eclient.(*rpckit.RPCClient).Close()
dn.rpcClients.Delete(nodeUUID)
}
return dn.getDnclient(clusterType, nodeUUID)
} | [
-0.8180207014083862,
-0.18098075687885284,
0.4375644624233246,
-1.0090612173080444,
-0.470036119222641,
-0.305412620306015,
-0.15524835884571075,
-0.8392091989517212,
-0.11210450530052185,
0.3726819157600403,
-0.4679665267467499,
1.3991450071334839,
-0.4713171124458313,
-1.5130867958068848... |
func (dn *DNode) replicateFailedRequest(sb *syncBufferState) error {
switch sb.clusterType {
case meta.ClusterTypeTstore:
return dn.replicateFailedPoints(sb)
case meta.ClusterTypeKstore:
return dn.replicateFailedWrite(sb)
default:
dn.logger.Fatalf("unknown cluster type: %+v in sync buffer", sb)
}
return nil... | [
-0.8954827785491943,
0.5652884244918823,
0.29748988151550293,
0.24928483366966248,
0.09493032842874527,
0.011269224807620049,
0.38387638330459595,
-0.11695622652769089,
0.45674026012420654,
0.047830428928136826,
-0.06628460437059402,
1.2401494979858398,
-0.133352592587471,
-0.0310003254562... |
func (dn *DNode) Debug() map[string]interface{} {
ds := map[string]interface{}{
"node-uuid": dn.nodeUUID,
"node-url": dn.nodeURL,
"leader": strconv.FormatBool(dn.IsLeader()),
"stopped": strconv.FormatBool(dn.IsStopped()),
}
dn.tshards.Range(func(key, val interface{}) bool {
replID := key.(uint64)
... | [
-1.144984245300293,
1.2443064451217651,
0.6257662177085876,
-2.0425314903259277,
-0.22989092767238617,
-0.0927795022726059,
-0.7601664066314697,
0.2183990478515625,
-0.20922890305519104,
0.07057324051856995,
-0.7045433521270752,
0.21734245121479034,
0.96598219871521,
-0.22405242919921875,
... |
func TestGeneral(t *testing.T) {
e := testutils.TestEmail()
params, err := b.paramsForEmail(e)
if err != nil {
t.FailNow()
}
if params.Get("subject") != e.Subject {
t.FailNow()
}
if params.Get("text") != e.TextBody {
t.FailNow()
}
if params.Get("html") != e.HTMLBody {
t.FailNow()
}
if params.Get... | [
-0.14340455830097198,
0.3908440172672272,
0.9906660914421082,
-0.5724285840988159,
0.43342068791389465,
1.0338391065597534,
-0.09741055965423584,
-0.5563571453094482,
-0.6385469436645508,
-0.2249600887298584,
-0.03914938122034073,
0.8284531831741333,
-0.43759801983833313,
0.294489800930023... |
func TestHeaders(t *testing.T) {
e := testutils.TestEmail()
e.Headers.Set("hello", "world")
params, err := b.paramsForEmail(e)
if err != nil {
t.FailNow()
}
headersEncoded := params.Get("headers")
headers := make(map[string]string)
if err := json.Unmarshal([]byte(headersEncoded), &headers); err != nil {
... | [
-0.1963324099779129,
0.042369432747364044,
0.6156980991363525,
-0.24916338920593262,
0.6017743945121765,
0.07231719046831131,
-0.4357456862926483,
-0.5030718445777893,
-0.03990760073065758,
-0.12163053452968597,
-0.09287799894809723,
0.17302559316158295,
-0.672149658203125,
0.0658665597438... |
func TestCategories(t *testing.T) {
e := testutils.TestEmail()
params, err := b.paramsForEmail(e)
if err != nil {
t.FailNow()
}
xSMTPAPI := decodeXSMTPAPI(t, params)
if len(xSMTPAPI["category"].([]interface{})) != len(e.Tags) {
t.FailNow()
}
} | [
0.28806421160697937,
1.298277735710144,
0.4962562918663025,
-0.4586504101753235,
0.6539745330810547,
-0.05660884827375412,
-0.413655161857605,
-0.45808014273643494,
-0.03951314091682434,
-0.745002269744873,
-0.16139551997184753,
-0.14348818361759186,
-0.7086805105209351,
0.6598709225654602... |
func TestTemplating(t *testing.T) {
e := testutils.TestEmail()
e.TemplateContext = make(map[string]string)
// we haven't added any template info yet
func() {
params, err := b.paramsForEmail(e)
if err != nil {
t.FailNow()
}
// should be no 'filters' in the xsmtpapi params
xSMTPAPI := decodeXSMTPAPI(t,... | [
0.2168472558259964,
0.6260948777198792,
0.864200234413147,
-0.4358265995979309,
-0.0993267148733139,
-0.375350683927536,
-0.15608106553554535,
0.14480862021446228,
0.44743508100509644,
-0.26036086678504944,
-0.8502902388572693,
0.26492929458618164,
-0.5678901672363281,
0.2700241506099701,
... |
func TestAttachments(t *testing.T) {
e := testutils.TestEmail()
attachment := testutils.TestAttachment(t)
e.Attachments = append(e.Attachments, attachment)
params, err := b.paramsForEmail(e)
if err != nil {
t.FailNow()
}
// the sendgrid backend will have read the contents of the reader,
// so we need to se... | [
0.3174225389957428,
0.23106807470321655,
0.794682502746582,
-0.6532739996910095,
0.9994291663169861,
0.37118658423423767,
0.3674146234989166,
-0.7525257468223572,
-0.1909310221672058,
-0.13174991309642792,
0.9472121596336365,
0.20393876731395721,
-0.3946608006954193,
0.11306512355804443,
... |
func (t *TemplateRenderer) Render(w io.Writer, name string, data interface{}, c echo.Context) error {
// Add global methods if data is a map
if viewContext, isMap := data.(map[string]interface{}); isMap {
viewContext["reverse"] = c.Echo().Reverse
}
return t.templates.ExecuteTemplate(w, name, data)
} | [
-0.4756874442100525,
-0.14296984672546387,
0.6729723215103149,
0.08134247362613678,
-0.4547922611236572,
-0.013279023580253124,
-0.4880392253398895,
-0.13632875680923462,
-0.07252126187086105,
0.10856219381093979,
-0.10391519963741302,
-0.3371025621891022,
-0.5932428240776062,
0.3494554460... |
func TestUnaligned64(t *testing.T) {
// Unaligned 64-bit atomics on 32-bit systems are
// a continual source of pain. Test that on 32-bit systems they crash
// instead of failing silently.
switch runtime.GOARCH {
default:
if unsafe.Sizeof(int(0)) != 4 {
t.Skip("test only runs on 32-bit systems")
}
case "a... | [
0.1899261325597763,
0.4549019932746887,
0.34965822100639343,
0.5871871113777161,
-0.23642203211784363,
0.29913559556007385,
0.19655390083789825,
-0.30091580748558044,
0.18790435791015625,
-0.43528667092323303,
-0.2949542999267578,
-0.5809145569801331,
-0.007012390065938234,
0.2144553810358... |
func (o LookupGroupVariableResultOutput) EnvironmentScope() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupVariableResult) string { return v.EnvironmentScope }).(pulumi.StringOutput)
} | [
-0.21903446316719055,
-0.307419091463089,
0.39076387882232666,
-0.6719708442687988,
0.06278251856565475,
0.5708785653114319,
0.41349950432777405,
-0.5795186161994934,
-0.5946613550186157,
0.6249462962150574,
0.5418591499328613,
0.6508604288101196,
0.03654571250081062,
-1.1034183502197266,
... |
func (o LookupGroupVariableResultOutput) Group() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupVariableResult) string { return v.Group }).(pulumi.StringOutput)
} | [
-0.11013548821210861,
0.34568899869918823,
0.10135845094919205,
-0.19358393549919128,
0.08424829691648483,
0.207742378115654,
0.5525168180465698,
-0.5841879844665527,
-0.4755312502384186,
-0.3967243731021881,
0.483547568321228,
0.46904024481773376,
-0.10553402453660965,
-0.9119793772697449... |
func (o LookupGroupVariableResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupVariableResult) string { return v.Id }).(pulumi.StringOutput)
} | [
0.35918083786964417,
-0.3317738175392151,
0.0690910816192627,
-0.02707817032933235,
0.2547490894794464,
0.3718976676464081,
0.33105912804603577,
-0.3168686330318451,
0.038977913558483124,
0.1920626312494278,
-0.2566046416759491,
0.5787255764007568,
-0.9594879150390625,
-1.1863824129104614,... |
func (o LookupGroupVariableResultOutput) Key() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupVariableResult) string { return v.Key }).(pulumi.StringOutput)
} | [
-0.49502599239349365,
-0.1328965425491333,
0.25873035192489624,
-0.052290044724941254,
0.22253291308879852,
0.07864585518836975,
0.25999322533607483,
-0.4276268780231476,
-0.7940093278884888,
0.5573774576187134,
0.043776437640190125,
0.3712603747844696,
-0.8949963450431824,
-1.418108582496... |
func (o LookupGroupVariableResultOutput) Masked() pulumi.BoolOutput {
return o.ApplyT(func(v LookupGroupVariableResult) bool { return v.Masked }).(pulumi.BoolOutput)
} | [
0.005274776369333267,
-0.16772817075252533,
0.4792964458465576,
0.46115842461586,
0.38342419266700745,
0.45760035514831543,
0.5341612696647644,
-0.6041415929794312,
0.2776944935321808,
0.24276894330978394,
-0.537412703037262,
0.5698713064193726,
-0.7203059792518616,
-0.8146460056304932,
... |
func (o LookupGroupVariableResultOutput) Protected() pulumi.BoolOutput {
return o.ApplyT(func(v LookupGroupVariableResult) bool { return v.Protected }).(pulumi.BoolOutput)
} | [
0.0759005919098854,
0.23490729928016663,
0.5596513152122498,
0.05755027011036873,
-0.3888590335845947,
0.22702699899673462,
0.2109990119934082,
-0.20117010176181793,
0.461577832698822,
-0.04268826171755791,
-0.6538960337638855,
0.4140555262565613,
-0.9405772089958191,
-1.0753971338272095,
... |
func (o LookupGroupVariableResultOutput) Raw() pulumi.BoolOutput {
return o.ApplyT(func(v LookupGroupVariableResult) bool { return v.Raw }).(pulumi.BoolOutput)
} | [
-0.7147697806358337,
0.547048807144165,
0.4675414562225342,
-0.31429314613342285,
-0.4089648723602295,
0.4530305564403534,
-0.04319053143262863,
-0.27839624881744385,
-0.04487941041588783,
0.011658839881420135,
-0.10985905677080154,
0.4304518401622772,
-0.15845805406570435,
-0.868895649909... |
func (o LookupGroupVariableResultOutput) Value() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupVariableResult) string { return v.Value }).(pulumi.StringOutput)
} | [
0.00007590555469505489,
-0.05170818045735359,
0.15881511569023132,
-0.22801841795444489,
0.15551789104938507,
0.27876585721969604,
0.22359678149223328,
-0.548431396484375,
-0.44082123041152954,
0.3262726366519928,
0.17521455883979797,
0.5446760654449463,
-0.04777805507183075,
-1.1297025680... |
func (o LookupGroupVariableResultOutput) VariableType() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupVariableResult) string { return v.VariableType }).(pulumi.StringOutput)
} | [
0.5704284906387329,
0.0907844677567482,
0.2361813187599182,
-0.22128990292549133,
0.802126407623291,
0.08462558686733246,
0.5077561140060425,
-0.5199259519577026,
-0.01258060336112976,
0.13238725066184998,
-0.26013287901878357,
0.9710325002670288,
-0.8648057579994202,
-1.058630108833313,
... |
func NewClient(url, token string) *Client {
return &Client{
url: strings.TrimSuffix(url, "/"),
client: &http.Client{},
token: token,
}
} | [
0.6575522422790527,
-0.7446971535682678,
0.10533415526151657,
-0.11370501667261124,
-0.5199707746505737,
-0.2343149036169052,
-0.41946741938591003,
-0.11701922118663788,
-0.5902191400527954,
-0.5691038966178894,
-0.20285063982009888,
0.9710211157798767,
0.12753908336162567,
-1.393692016601... |
func (c *Client) SetHTTPClient(client *http.Client) {
c.client = client
} | [
1.1655045747756958,
-0.4475859999656677,
0.06164516508579254,
-0.549149751663208,
-0.41909995675086975,
0.621074914932251,
0.895129382610321,
-0.32456111907958984,
-0.789019763469696,
-0.5091599225997925,
-1.164987325668335,
0.3132297098636627,
-0.21207311749458313,
-0.4288264811038971,
... |
func (agent *Agent) getNetInterfaces() ([]string, error) {
var SysInt []string
var DockInt []string
var Ret []string
Cards, err := net.InterfaceAddrs()
if err != nil {
return Ret, err
}
for _, card := range Cards {
if ipnet, ok := card.(*net.IPNet); ok && !ipnet.IP.IsLoopback() {
if ipnet.IP.To4() != nil ... | [
-0.7650021314620972,
0.08963052928447723,
0.7439057230949402,
0.24264037609100342,
0.1792556792497635,
-0.4264410138130188,
0.3839194178581238,
-0.4720578193664551,
0.34080687165260315,
-0.1932803839445114,
-0.6656202673912048,
-0.6159000992774963,
-0.5229838490486145,
1.0895428657531738,
... |
func (agent *Agent) detachNetworks(containerID string, subnetworks []*subNetwork) error {
for _, subnetwork := range subnetworks {
ips, err := agent.weave.Detach(containerID, subnetwork.Cidr)
if err != nil {
return err
}
for _, ip := range ips {
agent.removeContainerDNSRecord(containerID, ip)
}
}
ret... | [
0.6132392287254333,
1.0218678712844849,
0.2215689867734909,
-0.14300844073295593,
0.2521461546421051,
0.5304725766181946,
0.713776707649231,
-0.11412107199430466,
0.8852518200874329,
0.21656635403633118,
-0.9643049240112305,
-1.0545135736465454,
-0.5042362809181213,
0.6666157841682434,
-... |
func (agent *Agent) handleSuperNetwork() error {
superNetworkOpts := gopikacloud.SuperNetwork{
Cidr: agentSuperNetworkCIDR,
DNSDomain: agentSuperNetworkDomain,
}
config, err := pikacloudClient.CreateSuperNetwork(superNetworkOpts, agent.ID)
if err != nil {
return fmt.Errorf("Unable to retrieve agent Super... | [
0.45430827140808105,
-0.031093068420886993,
0.48809492588043213,
-0.01372277271002531,
0.4187462031841278,
-0.387667715549469,
0.05100023001432419,
0.3899005651473999,
0.5829586386680603,
-0.37178701162338257,
-1.2576512098312378,
-0.5590434670448303,
-0.2508975863456726,
0.281768560409545... |
func (agent *Agent) attachNetworks(containerID string, subnetworks []*subNetwork, dnsName string) ([]string, error) {
ips := []string{}
for _, subnetwork := range subnetworks {
ip, err := agent.weave.Attach(containerID, subnetwork.Cidr)
if err != nil {
return nil, fmt.Errorf("Cannot attach container %s to netw... | [
-0.21591436862945557,
0.6907761693000793,
0.5164161324501038,
-0.33342334628105164,
0.22509172558784485,
0.34151792526245117,
0.29343894124031067,
-0.4756908714771271,
0.8331286311149597,
-0.08949985355138779,
-0.3384140133857727,
-0.8360893726348877,
0.10272655636072159,
0.726932942867279... |
func (step *TaskStep) Network() error {
switch step.Method {
case "connect":
var connectOpts = NetworkConnectOpts{}
err := json.Unmarshal([]byte(step.PluginConfig), &connectOpts)
if err != nil {
return fmt.Errorf("Bad config for network connect: %s (%v)", err, step.PluginConfig)
}
healthyIPs := []string{... | [
-1.1221609115600586,
-0.7320663928985596,
0.8020808696746826,
0.48002639412879944,
0.9136953949928284,
-0.93354332447052,
0.09642365574836731,
-0.32583537697792053,
-0.4701574742794037,
1.1723195314407349,
-0.0233280248939991,
-1.0609703063964844,
-0.015627965331077576,
0.8117314577102661,... |
func (r *RPCClient) GetNodeInfo() (json.RawMessage, error) {
args := RPCEmptyArguments{}
var reply json.RawMessage
err := r.Client.Call("Node.Info", &args, &reply)
return reply, err
} | [
-0.6209476590156555,
0.7567125558853149,
0.6466348171234131,
-0.14010150730609894,
0.9961150288581848,
-0.46941643953323364,
-0.1319946050643921,
-1.0541304349899292,
-0.5897906422615051,
0.0111884456127882,
-0.46067333221435547,
0.9359415173530579,
-1.1998183727264404,
0.5294396877288818,... |
func NewGetIPAMCustomerIDParams() *GetIPAMCustomerIDParams {
var ()
return &GetIPAMCustomerIDParams{
timeout: cr.DefaultTimeout,
}
} | [
0.4092147946357727,
-0.8224034309387207,
0.10752075165510178,
0.7451243996620178,
-0.7055801749229431,
-0.36885854601860046,
-0.3865461051464081,
0.32998403906822205,
-0.781961977481842,
0.2206115871667862,
-0.16498342156410217,
-0.015448545105755329,
-1.6250072717666626,
-0.53017574548721... |
func NewGetIPAMCustomerIDParamsWithTimeout(timeout time.Duration) *GetIPAMCustomerIDParams {
var ()
return &GetIPAMCustomerIDParams{
timeout: timeout,
}
} | [
0.9552022814750671,
-0.900465726852417,
0.3425537645816803,
0.626579761505127,
-0.6233080625534058,
0.1702476590871811,
-1.0785536766052246,
0.5296432375907898,
-0.6356428861618042,
1.0426695346832275,
0.15141181647777557,
0.327273428440094,
-1.4361158609390259,
-0.3097224235534668,
-0.5... |
func NewGetIPAMCustomerIDParamsWithContext(ctx context.Context) *GetIPAMCustomerIDParams {
var ()
return &GetIPAMCustomerIDParams{
Context: ctx,
}
} | [
0.2738805413246155,
-0.9302116632461548,
0.6936014294624329,
0.06770191341638565,
-0.49021098017692566,
0.11373486369848251,
-0.822273850440979,
-0.22533062100410461,
-0.20315636694431305,
0.7767820358276367,
-0.03070877492427826,
-0.06816868484020233,
-1.3456835746765137,
-0.6849460601806... |
func NewGetIPAMCustomerIDParamsWithHTTPClient(client *http.Client) *GetIPAMCustomerIDParams {
var ()
return &GetIPAMCustomerIDParams{
HTTPClient: client,
}
} | [
0.4631834030151367,
-1.0660544633865356,
0.5510107278823853,
0.5660012364387512,
-0.2687583565711975,
0.12204146385192871,
-0.02378855273127556,
0.17874827980995178,
-0.5800382494926453,
-0.019949790090322495,
-0.07921218872070312,
0.003495345823466778,
-1.07566499710083,
-0.75870424509048... |
func (o *GetIPAMCustomerIDParams) WithTimeout(timeout time.Duration) *GetIPAMCustomerIDParams {
o.SetTimeout(timeout)
return o
} | [
0.5120836496353149,
-0.569017767906189,
0.25320667028427124,
0.009770909324288368,
-0.7364537119865417,
-0.4405090808868408,
-0.5391886234283447,
0.4617701768875122,
-0.06956960260868073,
1.1582491397857666,
0.2378934919834137,
0.5220538377761841,
-0.6981873512268066,
-0.5444658994674683,
... |
func (o *GetIPAMCustomerIDParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
0.2691103518009186,
-0.19339357316493988,
0.2171153873205185,
0.10064863413572311,
-0.06910830736160278,
0.07260605692863464,
-0.3687431812286377,
0.6675089597702026,
-0.6469970941543579,
1.1638778448104858,
0.22200463712215424,
0.6653046011924744,
-1.2320860624313354,
-0.40170568227767944... |
func (o *GetIPAMCustomerIDParams) WithContext(ctx context.Context) *GetIPAMCustomerIDParams {
o.SetContext(ctx)
return o
} | [
-0.30979692935943604,
-0.6309503316879272,
0.550470232963562,
-0.04843960329890251,
-0.9496179819107056,
-0.46533331274986267,
-0.5874658226966858,
-0.14801189303398132,
0.2856132984161377,
0.6188047528266907,
0.16028058528900146,
0.39209088683128357,
-1.1851214170455933,
-1.00896787643432... |
func (o *GetIPAMCustomerIDParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-0.4889172315597534,
-0.2684999108314514,
0.47892096638679504,
0.21594132483005524,
-0.0672735720872879,
-0.08103716373443604,
-0.3504519760608673,
-0.03743869811296463,
0.1123238205909729,
0.7155264616012573,
0.013973291032016277,
0.647554337978363,
-1.5262393951416016,
-0.702014267444610... |
func (o *GetIPAMCustomerIDParams) WithHTTPClient(client *http.Client) *GetIPAMCustomerIDParams {
o.SetHTTPClient(client)
return o
} | [
0.1938251554965973,
-1.2472869157791138,
0.39061325788497925,
-0.21186746656894684,
-0.5576525330543518,
-0.5127162933349609,
0.03232757747173309,
-0.006216617301106453,
-0.436784952878952,
0.007691552396863699,
0.23668570816516876,
0.26447156071662903,
-0.5268511176109314,
-1.201256155967... |
func (o *GetIPAMCustomerIDParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
0.3000195026397705,
-0.8114280700683594,
0.2629927694797516,
-0.48507776856422424,
-0.6664763689041138,
-0.43368449807167053,
0.29240772128105164,
-0.015810459852218628,
-1.0736480951309204,
0.24394303560256958,
-0.03250566124916077,
0.8594558835029602,
-1.051170825958252,
-1.2237106561660... |
func (o *GetIPAMCustomerIDParams) WithCustomerID(customerID int64) *GetIPAMCustomerIDParams {
o.SetCustomerID(customerID)
return o
} | [
0.18717533349990845,
-1.3058675527572632,
0.3091478645801544,
0.17088423669338226,
-0.921254575252533,
-0.0666765421628952,
0.01766795851290226,
0.4160061776638031,
0.1901312917470932,
0.3929145038127899,
0.8434860110282898,
0.0006087060319259763,
-0.9324089884757996,
0.18833258748054504,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.