text
stringlengths
11
6.3k
embedding
listlengths
768
768
func LessThanOrEqualTo(expected interface{}) *gocrest.Matcher { matcher := new(gocrest.Matcher) matcher.Matches = func(actual interface{}) bool { anyOf := AnyOf(LessThan(expected), EqualTo(expected)) anyOfMatches := anyOf.Matches(actual) matcher.Describe = anyOf.Describe return anyOfMatches } return matcher...
[ 0.40735891461372375, -1.185859203338623, 0.45742398500442505, -1.7831346988677979, 0.5513989329338074, -0.20911815762519836, -0.23265117406845093, -0.23949378728866577, -0.36637523770332336, -0.5790989398956299, -0.2526926100254059, -0.3564092814922333, -0.21760737895965576, 0.608071386814...
func PossibleAzureScaleTypeValues() []AzureScaleType { return []AzureScaleType{Automatic, Manual, None} }
[ -0.8232588171958923, -0.19834746420383453, 0.4656584560871124, 0.858342707157135, 0.09297849237918854, 0.4542502164840698, -0.9328909516334534, -0.6353537440299988, -0.4522666037082672, 0.11959026753902435, -0.6734244227409363, -0.48080602288246155, 0.41617634892463684, 1.7502504587173462,...
func PossibleAzureSkuNameValues() []AzureSkuName { return []AzureSkuName{D13V2, D14V2, KC16, KC8, KS16, KS8, L16, L8} }
[ -0.8944225907325745, -0.043663449585437775, 0.4843486547470093, 1.1143428087234497, -0.8799397945404053, 0.2448914647102356, -0.3932933211326599, 0.3137838840484619, 0.2073705494403839, -0.4318462014198303, -0.06163178011775017, -0.08293070644140244, 0.4792695641517639, 0.6114218831062317,...
func PossibleDatabasePrincipalRoleValues() []DatabasePrincipalRole { return []DatabasePrincipalRole{Admin, Ingestor, Monitor, UnrestrictedViewers, User, Viewer} }
[ 0.3047122359275818, 0.35809561610221863, -0.04016309604048729, -0.18707865476608276, -0.1625836342573166, 0.596780002117157, -0.7706026434898376, 0.607501208782196, -0.27848920226097107, -0.8313019275665283, -0.38572293519973755, 0.8875216245651245, -1.290837287902832, 0.7792624235153198, ...
func PossibleDatabasePrincipalTypeValues() []DatabasePrincipalType { return []DatabasePrincipalType{DatabasePrincipalTypeApp, DatabasePrincipalTypeGroup, DatabasePrincipalTypeUser} }
[ 0.6465774774551392, 0.21143914759159088, 0.21597151458263397, 0.07374367117881775, 0.018895242363214493, 0.5388987064361572, -0.15627051889896393, 0.3884563148021698, 0.4796890318393707, -0.1465742141008377, -0.5875338912010193, 0.5432379841804504, -1.5832127332687378, 0.6255132555961609, ...
func PossibleDataFormatValues() []DataFormat { return []DataFormat{CSV, JSON, MULTIJSON} }
[ -0.5470181107521057, -0.41456153988838196, 0.27673229575157166, -0.33300477266311646, -1.164727807044983, 0.24522215127944946, -1.2933363914489746, 0.49195754528045654, 0.06722774356603622, -1.5701420307159424, -1.2540446519851685, 0.8149417042732239, 0.7237712144851685, 1.1828289031982422...
func PossibleProvisioningStateValues() []ProvisioningState { return []ProvisioningState{Creating, Deleting, Failed, Running, Succeeded} }
[ -0.8393657207489014, 0.16684389114379883, -0.1644168198108673, 0.9936406016349792, -0.48253190517425537, 0.47851717472076416, -0.8499023914337158, 0.46150317788124084, 0.0864923968911171, 0.08652976900339127, -0.3032260239124298, -0.5869697332382202, -0.06920181214809418, 0.755674242973327...
func PossibleStateValues() []State { return []State{StateCreating, StateDeleted, StateDeleting, StateRunning, StateStarting, StateStopped, StateStopping, StateUnavailable} }
[ -0.9542090892791748, -0.22784225642681122, 0.1287938505411148, 0.6614102721214294, -0.5012713670730591, 0.15562212467193604, -0.5334761142730713, 0.4679027199745178, 0.33775991201400757, -0.5040507316589355, -0.22499218583106995, -0.03805367648601532, 0.1975768506526947, 0.7234961986541748...
func selfCGroup() (string, error) { inFile, _ := os.Open("/proc/self/cgroup") defer inFile.Close() pids := regexp.MustCompile(`^[0-9]+:pids:/docker/([0-9a-z]+)`) scanner := bufio.NewScanner(inFile) scanner.Split(bufio.ScanLines) for scanner.Scan() { me := pids.FindStringSubmatch(scanner.Text()) if len(me) > ...
[ -0.11405773460865021, -0.8746439814567566, 0.6817296743392944, 0.038145359605550766, -1.0170600414276123, -0.31060343980789185, 1.4528203010559082, -0.038187723606824875, -1.0863537788391113, -0.08216779679059982, 0.042845990508794785, 0.159938246011734, -0.6928573250770569, 1.006336092948...
func (m ApplicationType) Pointer() *ApplicationType { return &m }
[ 0.6324135661125183, -0.5755605101585388, 0.1567227840423584, -0.30698978900909424, -0.1488480269908905, 1.0246546268463135, 0.03839297592639923, -1.2414499521255493, 0.9233275651931763, -0.6137412190437317, 1.232795000076294, 0.29498305916786194, -1.1073098182678223, 0.9311241507530212, ...
func (m ApplicationType) Validate(formats strfmt.Registry) error { var res []error // value enum if err := m.validateApplicationTypeEnum("", "body", m); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
[ -0.37365520000457764, 0.16014792025089264, 0.15748554468154907, 0.2993573248386383, 0.4031481146812439, 0.0992945060133934, 0.12407690286636353, -0.9389342069625854, -0.20662124454975128, 0.6499273180961609, 0.20372357964515686, -0.3620529770851135, -0.623653769493103, 1.7997877597808838, ...
func (m ApplicationType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil }
[ 0.14971129596233368, 0.02438018098473549, 0.1401105374097824, 0.10146351158618927, -0.158884197473526, 0.8046904802322388, -0.39452770352363586, -0.5387769937515259, 0.9341607689857483, 0.1398467868566513, 0.30384907126426697, 0.3035522401332855, -0.7046815752983093, 1.5100114345550537, ...
func ValidateUserInput(userInput map[string]string, keys []string) (err error) { for _, key := range keys { if strings.EqualFold(userInput[key], "") { err = fmt.Errorf("%s should not be an empty string", key) log.Println(err) return } if strings.HasSuffix(key, "id") { tempt, err := strconv.Atoi(user...
[ -0.5011807680130005, -0.885873556137085, 0.7120022773742676, 0.11376514285802841, -0.7723691463470459, 1.0287038087844849, 0.021516786888241768, -0.2347656935453415, -0.8620914816856384, -0.2688307762145996, 0.25673338770866394, 0.019675612449645996, -0.6839357614517212, 0.7604131698608398...
func Test_threeSumClosest(t *testing.T) { a1 := []int{-100, -98, -2, -1} t.Log(threeSumClosest(a1, -101)) }
[ 0.1960735321044922, -0.46329692006111145, 0.6080580949783325, 0.02209683693945408, -0.026261338964104652, 0.9346213340759277, 0.23871421813964844, -0.2908836305141449, 0.46499595046043396, 0.5724052786827087, -0.19231119751930237, -0.04808000475168228, 0.1024690493941307, -0.91144669055938...
func (h Hostingv4) ImageByName(name string, region hosting.Region) (hosting.DiskImage, error) { if region.ID == "" { return hosting.DiskImage{}, errors.New("hosting.Region provided does not have an ID") } regionid, err := strconv.Atoi(region.ID) if err != nil { return hosting.DiskImage{}, fmt.Errorf("Error ...
[ -0.5140327215194702, -0.2793499827384949, 0.5201696157455444, -0.6311519742012024, -0.013338848017156124, -0.8906108140945435, -0.5561066269874573, -0.21948610246181488, -0.7653777003288269, 1.1967989206314087, -0.16164374351501465, -0.26973956823349, -0.712020754814148, 0.1737604588270187...
func (h Hostingv4) ListImagesInRegion(region hosting.Region) ([]hosting.DiskImage, error) { if region.ID == "" { return []hosting.DiskImage{}, errors.New("hosting.Region provided does not have an ID") } regionid, err := strconv.Atoi(region.ID) if err != nil { return nil, fmt.Errorf("Error parsing RegionID '...
[ -0.5076788067817688, -0.3643287420272827, 0.502259373664856, -0.3505818843841553, 0.10675027221441269, -0.8424797058105469, -0.5988187193870544, -0.07792600989341736, -0.14469607174396515, 0.42831140756607056, -0.03666659817099571, 0.440662145614624, -1.0316606760025024, 1.1597143411636353...
func fromDiskImagev4(image diskImagev4) hosting.DiskImage { id := strconv.Itoa(image.ID) diskid := strconv.Itoa(image.DiskID) regionid := strconv.Itoa(image.RegionID) return hosting.DiskImage{ ID: id, DiskID: diskid, RegionID: regionid, Name: image.Name, Size: image.Size / 1024, } }
[ 0.055501826107501984, -0.6973731517791748, 0.3338817059993744, -0.11101029068231583, -0.45271414518356323, -1.0152894258499146, -0.4468757212162018, -0.005359540227800608, -0.42375144362449646, 0.14364555478096008, 0.04526493325829506, -0.1082126721739769, -0.3207798898220062, 0.3145428001...
func Create(apiToken string) (*Bot, error) { conn, id, err := slackConnect(apiToken) if err != nil { return nil, err } bot := Bot{ id: id, conn: conn, token: apiToken, handlers: make(map[string]Handler), counter: 0, } return &bot, nil }
[ 0.07495200634002686, 0.0781913548707962, 0.4196074306964874, -0.21334941685199738, 0.4903414249420166, 0.6781527400016785, -0.8862090706825256, -0.44982072710990906, -0.8559044003486633, -0.4923248887062073, -0.6965086460113525, -0.023389270529150963, -0.6232376098632812, -0.24257476627826...
func (bot *Bot) Listen() error { fmt.Println("Listening for messages...") for { m, err := bot.receive() if err != nil { fmt.Println(err.Error()) bot.reply(m, err.Error()) continue } if m == nil { continue } handler, ok := bot.handlers[m.Command] if !ok { bot.reply(m, fmt.Sprintf("No ha...
[ 0.5838055610656738, -0.5948483347892761, 0.5218812227249146, -0.9501658082008362, 0.9770548343658447, 0.3042011260986328, 0.11386704444885254, 0.4869529604911804, -0.7777593731880188, -0.9011781215667725, 0.3831104040145874, 0.23823416233062744, -0.2749860882759094, 0.7973242402076721, 0...
func (bot *Bot) Handle(cmd string, handler func(*Message) string) { bot.handlers[cmd] = Handler{Fn: handler} }
[ 0.24000759422779083, 0.3106655478477478, 0.23240172863006592, 0.22057576477527618, 0.598596453666687, 1.0868005752563477, -0.008157610893249512, 0.22717642784118652, -0.7300717234611511, -2.308659791946411, -0.4516158103942871, 1.0223406553268433, 0.002059459686279297, 0.9206721186637878, ...
func (bot *Bot) receive() (*Message, error) { var msg Message err := websocket.JSON.Receive(bot.conn, &msg) if err != nil { return nil, err } // it's not a message or not for us if msg.Type != "message" || !strings.HasPrefix(msg.Text, "<@"+bot.id+">") { return nil, nil } parts := strings.Fields(msg.Text)...
[ -0.1408475786447525, -0.18639428913593292, 0.727271318435669, -0.45542341470718384, 0.022850094363093376, -0.63565593957901, -0.9647958278656006, -0.40324315428733826, -0.21383443474769592, -0.2184261679649353, 0.3317829370498657, 0.7545294165611267, -0.35964977741241455, 0.604606509208679...
func (bot *Bot) reply(msg *Message, text string) { go func(msg *Message) { msg.Id = atomic.AddUint64(&bot.counter, 1) msg.Text = text _ = websocket.JSON.Send(bot.conn, msg) }(msg) }
[ -0.0916646420955658, 0.4644046425819397, 0.5275834202766418, -0.46505704522132874, -0.32193538546562195, 0.5659787654876709, -1.051134467124939, 0.0873275101184845, 0.15403373539447784, 0.15492898225784302, -0.7425577640533447, 1.159170389175415, -0.9530637264251709, 0.9795402884483337, ...
func (r *reconciler) ensureNodeResolverDaemonSet(dns *operatorv1.DNS, clusterIP, clusterDomain string) (bool, *appsv1.DaemonSet, error) { haveDS, current, err := r.currentNodeResolverDaemonSet() if err != nil { return false, nil, err } wantDS, desired, err := desiredNodeResolverDaemonSet(dns, clusterIP, clusterDo...
[ -1.0118167400360107, 0.21058815717697144, 0.6996226906776428, -0.7885708212852478, 0.25284865498542786, -0.43543487787246704, -0.018363242968916893, -0.6402788758277893, 0.3798559904098511, -0.537009060382843, 0.07762765139341354, -0.03621215373277664, -0.12151633948087692, 0.3715002238750...
func desiredNodeResolverDaemonSet(dns *operatorv1.DNS, clusterIP, clusterDomain, openshiftCLIImage string) (bool, *appsv1.DaemonSet, error) { hostPathFile := corev1.HostPathFile // TODO: Consider setting maxSurge to a positive value. maxSurge := intstr.FromInt(0) maxUnavailable := intstr.FromString("33%") envs := ...
[ -1.3127330541610718, 0.5606081485748291, 0.7153172492980957, -0.8472662568092346, -0.017336122691631317, -0.5617466568946838, -0.09662473201751709, -0.6120232343673706, -0.471799373626709, -0.839134156703949, -0.17372611165046692, 0.6296429634094238, 0.16349343955516815, 0.4108984172344208...
func (r *reconciler) currentNodeResolverDaemonSet() (bool, *appsv1.DaemonSet, error) { daemonset := &appsv1.DaemonSet{} if err := r.client.Get(context.TODO(), NodeResolverDaemonSetName(), daemonset); err != nil { if errors.IsNotFound(err) { return false, nil, nil } return false, nil, err } return true, dae...
[ -1.2041897773742676, -0.35876861214637756, 0.4419506788253784, -1.267587423324585, -0.14019876718521118, -0.6170286536216736, 0.18648754060268402, -0.46250465512275696, -1.033132553100586, -0.8920853137969971, 0.1299799680709839, 0.3337731957435608, -0.002720798831433058, -0.10908641666173...
func (r *reconciler) createNodeResolverDaemonSet(daemonset *appsv1.DaemonSet) error { if err := r.client.Create(context.TODO(), daemonset); err != nil { return fmt.Errorf("failed to create node resolver daemonset %s/%s: %v", daemonset.Namespace, daemonset.Name, err) } logrus.Infof("created node resolver daemonset:...
[ -0.844469428062439, 0.02777506783604622, 0.10443918406963348, -1.1884373426437378, -0.04820725694298744, -0.0654117614030838, -0.43923109769821167, -0.588174045085907, -0.3983880579471588, -1.19365656375885, 0.06076086312532425, -0.45595842599868774, -0.29287269711494446, 0.238195076584815...
func (r *reconciler) deleteNodeResolverDaemonSet(daemonset *appsv1.DaemonSet) error { if err := r.client.Delete(context.TODO(), daemonset); err != nil { if errors.IsNotFound(err) { return nil } return fmt.Errorf("failed to delete node resolver daemonset %s/%s: %v", daemonset.Namespace, daemonset.Name, err) }...
[ -0.5498501658439636, -0.13208173215389252, -0.23423098027706146, -1.071252465248108, -0.35143765807151794, -0.7969825863838196, -0.2739011347293854, -0.541445791721344, -0.06756425648927689, -1.5591762065887451, 0.4272748827934265, -0.26883766055107117, -0.22153446078300476, 0.275733143091...
func (r *reconciler) updateNodeResolverDaemonSet(current, desired *appsv1.DaemonSet) (bool, error) { changed, updated := nodeResolverDaemonSetConfigChanged(current, desired) if !changed { return false, nil } if err := r.client.Update(context.TODO(), updated); err != nil { return false, fmt.Errorf("failed to up...
[ -1.9659783840179443, -0.5192031264305115, 0.27081140875816345, -1.1871684789657593, -0.7230294346809387, -0.32012972235679626, -0.6811813712120056, -0.8449848890304565, -0.9948679208755493, -0.49356192350387573, 0.14268909394741058, 0.025779563933610916, -0.5524006485939026, -0.18996293842...
func nodeResolverDaemonSetConfigChanged(current, expected *appsv1.DaemonSet) (bool, *appsv1.DaemonSet) { changed := false updated := current.DeepCopy() if !cmp.Equal(current.Spec.UpdateStrategy, expected.Spec.UpdateStrategy, cmpopts.EquateEmpty()) { updated.Spec.UpdateStrategy = expected.Spec.UpdateStrategy cha...
[ -0.9955071210861206, -0.8662265539169312, 0.7568973302841187, -1.186812162399292, 0.0724412277340889, -0.1392764002084732, 0.9120703935623169, -0.2334437072277069, -0.393250435590744, 0.18126951158046722, -0.391878217458725, 0.20455658435821533, 0.3070791959762573, 1.0780596733093262, 0....
func PracticeMutex() { us := UserAges{ ages: make(map[string]int, 10), } wg := sync.WaitGroup{} for i := 1; i <= 10; i++ { wg.Add(1) go func(i int) { n := string(i) us.add(n, i) wg.Done() }(i) } for i := 1; i <= 10; i++ { wg.Add(1) go func(i int) { n := string(i) fmt.Println(i, us.get(...
[ -1.3057682514190674, 0.9439666867256165, 0.7578884959220886, -0.7945170402526855, 0.20667754113674164, -0.8328677415847778, -0.10067739337682724, -0.48804202675819397, 0.6474153995513916, -0.08271133899688721, -0.11944897472858429, 0.6943871378898621, 0.14502942562103271, 0.264380186796188...
func Cmd(name string, args ...string) (string, error) { printCmd(name, args...) cmd := exec.Command(name, args...) out, err := cmd.CombinedOutput() outString := string(out) fmt.Println(outString) return outString, err }
[ 0.3134717643260956, -1.369608759880066, 0.8227206468582153, 0.2731657028198242, -0.567255973815918, 0.34243136644363403, -0.19663725793361664, -0.42951104044914246, -0.44001296162605286, -0.6347469687461853, 0.713562548160553, 0.4384571611881256, 0.21168141067028046, 0.16765938699245453, ...
func CmdWithTimeout( options CmdWithTimeoutOptions, name string, args ...string) (string, error) { type result struct { out string err error } c := make(chan result, 1) cmd := exec.Command(name, args...) go func() { if options.LogOutput { printCmd(name, args...) } out, err := cmd.CombinedOutput(...
[ 0.5358057618141174, -1.0127828121185303, 0.7233479619026184, 0.12639950215816498, -0.888691246509552, -0.1942071169614792, -0.5932601690292358, -1.0573999881744385, 0.47909101843833923, 0.4606541693210602, 0.6347774267196655, 0.1578853279352188, 0.11382082849740982, -0.1696343570947647, ...
func (s *WebhooksServiceOp) Get(id int64, options ...interface{}) (Webhook, error) { var webhookResponse GetWebhookResponse body, reqErr := s.client.DoRequest(http.MethodGet, fmt.Sprintf("/v3/hooks/%d", id), nil) if reqErr != nil { return webhookResponse.Data, reqErr } jsonErr := json.Unmarshal(body, &webhookRes...
[ -0.8048539161682129, -0.0050968145951628685, 0.6144642233848572, -0.10993731766939163, 0.6828948855400085, -0.21032454073429108, -0.5391157269477844, -0.3688967525959015, 0.5009605288505554, 0.24505768716335297, -0.14909182488918304, 1.4575735330581665, -1.093200922012329, -0.3028580248355...
func (s *WebhooksServiceOp) List(options ...interface{}) ([]Webhook, error) { webhookListResponse := ListWebhookResponse{} body, reqErr := s.client.DoRequest(http.MethodGet, "/v3/hooks", nil) if reqErr != nil { return webhookListResponse.Data, reqErr } jsonErr := json.Unmarshal(body, &webhookListResponse) if js...
[ -0.7771063446998596, -0.5112252235412598, 0.5681365132331848, 0.25938108563423157, 0.9829001426696777, -0.21409457921981812, -0.37341544032096863, 0.21337954699993134, 0.3898847699165344, 0.5328069925308228, -0.4639003276824951, 1.0470616817474365, -1.1105129718780518, 0.34950053691864014,...
func (s *WebhooksServiceOp) Create(webhook Webhook, options ...interface{}) (Webhook, error) { var webhookResponse GetWebhookResponse jsonBody, err := json.Marshal(webhook) if err != nil { return webhookResponse.Data, err } reqBody := bytes.NewReader(jsonBody) body, reqErr := s.client.DoRequest(http.MethodPost,...
[ -0.5750994086265564, 0.0068510109558701515, 0.689980685710907, 0.43920737504959106, 0.6422522664070129, 0.04864376038312912, -0.27953872084617615, -0.5112166404724121, 0.13065791130065918, 0.47356194257736206, -0.19911745190620422, 0.3358360528945923, -1.5027661323547363, 0.226814940571784...
func (s *WebhooksServiceOp) Update(webhook Webhook, options ...interface{}) (Webhook, error) { var webhookResponse GetWebhookResponse jsonBody, err := json.Marshal(webhook) if err != nil { return webhookResponse.Data, err } reqBody := bytes.NewReader(jsonBody) body, reqErr := s.client.DoRequest(http.MethodPut, ...
[ -0.5675528049468994, -0.6551460027694702, 0.6135880947113037, 0.011436684988439083, 0.2479487657546997, -0.2590271234512329, -0.3873317837715149, -0.2781006395816803, 0.5234536528587341, 0.49828147888183594, -0.47732433676719666, 0.6123431324958801, -1.6094536781311035, -0.0704777315258979...
func (s *WebhooksServiceOp) Delete(id int64, options ...interface{}) error { _, reqErr := s.client.DoRequest(http.MethodDelete, fmt.Sprintf("/v3/hooks/%d", id), nil) if reqErr != nil { return reqErr } return nil }
[ -0.2439989298582077, 0.4480648338794708, 0.600579023361206, 0.3117334842681885, 0.9299045205116272, 0.5730445981025696, 0.32680562138557434, -0.23027221858501434, 0.41541385650634766, 0.8269549012184143, 0.5606696009635925, 1.0554866790771484, -1.7804913520812988, -0.6402957439422607, 0....
func (k Keeper) GetKeyResultSuccess() string { return types.ResultSuccess }
[ -0.3678046762943268, 0.2760801613330841, 0.6021128296852112, 0.3141797184944153, -0.01604526676237583, 0.3416622579097748, -0.0873243659734726, 0.03844032809138298, -0.7223238945007324, 0.05269256606698036, -1.3107774257659912, -0.7179147005081177, -0.4118736982345581, -0.5855228900909424,...
func NewZoneInterconnectHandler(nInfo util.NetInfo, nbClient, sbClient libovsdbclient.Client) *ZoneInterconnectHandler { zic := &ZoneInterconnectHandler{ NetInfo: nInfo, nbClient: nbClient, sbClient: sbClient, } zic.networkClusterRouterName = zic.GetNetworkScopedName(types.OVNClusterRouter) zic.networkTrans...
[ -0.03033451735973358, -0.637374758720398, 0.19661882519721985, -0.11367444694042206, -0.5138514041900635, -0.3625652492046356, 1.1738148927688599, -0.706474781036377, 0.17558173835277557, 0.5266764760017395, 0.0379766970872879, -0.8126955032348633, -1.2916353940963745, -0.5833767056465149,...
func (zic *ZoneInterconnectHandler) AddLocalZoneNode(node *corev1.Node) error { klog.Infof("Creating interconnect resources for local zone node %s for the network %s", node.Name, zic.GetNetworkName()) nodeID := util.GetNodeID(node) if nodeID == -1 { // Don't consider this node as cluster-manager has not allocated ...
[ 0.17482560873031616, -0.2910136580467224, 0.3071402609348297, -1.0040572881698608, 0.29346299171447754, -0.4292701780796051, 0.7329751253128052, 0.5257957577705383, 0.881564736366272, 0.3430372178554535, 0.11936534941196442, -0.41003870964050293, -0.938787043094635, 0.3459588289260864, 0...
func (zic *ZoneInterconnectHandler) AddRemoteZoneNode(node *corev1.Node) error { klog.Infof("Creating interconnect resources for remote zone node %s for the network %s", node.Name, zic.GetNetworkName()) nodeID := util.GetNodeID(node) if nodeID == -1 { // Don't consider this node as cluster-manager has not allocat...
[ -0.14626549184322357, -0.09905020147562027, 0.4326919913291931, -0.8728071451187134, 0.2671971619129181, 0.15103501081466675, 0.6112579703330994, 0.18116164207458496, 0.5382081866264343, 0.37992310523986816, -0.6332869529724121, -0.07583966851234436, -1.1711393594741821, -0.036834735423326...
func (zic *ZoneInterconnectHandler) DeleteNode(node *corev1.Node) error { klog.Infof("Deleting interconnect resources for the node %s for the network %s", node.Name, zic.GetNetworkName()) return zic.cleanupNode(node.Name) }
[ 0.3404272794723511, -0.15844933688640594, 0.33797112107276917, -1.0331940650939941, 0.3590348958969116, 0.2669036388397217, 0.9442088603973389, 0.11884446442127228, 0.9246654510498047, 0.29735374450683594, 0.6836535930633545, -0.5800143480300903, -1.0180730819702148, 0.05966435372829437, ...
func (zic *ZoneInterconnectHandler) SyncNodes(kNodes []interface{}) error { // Get the transit switch. If its not present no cleanup to do ts := &nbdb.LogicalSwitch{ Name: zic.networkTransitSwitchName, } ts, err := libovsdbops.GetLogicalSwitch(zic.nbClient, ts) if err != nil { if errors.Is(err, libovsdbclient...
[ -0.23392173647880554, -0.08723624050617218, 0.704075813293457, -0.18340542912483215, -0.0866897851228714, -0.39479345083236694, 0.2842653691768646, -0.10259046405553818, 0.2766876220703125, 1.7852294445037842, 0.21529054641723633, -0.6301817893981934, -0.9044490456581116, 0.625048518180847...
func (zic *ZoneInterconnectHandler) Cleanup() error { klog.Infof("Deleting the transit switch %s for the network %s", zic.networkTransitSwitchName, zic.GetNetworkName()) return libovsdbops.DeleteLogicalSwitch(zic.nbClient, zic.networkTransitSwitchName) }
[ 0.8855829834938049, -0.5861585140228271, 0.245179682970047, -1.084463357925415, -0.06482666730880737, 0.42087656259536743, 0.9667323231697083, -0.10104772448539734, 0.3589763939380646, 0.12762784957885742, 0.348882794380188, -1.456899881362915, -0.7570456862449646, -0.07191484421491623, ...
func (zic *ZoneInterconnectHandler) createLocalZoneNodeResources(node *corev1.Node, nodeID int) error { nodeTransitSwitchPortIPs, err := util.ParseNodeTransitSwitchPortAddrs(node) if err != nil || len(nodeTransitSwitchPortIPs) == 0 { return fmt.Errorf("failed to get the node transit switch port ips for node %s: %w"...
[ -0.2249375730752945, -0.018742652609944344, 0.4488525390625, -1.2394161224365234, 0.5930931568145752, -0.16945037245750427, 0.5212812423706055, 0.39757823944091797, 0.2848118245601654, 0.8105147480964661, -0.32769304513931274, -1.7143065929412842, -0.4289640784263611, 0.5124777555465698, ...
func (zic *ZoneInterconnectHandler) createRemoteZoneNodeResources(node *corev1.Node, nodeID int, chassisId string) error { nodeTransitSwitchPortIPs, err := util.ParseNodeTransitSwitchPortAddrs(node) if err != nil || len(nodeTransitSwitchPortIPs) == 0 { return fmt.Errorf("failed to get the node transit switch port I...
[ -0.2911151349544525, 0.03269880264997482, 0.5225607752799988, -1.0638349056243896, 0.8085411190986633, -0.008629145100712776, 0.5917533040046692, 0.1113470196723938, 0.11966077983379364, 1.1085786819458008, -0.633992612361908, -1.385779619216919, -0.4606330096721649, 0.2595420777797699, ...
func (zic *ZoneInterconnectHandler) cleanupNode(nodeName string) error { klog.Infof("Cleaning up interconnect resources for the node %s for the network %s", nodeName, zic.GetNetworkName()) // Cleanup the logical router port in the cluster router for the node // if it exists. if err := zic.cleanupNodeClusterRouterP...
[ -0.051701951771974564, -0.005604501347988844, 0.6945824027061462, -0.5595270991325378, 0.4842665493488312, -0.26272404193878174, 0.9089661836624146, 0.28101494908332825, 0.2413114756345749, 0.4439240097999573, 0.5293819904327393, -0.45532262325286865, -0.40870311856269836, 0.24532003700733...
func (zic *ZoneInterconnectHandler) deleteLocalNodeStaticRoutes(node *corev1.Node, nodeID int, nodeTransitSwitchPortIPs []*net.IPNet) error { deleteRoute := func(prefix, nexthop string) error { p := func(lrsr *nbdb.LogicalRouterStaticRoute) bool { return lrsr.IPPrefix == prefix && lrsr.Nexthop == nexthop && ...
[ 0.34567806124687195, 0.2992979884147644, 0.5368824005126953, 0.12079165130853653, 0.19828295707702637, 0.07166998088359833, 0.0028643030673265457, -0.4420938491821289, -0.41207215189933777, 0.6742728352546692, -0.02934907376766205, -0.18943889439105988, -0.4377981722354889, 0.6090111136436...
func (c *MockedHTTPContext) Lock() { if c.MockedLock != nil { c.MockedLock() } }
[ -0.6056698560714722, 0.6616308689117432, 0.330140084028244, 0.4789213538169861, 1.1987409591674805, 0.8354955911636353, 1.2624279260635376, -0.5008444786071777, 0.835761308670044, -1.0604392290115356, -0.1321292370557785, -0.1528702974319458, -0.8737863898277283, 0.7216799259185791, -0.4...
func (c *MockedHTTPContext) Unlock() { if c.MockedUnlock != nil { c.MockedUnlock() } }
[ -0.9532268047332764, 0.49015137553215027, 0.4696199595928192, 0.4436955153942108, 0.8562748432159424, -0.03589373454451561, 1.0419155359268188, 0.534487783908844, 0.9816737771034241, -0.2658114433288574, 0.1393977254629135, 0.06399964541196823, -0.9205193519592285, 0.3992651700973511, -0...
func (c *MockedHTTPContext) Span() tracing.Span { if c.MockedSpan != nil { return c.MockedSpan() } return tracing.NewSpan(tracing.NoopTracing, "mocked") }
[ -0.36141106486320496, 0.403077095746994, -0.04981512948870659, 0.8080942630767822, 0.11458393931388855, 0.5863526463508606, 1.741969108581543, -0.10600529611110687, 1.5312225818634033, -1.018476128578186, -0.38902246952056885, 0.19180278480052948, -0.3842623829841614, 0.3847217857837677, ...
func (c *MockedHTTPContext) Request() context.HTTPRequest { return &c.MockedRequest }
[ -1.3915226459503174, -0.341596394777298, 0.3446120619773865, 0.35487064719200134, 0.534782886505127, 0.6942957639694214, 0.5789058804512024, -0.2686210572719574, 0.7887789607048035, -0.9742849469184875, 0.7636016011238098, 0.9855254292488098, -0.47712254524230957, 0.15661834180355072, 0....
func (c *MockedHTTPContext) Response() context.HTTPResponse { return &c.MockedResponse }
[ -0.02595335617661476, -1.2145391702651978, -0.0002686838561203331, 0.3537961542606354, -0.011505629867315292, 0.2853734493255615, 1.2095013856887817, -0.2194071263074875, 1.517341136932373, -0.5459825396537781, -0.3155345022678375, -0.05816296860575676, -1.1281660795211792, -0.241026192903...
func (c *MockedHTTPContext) Deadline() (deadline time.Time, ok bool) { if c.MockedDeadline != nil { return c.MockedDeadline() } return time.Now(), false }
[ -0.713729739189148, -0.2796474099159241, 0.7837268710136414, 0.2735064923763275, 0.27974337339401245, 0.5024849772453308, -0.5711266994476318, 0.1961492896080017, 0.06511256098747253, 0.6957700848579407, -0.49558335542678833, -0.6078333854675293, -0.9135443568229675, 0.6788996458053589, ...
func (c *MockedHTTPContext) Done() <-chan struct{} { if c.MockedDone != nil { return c.MockedDone() } return nil }
[ -0.263919860124588, 0.3259297013282776, 0.6715068221092224, 0.16407696902751923, 0.8655292987823486, -0.09318621456623077, 0.23451875150203705, -1.0291180610656738, 0.4134303331375122, -0.23093052208423615, -0.3423548936843872, 0.40287965536117554, -0.35135790705680847, 1.0133814811706543,...
func (c *MockedHTTPContext) Err() error { if c.MockedErr != nil { return c.MockedErr() } return nil }
[ 0.0431445837020874, 0.20561583340168, 0.17517152428627014, 0.9979526996612549, 0.08424277603626251, 0.7659807801246643, 0.3669988811016083, 0.17591330409049988, 0.6684234142303467, -0.6543423533439636, 0.4463668763637543, -0.07696752995252609, -0.2981730103492737, 1.099145770072937, 0.25...
func (c *MockedHTTPContext) Value(key interface{}) interface{} { if c.MockedValue != nil { return c.MockedValue(key) } return nil }
[ -0.8943854570388794, 0.10440140962600708, 0.4855535626411438, 0.7125164270401001, 0.5505762696266174, 0.3774822950363159, 0.409892201423645, -0.7979817986488342, 0.9840486645698547, 0.6458610892295837, 0.03420424461364746, -0.1429981291294098, -0.5748641490936279, 1.0335423946380615, -0....
func (c *MockedHTTPContext) Cancel(err error) { if c.MockedCancel != nil { c.MockedCancel(err) } }
[ 0.43986615538597107, -0.287422776222229, 0.41433364152908325, 1.4528001546859741, -0.1674959659576416, 0.8700372576713562, 0.31868109107017517, 0.8038703799247742, 0.7856384515762329, 0.4673902690410614, 0.03348376229405403, -0.3843768239021301, -0.15877531468868256, 1.0042585134506226, ...
func (c *MockedHTTPContext) Cancelled() bool { if c.MockedCancelled != nil { return c.MockedCancelled() } return false }
[ 0.011080603115260601, -0.38933873176574707, 0.4156961143016815, 0.560051679611206, -0.16389457881450653, 0.47973865270614624, 0.010768543928861618, 0.6342639923095703, 0.3619605004787445, 0.08471491187810898, -0.31630825996398926, -0.6021080017089844, -0.5203709602355957, -0.11861104518175...
func (c *MockedHTTPContext) ClientDisconnected() bool { if c.MockedClientDisconnected != nil { return c.MockedClientDisconnected() } return false }
[ 0.03999776393175125, -0.6136987805366516, 0.2830345928668976, -0.3797184228897095, -0.30324074625968933, 0.7209630608558655, 0.140537291765213, -0.49549204111099243, 0.17452068626880646, -0.6861773133277893, -0.9831987023353577, -0.7226516008377075, -0.11996589601039886, 0.3434795439243316...
func (c *MockedHTTPContext) Duration() time.Duration { if c.MockedDuration != nil { return c.MockedDuration() } return 0 }
[ -0.23673978447914124, -0.17707937955856323, 0.23044873774051666, 0.5906769037246704, 0.9222968220710754, 0.31034860014915466, 1.1822766065597534, 0.16072580218315125, 1.046855092048645, 0.19506363570690155, -0.18737827241420746, -0.41434064507484436, -0.23202471435070038, 1.560423612594604...
func (c *MockedHTTPContext) OnFinish(fn func()) { if c.MockedFinish != nil { c.MockedOnFinish(fn) } c.lock.Lock() c.finishFuncs = append(c.finishFuncs, fn) c.lock.Unlock() }
[ -0.9522555470466614, -0.699253499507904, 0.3940489888191223, 0.36758145689964294, 0.03653882071375847, -0.17591434717178345, -0.20622964203357697, -0.3121621012687683, -0.24704225361347198, 0.2411278337240219, -0.9737405180931091, -0.30726203322410583, -0.11285581439733505, 0.7588046789169...
func (c *MockedHTTPContext) AddTag(tag string) { if c.MockedAddTag != nil { c.MockedAddTag(tag) } }
[ -0.47365057468414307, 0.26522913575172424, 0.4420951008796692, 0.9418894648551941, 1.0985459089279175, 0.7894562482833862, 0.03016694448888302, 0.08622584491968155, 0.5655828714370728, -0.650941789150238, -0.394895076751709, -0.5297183990478516, -0.7383432984352112, 1.4651241302490234, -...
func (c *MockedHTTPContext) StatMetric() *httpstat.Metric { if c.MockedStatMetric != nil { return c.MockedStatMetric() } return nil }
[ 0.2613026201725006, 0.2547591030597687, 0.41955137252807617, 0.5763642191886902, 0.08941546082496643, 0.24147671461105347, 0.8530187606811523, -0.5641279816627502, 0.23873768746852875, -0.5174623727798462, 0.1675804704427719, -0.32944783568382263, -0.6975792050361633, 0.27408143877983093, ...
func (c *MockedHTTPContext) Log() string { if c.MockedLog != nil { return c.MockedLog() } return "" }
[ -0.2245117723941803, 0.7563839554786682, 0.1900884509086609, 0.5341514945030212, 0.05933278053998947, 0.4528658986091614, 0.5933004021644592, -0.2183205485343933, 0.6619266867637634, -0.30670905113220215, -0.3522831201553345, -0.47609832882881165, -0.42122384905815125, 0.22912196815013885,...
func (c *MockedHTTPContext) Finish() { if c.MockedFinish != nil { c.MockedFinish() return } c.lock.Lock() for _, fn := range c.finishFuncs { func() { defer func() { if err := recover(); err != nil { } }() fn() }() } c.lock.Unlock() }
[ -0.4879164397716522, -0.12939195334911346, 0.47664186358451843, 0.386231929063797, 1.0497668981552124, -0.2004583179950714, 0.41804566979408264, -1.1056993007659912, -0.5092029571533203, 0.23289014399051666, -1.0891963243484497, -0.2672538757324219, -0.7933598160743713, 0.8416279554367065,...
func (c *MockedHTTPContext) Template() texttemplate.TemplateEngine { if c.MockedTemplate != nil { return c.MockedTemplate() } return nil }
[ -0.33354651927948, 0.2821083068847656, 0.30567920207977295, 0.077615886926651, 0.10334756970405579, -0.49566650390625, 0.12680648267269135, 0.6246392130851746, 0.40258118510246277, -0.7036476135253906, -0.01346458587795496, -0.9038019776344299, -0.9064654111862183, 0.5315321087837219, -0...
func (c *MockedHTTPContext) SetTemplate(ht *context.HTTPTemplate) { if c.MockedSetTemplate != nil { c.MockedSetTemplate(ht) } }
[ -1.1300944089889526, 0.8108465671539307, 0.47293439507484436, 0.4621718227863312, 0.42279890179634094, -0.092608742415905, 0.5012475252151489, 0.22729748487472534, 0.5568298101425171, -0.3317163288593292, -0.6711863875389099, -0.4640347957611084, -0.7774524092674255, 0.934174656867981, -...
func (c *MockedHTTPContext) SaveReqToTemplate(filterName string) error { if c.MockedSaveReqToTemplate != nil { return c.MockedSaveReqToTemplate(filterName) } return nil }
[ -2.13606595993042, -0.2183220386505127, 0.5114866495132446, -0.3317667841911316, 0.44943949580192566, -0.49279630184173584, 0.7027150988578796, -0.31066417694091797, 0.26730281114578247, 0.8356000781059265, -1.6139042377471924, -0.8551189303398132, -0.6752040386199951, 0.8184095025062561, ...
func (c *MockedHTTPContext) SaveRspToTemplate(filterName string) error { if c.MockedSaveRspToTemplate != nil { return c.MockedSaveRspToTemplate(filterName) } return nil }
[ -0.9882574081420898, -0.5483370423316956, 0.2986372113227844, -0.3054589629173279, -0.5795236825942993, 0.01959853619337082, -0.035043150186538696, -0.426923543214798, 0.5810770392417908, 0.6664835214614868, -2.091609001159668, -0.8968617916107178, -1.3338191509246826, 0.40047889947891235,...
func (c *MockedHTTPContext) CallNextHandler(lastResult string) string { if c.MockedCallNextHandler != nil { return c.MockedCallNextHandler(lastResult) } return lastResult }
[ -0.6765891909599304, 0.3371882736682892, 0.4625338912010193, 0.8067305088043213, -1.458074927330017, 0.6520962119102478, -0.517055332660675, -1.1623858213424683, 0.40431392192840576, -0.5512294173240662, 0.06667111068964005, -0.7133081555366516, -1.4473971128463745, 0.9052793979644775, 0...
func (c *MockedHTTPContext) SetHandlerCaller(caller context.HandlerCaller) { if c.MockedSetHandlerCaller != nil { c.SetHandlerCaller(caller) } }
[ -0.5749358534812927, -0.11901960521936417, 0.23382486402988434, -0.15338940918445587, 0.15268059074878693, 0.7432317137718201, 0.788411021232605, 0.6453390717506409, 0.5090736746788025, -0.6812343597412109, -0.6630218029022217, -0.4998592436313629, 0.16775457561016083, 1.7570470571517944, ...
func NewModuleClient(moduleName string, cdc *amino.Codec) ModuleClient { return ModuleClient{moduleName, cdc} }
[ -0.2754998803138733, -0.9951387643814087, -0.11893603205680847, -0.5396773219108582, -1.2633193731307983, 0.05846994370222092, -0.015124715864658356, -0.1462474763393402, 0.4931609034538269, 0.39977896213531494, -0.14980468153953552, 2.2645375728607178, -0.7606484293937683, -0.284527629613...
func (mc ModuleClient) GetQueryCmd() *cobra.Command { // Group gov queries under a subcommand govQueryCmd := &cobra.Command{ Use: "gitService", Short: "GitService query commands", } govQueryCmd.AddCommand(client.GetCommands( gitServiceCmd.GetCmdListRefs(mc.moduleName, mc.cdc), )...) return govQueryCmd }
[ 0.7860928177833557, 0.37445268034935, 0.4205375015735626, -0.6820148825645447, 0.5385791659355164, 1.0160785913467407, -0.14595749974250793, -0.25015127658843994, 0.3321998417377472, -1.1106973886489868, 0.609792172908783, 1.7442467212677002, -1.020313024520874, 0.8339226841926575, -0.37...
func (mc ModuleClient) GetTxCmd() *cobra.Command { // Group gov queries under a subcommand govTxCmd := &cobra.Command{ Use: "gitService", Short: "GitService transaction commands", } govTxCmd.AddCommand(client.PostCommands( gitServiceCmd.GetCmdPushRefs(mc.moduleName, mc.cdc), )...) govTxCmd.AddCommand(cli...
[ 1.0167300701141357, 0.577173113822937, 0.6253280639648438, -0.9106558561325073, 0.5986404418945312, 0.38935205340385437, -0.14022201299667358, -0.4199410378932953, 0.047966890037059784, -0.5284210443496704, 0.32648420333862305, 1.0009229183197021, -0.9772863388061523, 0.7037868499755859, ...
func (c *Config) RegisterFlags(flags *pflag.FlagSet) { flags.BoolVar(&c.EnableMiddleware, "cors-enable-middleware", c.EnableMiddleware, "Specify whether or not CORS middleware is enabled to enforce policies on cross origin requests") flags.StringVar(&c.AllowedOrigins, "cors-allowed-origins", c.AllowedOrigins, "Speci...
[ -0.1710386425256729, 0.3179567754268646, 0.5937719941139221, -0.9241730570793152, 0.25180554389953613, 0.6527623534202576, -0.5899451971054077, -0.04024168848991394, -0.46841198205947876, -0.5263321995735168, -0.29267072677612305, 0.6313045620918274, -0.5619707703590393, 0.7684257626533508...
func (e *Node) Next() *Node { return e.next }
[ -0.5017210841178894, 0.27398765087127686, 0.1700729876756668, 0.47833454608917236, -0.514420747756958, 0.6629421710968018, -0.4175012707710266, 0.49887704849243164, 0.5580226182937622, -0.32091304659843445, 0.09582585841417313, 1.405413269996643, 0.0796121135354042, 0.1651746779680252, 0...
func (e *Node) Prev() *Node { return e.prev }
[ 0.04244611784815788, 0.8473243117332458, 0.6969487071037292, 0.2737792134284973, 0.485278457403183, 0.25408586859703064, 0.931215226650238, 0.5137758851051331, -0.15453441441059113, -0.2162623405456543, 0.19022949039936066, 0.7995420694351196, -0.052087485790252686, -0.48275938630104065, ...
func NewList(args ...interface{}) *List { l := &List{} for _, v := range args { l.PushBack(v) } return l }
[ 0.2632536292076111, 0.09404279291629791, 0.33956071734428406, 0.5806386470794678, 0.5065985321998596, 0.3692750930786133, -0.552501380443573, 0.3432177007198334, 0.0014254729030653834, -0.11386263370513916, -0.20454290509223938, -0.2775208353996277, -0.1332150101661682, 0.04273154214024544...
func (l *List) First() *Node { return l.head }
[ 0.3336498439311981, 0.6097112894058228, 0.07861428707838058, 0.03785969689488411, 0.6657432913780212, -0.226345032453537, -0.5951215028762817, 0.47461074590682983, 0.1979721337556839, -0.2293398678302765, -0.8987167477607727, 0.9030202031135559, -0.11997628211975098, 0.546785831451416, -...
func (l *List) Last() *Node { return l.tail }
[ -0.31339889764785767, 0.18258516490459442, 0.5659826993942261, -0.6128391623497009, 0.414710134267807, 0.3812206983566284, -0.4023703634738922, 0.2908340394496918, 0.3035826086997986, -0.10640696436166763, -0.7011223435401917, 0.5474157333374023, -0.6723940372467041, 0.09771779179573059, ...
func (l *List) PushFront(v interface{}) { n := &Node{Val: v} if l.Len == 0 { l.Len, l.head, l.tail = 1, n, n return } n.next = l.head l.head.prev = n l.head = n l.Len++ }
[ -0.6254348158836365, 1.3110672235488892, 0.3285035789012909, -0.8657963871955872, -0.1656775176525116, -0.7374482750892639, -0.3046943247318268, 0.18370981514453888, 1.241687297821045, 0.01553872600197792, -1.1634316444396973, 1.1034600734710693, -0.08518454432487488, 1.632841944694519, ...
func (l *List) PushBack(v interface{}) { n := &Node{Val: v} if l.Len == 0 { l.Len, l.head, l.tail = 1, n, n return } n.prev = l.tail l.tail.next = n l.tail = n l.Len++ }
[ -0.5780664682388306, 1.1333274841308594, 0.9298353791236877, -0.6194527745246887, -0.1026640310883522, -0.1333698183298111, 0.5441755652427673, 0.6067332029342651, 1.1566790342330933, 0.8263399600982666, -0.428634375333786, 0.3826035261154175, -1.0078243017196655, 0.6125752329826355, -0....
func (l *List) PopFront() (interface{}, error) { if l.Len == 0 { return nil, ErrEmptyList } v := l.head.Val l.head = l.head.next l.Len-- if l.Len == 0 { l.tail = nil } else { l.head.prev = nil } return v, nil }
[ -0.03818942606449127, 0.8184458017349243, 0.4327333867549896, -0.844265341758728, -0.20667797327041626, -0.6936129331588745, -0.6281126737594604, 0.3059169054031372, 1.0474086999893188, 0.45507919788360596, -1.3590956926345825, 0.7027623057365417, -0.29300448298454285, 1.074812412261963, ...
func (l *List) PopBack() (interface{}, error) { if l.Len == 0 { return nil, ErrEmptyList } v := l.tail.Val l.tail = l.tail.prev l.Len-- if l.Len == 0 { l.head = nil } else { l.tail.next = nil } return v, nil }
[ -0.12218920141458511, 0.7690842151641846, 1.2068461179733276, -0.23811624944210052, -0.09857688099145889, -0.47654226422309875, -0.09335979074239731, 0.23712794482707977, 0.8494367599487305, 1.33242666721344, -0.5251887440681458, 0.01414017379283905, -1.040345549583435, 0.1992228627204895,...
func (l *List) Reverse() *List { l.head, l.tail = l.tail, l.head curr := l.head for curr != nil { curr.prev, curr.next = curr.next, curr.prev curr = curr.next } return l }
[ -0.5011078119277954, 0.22854578495025635, 0.5986550450325012, -0.5131691694259644, 0.07561923563480377, -0.3482804596424103, -0.2510994076728821, 1.3938802480697632, 0.26991894841194153, -0.25608372688293457, -0.9226344227790833, 0.35296228528022766, -0.9567669034004211, -0.062331590801477...
func (l *List) String() string { var b strings.Builder b.WriteByte('[') b.WriteString(strconv.Itoa(l.Len)) b.Write([]byte{']', ' ', '{'}) for curr := l.head; curr != nil; curr = curr.next { fmt.Fprint(&b, curr.Val) b.WriteByte(',') } b.WriteByte('}') return b.String() }
[ -0.06922949105501175, -0.697486162185669, 0.5181367993354797, -0.815039336681366, -0.41140657663345337, 0.3651253283023834, -0.3357301950454712, -0.525892436504364, 0.005744929891079664, 0.012726536951959133, -0.7827036380767822, 0.9583817720413208, -0.35194283723831177, 0.585506021976471,...
func createOrderId(writer http.ResponseWriter, _ *http.Request) { orderId := []byte(uuid.New().String()) renderResponse(writer, orderId) }
[ -0.46840575337409973, -0.6689161062240601, 0.3393081724643707, -0.40032583475112915, 0.6564292907714844, 0.1827995330095291, -0.6999961733818054, 0.6056972146034241, 0.12248684465885162, 0.5659978985786438, -0.7863527536392212, 0.0607302188873291, -0.5795406103134155, 1.2708759307861328, ...
func createOrder(writer http.ResponseWriter, request *http.Request) { transactionId := request.Header.Get("transactionId") order := <-orderService.GetOrder(transactionId) if order.Id.Value == "" { log.Printf("Creating order for transactionId :%s......", transactionId) orderHandler.CreateOrder(transactionId, comm...
[ 0.1360132098197937, 0.03386995568871498, 0.42705652117729187, -0.037175215780735016, 1.0894496440887451, -0.5547722578048706, -0.5256184339523315, -0.33132511377334595, 0.32223859429359436, -0.11915010213851929, 0.2149783968925476, -1.0779290199279785, -0.3017332851886749, 1.26044690608978...
func findOrder(writer http.ResponseWriter, request *http.Request) { orderId := getArgumentAtIndex(request, 3) order := <-orderService.GetOrder(orderId) jsonResponse, err := json.Marshal(order) if err != nil { panic(err) } renderResponse(writer, jsonResponse) }
[ -0.8629289865493774, 0.14283494651317596, 0.573110818862915, 0.17185477912425995, 0.3601294755935669, -0.8939372301101685, -0.45838019251823425, -0.6590110063552856, 0.03629237413406372, 0.2565353512763977, -0.06332132965326309, 0.08365357667207718, -0.1067672148346901, 1.0391350984573364,...
func findProduct(writer http.ResponseWriter, request *http.Request) { transactionId := uuid.New().String() products := productService.GetAllProduct() writeResponse(writer, render.ProductsResponse{TransactionId: transactionId, Products: products}) }
[ -0.2018640637397766, -0.08147275447845459, 0.3752232789993286, 0.3517506718635559, 0.7209241986274719, -0.3680594861507416, 0.3729405105113983, -0.19791148602962494, 0.3578316271305084, 0.285589337348938, 0.5593830347061157, -0.7131725549697876, -0.5922719240188599, 0.48286646604537964, ...
func addProduct(writer http.ResponseWriter, request *http.Request) { transactionId := request.Header.Get("transactionId") log.Printf("Adding product for trasnsactionId %s!", transactionId) decoder := json.NewDecoder(request.Body) addProductCommand := command.AddProductCommand{} err := decoder.Decode(&addProductCom...
[ -0.49769988656044006, 0.04549359157681465, 0.5099411010742188, 0.29858437180519104, 0.42046257853507996, 0.38839083909988403, -0.028786318376660347, -0.5333223938941956, 0.9884724617004395, -0.5484504103660583, 0.3252778649330139, -0.5132250189781189, 0.1842525601387024, 0.1262762993574142...
func removeProduct(writer http.ResponseWriter, request *http.Request) { transactionId := request.Header.Get("transactionId") log.Printf("Removing product for trasnsactionId %s!", transactionId) decoder := json.NewDecoder(request.Body) removeProductCommand := command.RemoveProductCommand{} err := decoder.Decode(&re...
[ -0.7003206014633179, -0.278428316116333, 0.32437944412231445, 0.20698174834251404, -0.012682548724114895, -0.21218059957027435, 0.2215748280286789, -0.05881113186478615, 0.811107873916626, -0.05218103155493736, 0.08253292739391327, -0.8200401663780212, 0.01306265126913786, -0.1143616437911...
func (n *NodeReference) MarshalJSON() ([]byte, error) { ctx := WalkingContext{ curr: n, root: n, parent: nil, } return marshalJSON(ctx) }
[ -1.0540136098861694, -0.07971090078353882, 0.18654204905033112, -0.994269609451294, -0.14178766310214996, -0.15817716717720032, 0.708721399307251, -0.2957512140274048, 0.16288478672504425, 0.3046013116836548, 0.2997018098831177, 1.5438340902328491, -0.6170358061790466, 0.9256783723831177, ...
func NewEmbeddedSIMActivationCode()(*EmbeddedSIMActivationCode) { m := &EmbeddedSIMActivationCode{ } m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); m.SetAdditionalData(make(map[string]any)) return m }
[ 0.8460878133773804, -0.8672592043876648, 0.14516250789165497, 0.08562449365854263, -0.2511864900588989, -0.5751762986183167, 0.5485309958457947, 0.8869363069534302, -0.16282622516155243, 0.05060933157801628, -0.4550462067127228, -0.5917332172393799, -0.18462996184825897, 0.1665184944868087...
func CreateEmbeddedSIMActivationCodeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewEmbeddedSIMActivationCode(), nil }
[ 1.2585169076919556, -0.3482643663883209, 0.4396194517612457, 0.5881350636482239, -0.6562485694885254, -0.19999071955680847, 0.574163556098938, 0.42157039046287537, 0.7278254628181458, -0.4329609274864197, 0.12886205315589905, -0.09135796129703522, 0.37575581669807434, 0.5466016530990601, ...
func (m *EmbeddedSIMActivationCode) GetAdditionalData()(map[string]any) { val , err := m.backingStore.Get("additionalData") if err != nil { panic(err) } if val == nil { var value = make(map[string]any); m.SetAdditionalData(value); } return val.(map[string]any) }
[ 0.4099878966808319, -0.06507840007543564, 0.2179649919271469, 0.34200799465179443, -0.7192510366439819, 0.16335707902908325, -0.31201478838920593, 0.017392780631780624, 0.9106383323669434, -0.7815334796905518, 0.15447375178337097, 0.5311495065689087, -0.12208481132984161, 0.498248934745788...
func (m *EmbeddedSIMActivationCode) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore }
[ 0.7661612033843994, -0.31465479731559753, 0.3917815089225769, 0.20636123418807983, 0.08727353066205978, 0.07051348686218262, 0.7084466218948364, -0.049100156873464584, 0.3575228750705719, -0.725333571434021, 0.88740473985672, -0.07205566018819809, -1.631126880645752, -0.6751052737236023, ...
func (m *EmbeddedSIMActivationCode) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["integratedCircuitCardIdentifier...
[ 0.10344892740249634, 0.22303429245948792, 0.723469078540802, -1.0209019184112549, 0.054307445883750916, -0.7573097944259644, 0.5184069275856018, 0.0998181477189064, -0.5608260035514832, -0.5280811190605164, -0.7429307699203491, 0.06863638013601303, -0.9872876405715942, -0.16718223690986633...
func (m *EmbeddedSIMActivationCode) GetIntegratedCircuitCardIdentifier()(*string) { val, err := m.GetBackingStore().Get("integratedCircuitCardIdentifier") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil }
[ 0.2400190234184265, -0.23597276210784912, 0.16410240530967712, -0.2893430292606354, -0.0821179747581482, 0.1755661964416504, 0.7767384648323059, 0.3509584367275238, 0.2538406550884247, 0.11069581657648087, -0.9657180905342102, -0.1734095960855484, -1.049386978149414, -0.6110057234764099, ...