text
stringlengths
11
6.3k
embedding
listlengths
768
768
func GetUserClubs(username string) (*UserClubs, error) { res := &UserClubs{} err := urlToStruct(fmt.Sprintf("/users/%s/clubs", url.QueryEscape(username)), res) if err != nil { return nil, err } return res, nil }
[ -1.5517624616622925, 1.1161830425262451, 0.3148854076862335, 0.953119158744812, -0.3554338812828064, -0.3435627222061157, 1.0413060188293457, -0.92991703748703, -0.06141742691397667, -0.4562005400657654, -1.0293010473251343, 0.36252912878990173, -1.42435622215271, -0.3114143908023834, 0....
func Chain(hs ...juggler.Handler) juggler.Handler { return juggler.HandlerFunc(func(ctx context.Context, c *juggler.Conn, m message.Msg) { for _, h := range hs { h.Handle(ctx, c, m) } }) }
[ 0.036832600831985474, -0.17359992861747742, 0.47522810101509094, 0.8397251963615417, 0.5091181993484497, 0.902147650718689, 0.13987094163894653, 0.08009614050388336, -1.2612676620483398, -0.6785048246383667, -0.3717154562473297, 0.07329447567462921, -0.16329693794250488, 0.7783694863319397...
func PanicRecover(h juggler.Handler, vars *expvar.Map) juggler.Handler { return juggler.HandlerFunc(func(ctx context.Context, c *juggler.Conn, m message.Msg) { defer func() { if e := recover(); e != nil { if vars != nil { vars.Add("RecoveredPanics", 1) } var err error switch e := e.(type) { ...
[ 0.08188489824533463, -0.48527684807777405, 0.43987783789634705, 0.2628193497657776, -0.48320868611335754, -0.08783286064863205, -0.3209715783596039, 0.9096825122833252, -0.19334512948989868, -0.3254966735839844, -0.2534695267677307, -0.35870668292045593, -0.5797120332717896, -0.31586208939...
func LogConn(logFn func(string, ...interface{})) func(*juggler.Conn, juggler.ConnState) { return func(c *juggler.Conn, state juggler.ConnState) { switch state { case juggler.Connected: logFn("%v: connected from %v with subprotocol %q", c.UUID, c.RemoteAddr(), c.Subprotocol()) case juggler.Closed: logFn("%v...
[ -0.062012381851673126, -0.8075829744338989, 0.6725574731826782, -0.251102089881897, -0.7599553465843201, -0.2051713764667511, -0.7363284826278687, 1.3334559202194214, -0.3027457296848297, -0.7944839596748352, -0.7587740421295166, 0.25961968302726746, 0.8513610363006592, -0.5349934697151184...
func LogMsg(logFn func(string, ...interface{})) juggler.Handler { return juggler.HandlerFunc(func(ctx context.Context, c *juggler.Conn, m message.Msg) { if m.Type().IsRead() { logFn("%v: received message %v %s", c.UUID, m.UUID(), m.Type()) } else if m.Type().IsWrite() { logFn("%v: sending message %v %s", c.U...
[ -0.16235856711864471, 0.3130565583705902, 0.7245062589645386, -0.3522035777568817, -0.4856308102607727, -0.600348711013794, -0.12559299170970917, 0.8561365604400635, -0.31584978103637695, -0.4264242649078369, 0.6977910995483398, -0.2282366305589676, 0.14653918147087097, 0.6034220457077026,...
func ServeTwirp(enable bool) HandlerOption { return &serveTwirpOption{!enable} }
[ -0.27181610465049744, 0.2464524209499359, 0.5495110154151917, 0.03962643817067146, -0.25792014598846436, 0.7913272976875305, 0.33727630972862244, 0.7731459140777588, -0.06456860154867172, 0.9203711152076721, -0.639265775680542, -0.9419501423835754, -1.175976276397705, 0.1368587613105774, ...
func NewHandler(methodFQN, serviceFQN, packageFQN string, impl Func, opts ...HandlerOption) *Handler { var cfg handlerCfg for _, opt := range opts { opt.applyToHandler(&cfg) } if reg := cfg.Registrar; reg != nil { reg.register(serviceFQN) } return &Handler{ methodFQN: methodFQN, serviceFQN: servi...
[ 0.12770044803619385, 0.2904091775417328, 0.180093914270401, 0.398052841424942, -0.35969632863998413, 0.10846579819917679, 0.5789095163345337, 0.4269140064716339, 0.8460382223129272, -0.64931720495224, 0.25016850233078003, 0.5381165146827698, -0.06984176486730576, 0.21317589282989502, 0.1...
func (h *Handler) Serve(w http.ResponseWriter, r *http.Request, req proto.Message) { // To ensure that we can re-use connections, always consume and close the // request body. defer r.Body.Close() defer io.Copy(ioutil.Discard, r.Body) if r.Method != http.MethodPost { // grpc-go returns a 500 here, but interoper...
[ -0.3831847012042999, 0.1807401031255722, 0.653323769569397, 0.14413799345493317, 0.2880454957485199, -0.6522611379623413, 0.5830911993980408, -0.02254038117825985, -1.1734832525253296, 0.5491830110549927, 0.17857326567173004, 0.24338924884796143, -0.2019013613462448, 0.22778920829296112, ...
func DecodeBase64(source string) ([]byte, error) { out, err := base64.StdEncoding.DecodeString(source) return out, err }
[ -0.6209225058555603, 0.18037106096744537, 0.05064966529607773, 1.1782379150390625, -0.16606871783733368, -0.8724155426025391, -0.20377138257026672, 0.13966093957424164, 0.14512541890144348, -0.1334000676870346, -0.9508702754974365, 0.5962871313095093, -0.6330345869064331, 0.162559792399406...
func FindCounterIdByRecording(countersReader *counters.Reader, recordingId int64) int32 { return countersReader.FindCounter(RECORDING_POSITION_COUNTER_TYPE_ID, func(keyBuffer *atomic.Buffer) bool { return keyBuffer.GetInt64(RECORDING_ID_OFFSET) == recordingId }) }
[ 0.12860576808452606, -0.4365590810775757, 0.5097331404685974, -0.2596525549888611, -0.5800285339355469, 0.03253557160496712, 0.38266366720199585, -1.141925573348999, -0.16557683050632477, 0.3799801170825958, 0.27478697896003723, 0.09043125063180923, -1.096204400062561, 1.1228169202804565, ...
func FindCounterIdBySession(countersReader *counters.Reader, sessionId int32) int32 { return countersReader.FindCounter(RECORDING_POSITION_COUNTER_TYPE_ID, func(keyBuffer *atomic.Buffer) bool { return keyBuffer.GetInt32(SESSION_ID_OFFSET) == sessionId }) }
[ 0.5771839618682861, -1.09811532497406, 0.4214760363101959, -0.7080304026603699, -0.03679346665740013, -0.18313269317150116, 0.4535621702671051, -1.7593863010406494, 0.4831258952617645, 0.14244388043880463, 0.07620181143283844, -0.006263528950512409, -0.8074190616607666, 1.0390268564224243,...
func GetSourceIdentity(countersReader *counters.Reader, counterId int32) string { if countersReader.GetCounterTypeId(counterId) != RECORDING_POSITION_COUNTER_TYPE_ID { return "" } identity, err := countersReader.GetKeyPartString(counterId, SOURCE_IDENTITY_LENGTH_OFFSET) if err != nil { return "" } return iden...
[ -0.25544294714927673, -0.03271488845348358, 0.6813551783561707, -0.24164164066314697, 0.4573955535888672, 0.7422729134559631, 0.24911189079284668, -0.6105529069900513, 1.2257862091064453, 0.7135266065597534, -0.790908932685852, -0.5300567150115967, -0.8258520364761353, -0.05059124156832695...
func IsRecordingActive(countersReader *counters.Reader, counterId int32, recordingId int64) bool { recId, err := countersReader.GetKeyPartInt64(counterId, RECORDING_ID_OFFSET) return err == nil && recId == recordingId }
[ -0.11557192355394363, -0.5467699766159058, 0.6444068551063538, 0.27435120940208435, -0.47394105792045593, -0.3882056772708893, -0.3533696234226227, 0.2514658570289612, 0.05170370638370514, 0.6533713936805725, 0.43902328610420227, 0.8252165913581848, -0.6939588189125061, -0.6935750842094421...
func (s *Service) Name() string { return s.name }
[ -0.5722520351409912, -0.7412083745002747, 0.027431746944785118, 0.0509541891515255, -1.3149770498275757, -0.007878401316702366, 0.09720084816217422, -0.7978072762489319, -0.17081212997436523, 0.6676879525184631, -0.28352636098861694, 0.3068406879901886, -0.0024102015886455774, 0.5976110100...
func (s *Service) Description() string { return s.desc }
[ 0.2048151046037674, 0.013736221939325333, -0.16244393587112427, 0.48913660645484924, -0.5824254155158997, 0.7481107711791992, -0.20528100430965424, -0.5343682765960693, 0.6118746995925903, -0.03904208913445473, 0.35555389523506165, 1.0289783477783203, -0.29777979850769043, 0.49310982227325...
func (s *Service) Provides() []string { return s.provides }
[ -0.21811877191066742, -0.22544604539871216, 0.16067898273468018, -0.12201343476772308, -0.3030088245868683, 1.1722707748413086, -0.9850000143051147, -0.4665829539299011, 1.2878758907318115, -0.5981633067131042, -0.17384488880634308, 1.070143461227417, -0.2147429883480072, 1.182248115539550...
func (s *Service) Depends() []string { return s.depends }
[ -0.9807696342468262, -0.6894868612289429, 0.3888058066368103, 0.18829287588596344, -0.32266297936439514, 0.779327929019928, -0.48566877841949463, -0.5301898121833801, -0.2072637975215912, -0.3155224621295929, -1.2611627578735352, 1.0568827390670776, 0.2234761118888855, 0.9692075848579407, ...
func (s *Service) Status() (string, time.Time) { if m := s.mgr; m != nil { m.lock() defer m.unlock() } return s.reason, s.stamp }
[ 0.23401083052158356, -0.9969976544380188, 0.4383932054042816, -0.4736369550228119, -0.866248369216919, -0.1817348748445511, -0.6900861859321594, -0.02703985944390297, 0.9582287669181824, 0.19563603401184082, -0.29921814799308777, 1.5725396871566772, -0.03488260135054588, 1.3155877590179443...
func (s *Service) Conflicts() []string { return s.conflicts }
[ -0.6709927320480347, -0.07455360889434814, 0.19949229061603546, 0.4704582989215851, 0.9204280376434326, 0.7008303999900818, -0.39008477330207825, -0.13534647226333618, 0.9300786852836609, -1.0295276641845703, -0.5149061679840088, -0.18606092035770416, -0.6360728144645691, 0.201477423310279...
func (s *Service) Enabled() bool { if m := s.mgr; m == nil { return false } else { m.lock() rv := s.enabled m.unlock() return rv } }
[ -0.08502422273159027, -0.049292173236608505, 0.5189675688743591, 0.2452714741230011, -0.35688018798828125, 0.024266118183732033, -0.1587006151676178, 0.7237703800201416, 0.32569584250450134, -0.5185351967811584, -0.5233231782913208, 0.43165457248687744, -1.2806512117385864, 0.6201747655868...
func (s *Service) Running() bool { if m := s.mgr; m == nil { return false } else { m.lock() rv := s.running && !s.stopping m.unlock() return rv } }
[ -1.0579806566238403, -0.6390259265899658, 0.42452821135520935, -0.041827242821455, -0.6159070730209351, -0.13084280490875244, -0.9797124266624451, 0.0006624965462833643, -0.2695588171482086, -0.003319265553727746, 0.2019425481557846, -0.29618486762046814, -0.9826042652130127, -0.0548192337...
func (s *Service) Failed() bool { if m := s.mgr; m == nil { return false } else { m.lock() rv := s.failed m.unlock() return rv } }
[ -0.7595252394676208, 0.23377558588981628, 0.48247241973876953, -0.23607894778251648, -0.5890496373176575, -0.30962663888931274, -0.5731834769248962, -0.6021114587783813, 0.6259316802024841, -0.9487054347991943, -0.18087896704673767, 0.22372540831565857, -1.2725629806518555, 0.6450812816619...
func (s *Service) Enable() error { if s.mgr == nil { return ErrNoManager } s.mgr.lock() defer s.mgr.unlock() if s.enabled { return nil } for c := range s.incompat { if c.enabled { s.logf("Cannot enable %s: conflicts with %s", s.Name(), c.Name()) s.reason = "Disabled due to conflict" s.serial...
[ -0.11865897476673126, -0.1127011775970459, 0.6751255393028259, 0.15578538179397583, 0.3550395667552948, 0.19102968275547028, 0.6641206741333008, 0.6475558876991272, 0.49780410528182983, -0.6961631178855896, -0.45939645171165466, 0.4295624792575836, -1.1491763591766357, 0.46641188859939575,...
func (s *Service) Disable() error { if s.mgr == nil { return ErrNoManager } s.mgr.lock() defer s.mgr.unlock() if !s.enabled && s.reason == "Disabled" { return nil } s.serial = s.mgr.bumpSerial() s.logf("Disabling service %s", s.Name()) s.stamp = time.Now() s.reason = "Disabled" s.enabled = false s.fai...
[ 0.24170075356960297, -0.0877143070101738, 0.5735052824020386, 0.028109464794397354, -0.21741853654384613, -0.0861373096704483, 0.3453286588191986, 0.42992955446243286, 0.8984274864196777, -1.0483564138412476, -0.23489579558372498, 0.6372793316841125, -1.0458548069000244, 0.0836596041917800...
func (s *Service) Restart() error { if s.mgr == nil { return ErrNoManager } s.mgr.lock() defer s.mgr.unlock() if !s.enabled { return nil } s.serial = s.mgr.bumpSerial() s.logf("Restarting service %s", s.Name()) s.enabled = false s.stopRecurse("Stopping for restart") s.stamp = time.Now() s.reason = "...
[ 0.16140742599964142, -0.05401560291647911, 0.34746691584587097, -0.04230227693915367, -0.1945713609457016, -0.4621417820453644, -0.4052078425884247, 0.04712894186377525, 0.7159326672554016, -0.671829879283905, -0.40936219692230225, 1.2164653539657593, -0.8000938296318054, 0.219005167484283...
func (s *Service) Clear() { if s.mgr == nil { return } s.mgr.lock() defer s.mgr.unlock() s.serial = s.mgr.bumpSerial() if s.failed { s.reason = "Cleared fault" s.stamp = time.Now() s.logf("Clearing fault on %s", s.Name()) } s.starts = 0 s.failed = false s.err = nil s.startRecurse("Cleared fault") }
[ -0.09771713614463806, 0.7559254765510559, 0.3887375295162201, 0.12360408157110214, -0.24983364343643188, -0.22715777158737183, -0.08857674151659012, -1.2053452730178833, 1.1804364919662476, -0.9021027088165283, 0.2583591938018799, 1.74687659740448, 0.04845687374472618, 0.7518725395202637, ...
func (s *Service) Check() error { if s.mgr == nil { return ErrNoManager } return s.checkService() }
[ -0.2265661656856537, 0.23453614115715027, 0.3306593596935272, 0.7403035759925842, 0.20821629464626312, 0.060284193605184555, -0.18426059186458588, 0.21410992741584778, 0.17936362326145172, -0.38693368434906006, 0.5641688108444214, 1.3396685123443604, -0.1914484202861786, 1.9902263879776, ...
func serviceMatches(s1, s2 string) bool { a1 := strings.SplitN(s1, ":", 2) a2 := strings.SplitN(s2, ":", 2) if a1[0] != a2[0] { return false } if len(a1) == 1 { return true } if len(a2) == 1 { return false } return a1[1] == a2[1] }
[ -0.5604143142700195, -0.5360604524612427, 0.7063218355178833, 0.15787141025066376, -0.5718022584915161, 0.6858116984367371, -0.5168935060501099, -0.09189826250076294, -0.3881092667579651, 0.5681753754615784, -0.7833204865455627, 0.9623865485191345, -1.511507272720337, -0.6637988686561584, ...
func (s *Service) Matches(check string) bool { if serviceMatches(check, s.Name()) { return true } for _, p := range s.Provides() { if serviceMatches(check, p) { return true } } return false }
[ -0.6779975891113281, 0.2859153747558594, 0.3436652421951294, 0.5061315298080444, -0.6664004921913147, 0.2454199343919754, -0.7517251372337341, 0.43696773052215576, 0.3063388168811798, -0.7227219343185425, -0.14345841109752655, 0.13090820610523224, -0.6098049283027649, 1.0454267263412476, ...
func (s *Service) SetProperty(n PropertyName, v interface{}) error { if m := s.mgr; m != nil { m.lock() defer m.unlock() } if e := s.setProp(n, v); e != nil { s.logf("Failed to set property %s: %v", s.Name(), e) return e } return nil }
[ -0.4442322552204132, -0.012028678320348263, 0.3511326313018799, 0.37230628728866577, -0.05583915486931801, -0.20573683083057404, -0.2637863755226135, -0.6006155014038086, 0.56129390001297, 0.40390485525131226, 0.08061567693948746, 0.6272926330566406, -1.3460060358047485, 0.0624620057642459...
func (s *Service) setManager(mgr *Manager) { if s.mgr != nil { // This is a serious programmer mistake panic("Already added to a manager") } s.mlog.AddLogger(mgr.getLogger(s)) s.mgr = mgr s.incompat = make(map[*Service]bool) s.children = make(map[*Service]bool) s.parents = make(map[string]map[*Service]bool)...
[ -0.787556529045105, -0.2332368642091751, 0.5327164530754089, -0.7221218943595886, -0.6130962371826172, -0.17480269074440002, -0.06966529041528702, 0.21011459827423096, 0.3541313409805298, -0.7214759588241577, -0.13109493255615234, 0.5832324028015137, -0.23924241960048676, 1.595395922660827...
func (s *Service) tooQuickly() error { if s.rateLimit == 0 { return nil } if s.starts < s.rateLimit { return nil } // If we've restarted more than n times in the last period, // then rate limit us. idx := (s.starts - 1) % s.rateLimit end := s.startTimes[idx] if time.Now().Before(end.Add(s.ratePeriod)) { ...
[ 0.07139363139867783, 0.47328463196754456, 0.6450375318527222, -0.7807984948158264, 0.27131789922714233, -1.2660433053970337, -0.3112541437149048, -0.9414879679679871, 0.00472694868221879, 0.4564410150051117, -0.03447793796658516, 1.2800133228302002, -0.09751319885253906, 0.1613481193780899...
func NewService(p Provider) *Service { s := &Service{prov: p} s.ratePeriod = time.Minute s.rateLimit = 10 s.startTimes = make([]time.Time, s.rateLimit) s.name = p.Name() s.desc = p.Description() s.conflicts = append([]string{}, p.Conflicts()...) s.depends = append([]string{}, p.Depends()...) s.provides = appe...
[ -0.19800086319446564, -0.008178671821951866, 0.572614848613739, 0.20523978769779205, -0.5418538451194763, -0.15834707021713257, -0.007717736065387726, -0.3275662660598755, 0.42334499955177307, 0.16829144954681396, -0.27658823132514954, 0.8272227048873901, -0.2467075139284134, 0.43727150559...
func (h *Handler) CrdName() string { return "NodeConfig" }
[ 0.4632338881492615, 0.1136663630604744, 0.6049294471740723, -0.050225455313920975, -0.12951529026031494, 0.6476536989212036, -0.6244043707847595, 0.4867991805076599, -0.5078426003456116, 0.5027537941932678, -0.4598429501056671, 0.5885438323020935, 0.6486830711364746, 0.8104187846183777, ...
func (h *Handler) CrdKeyPrefix() (prefix string, underKsrPrefix bool) { return model.Keyword + "/", true }
[ -0.23599278926849365, 0.0066408878192305565, 0.4934936761856079, -0.23301367461681366, -0.5001906156539917, 0.6504130959510803, -0.9113038182258606, 0.1919131875038147, -0.21027006208896637, 0.6485669612884521, -0.9000033736228943, 0.6161226034164429, -0.5616661906242371, 1.282767415046692...
func (h *Handler) IsCrdKeySuffix(keySuffix string) bool { return true }
[ -0.7126591801643372, -0.32336121797561646, 0.6031337976455688, -0.016610322520136833, -0.5372101068496704, 0.5280435681343079, -1.0108563899993896, -0.03532781824469566, -0.22983720898628235, -0.27532753348350525, -1.459835171699524, 0.8913048505783081, -1.189824104309082, 1.09877157211303...
func (h *Handler) CrdObjectToKVData(obj interface{}) (data []kvdbreflector.KVData, err error) { nodeConfig, ok := obj.(*v1.NodeConfig) if !ok { return nil, errors.New("failed to cast into NodeConfig struct") } data = []kvdbreflector.KVData{ { ProtoMsg: h.nodeConfigToProto(nodeConfig), KeySuffix: nodeConf...
[ -0.6678932905197144, 0.20603017508983612, 0.4252144694328308, 0.03653854876756668, -0.37463581562042236, 0.0977771133184433, -0.7305511236190796, -0.7510063648223877, -0.4508230984210968, 0.7019438743591309, -0.6932679414749146, 0.8018426299095154, 0.58697509765625, 0.9490424394607544, 0...
func (h *Handler) IsExclusiveKVDB() bool { return true }
[ -0.03779521957039833, 0.2859508693218231, 0.6696784496307373, 2.0154292583465576, -1.2947734594345093, 1.0475387573242188, -0.5990272164344788, 1.0895791053771973, 0.4755795896053314, -0.012424525804817677, 0.10368292778730392, -0.08560742437839508, -0.8924844264984131, 0.9018367528915405,...
func (h *Handler) PublishCrdStatus(obj interface{}, opRetval error) error { nodeConfig, ok := obj.(*v1.NodeConfig) if !ok { return errors.New("failed to cast into NodeConfig struct") } nodeConfig = nodeConfig.DeepCopy() if opRetval == nil { nodeConfig.Status.State = v1.StatusSuccess } else { nodeConfig.Stat...
[ -0.4541768729686737, -0.008747639134526253, 0.6367928981781006, -0.38349786400794983, -0.48101431131362915, 0.5596355199813843, -0.03827827423810959, 0.7413023114204407, -0.13971109688282013, 0.8168104887008667, -0.4043682813644409, 0.9272094368934631, -0.4964120388031006, 0.83683508634567...
func (h *Handler) nodeConfigToProto(nodeConfig *v1.NodeConfig) *model.NodeConfig { nodeConfigProto := &model.NodeConfig{} nodeConfigProto.NodeName = nodeConfig.Name if nodeConfig.Spec.MainVPPInterface.InterfaceName != "" { nodeConfigProto.MainVppInterface = h.interfaceConfigToProto(nodeConfig.Spec.MainVPPInterface...
[ -0.388044536113739, 0.32610663771629333, 0.46690914034843445, -0.8731823563575745, -0.3885100781917572, 0.06809993833303452, 0.34801971912384033, -0.38795560598373413, -0.3864539563655853, 1.0956428050994873, -0.7601689696311951, -0.5147274732589722, -0.16308462619781494, 0.157885000109672...
func NewLocalHour(year int, month time.Month, date int, hour int) LocalHour { return LocalHour{ date: NewLocalDate(year, month, date), hour: hour, } }
[ 1.7405823469161987, -0.81956547498703, 0.3951905369758606, 0.4843617379665375, -1.883232831954956, 0.8434575796127319, -1.230383038520813, 0.8596298098564148, -0.32526764273643494, 0.271666556596756, -1.0947990417480469, 0.010464189574122429, -0.23605389893054962, -0.03416036441922188, 0...
func (h *LocalHour) Date() int { return h.date.Date() }
[ 0.926535427570343, -0.12939994037151337, 0.31259477138519287, 0.40627869963645935, -0.4471706748008728, 0.788996160030365, -0.29723507165908813, 0.12093527615070343, -0.6967887878417969, -0.44832050800323486, -0.8060694336891174, -0.4822787642478943, -0.14361338317394257, 1.189873576164245...
func (h *LocalHour) Hour() int { return h.hour }
[ 0.261229544878006, -0.696909487247467, 0.5430147051811218, 0.3468784689903259, -0.2105739563703537, 1.4240573644638062, 0.5705326795578003, 1.557396650314331, -0.6205853223800659, -0.21738147735595703, -0.7569580674171448, -0.01322579849511385, -0.48843565583229065, 0.5458080172538757, 1...
func (d LocalHour) String() string { return fmt.Sprintf("%04d-%02d-%02dT%02d", d.Year(), int(d.Month()), d.Date(), d.Hour()) }
[ 0.5763674378395081, -1.5460350513458252, 0.5571720004081726, -0.3088650107383728, -1.0462394952774048, 1.2838650941848755, -0.925730288028717, -0.05523325875401497, -0.7036755084991455, 0.34852057695388794, -0.38807213306427, 0.03406667709350586, 0.2017620950937271, -0.2856583893299103, ...
func (r *Resolver) UserQuery() runtime.UserQueryResolver { return &userQueryResolver{r} }
[ 0.3731163442134857, -0.6567928791046143, 0.32886645197868347, 0.38364356756210327, -0.7665638327598572, -0.44895029067993164, 0.10507790744304657, -0.0519830584526062, 0.4532565474510193, -1.145628809928894, -0.29380136728286743, -0.4332095980644226, -0.016480758786201477, -0.0332939475774...
func BucketDeployment_IsConstruct(x interface{}) *bool { _init_.Initialize() var returns *bool _jsii_.StaticInvoke( "monocdk.aws_s3_deployment.BucketDeployment", "isConstruct", []interface{}{x}, &returns, ) return returns }
[ -1.3052637577056885, -0.10821066051721573, 0.5704936981201172, 0.31397369503974915, -0.0462605357170105, 0.6062535643577576, 0.48026609420776367, -0.2460719496011734, 0.41831573843955994, 0.08830676227807999, -0.8332330584526062, 0.3935506343841553, 0.4756110608577728, -0.13558857142925262...
func (b *jsiiProxy_BucketDeployment) OnPrepare() { _jsii_.InvokeVoid( b, "onPrepare", nil, // no parameters ) }
[ -0.2813331186771393, 0.36983492970466614, 0.4260939061641693, 0.010836041532456875, 0.30961722135543823, -0.9976204633712769, 0.545214831829071, -0.5290395021438599, 0.09338319301605225, 0.35406792163848877, -0.5776132941246033, 0.2755940854549408, 0.21729424595832825, 0.42393168807029724,...
func (b *jsiiProxy_BucketDeployment) OnSynthesize(session constructs.ISynthesisSession) { _jsii_.InvokeVoid( b, "onSynthesize", []interface{}{session}, ) }
[ -0.7231965661048889, 0.15861083567142487, 0.3270246982574463, -0.5598293542861938, 0.47076818346977234, -1.9899487495422363, 0.8221914768218994, -0.5045940279960632, 0.12874434888362885, 0.37441542744636536, -1.1571122407913208, 0.18273818492889404, 0.22069388628005981, -0.0590356476604938...
func (b *jsiiProxy_BucketDeployment) OnValidate() *[]*string { var returns *[]*string _jsii_.Invoke( b, "onValidate", nil, // no parameters &returns, ) return returns }
[ -0.45388031005859375, -0.10100135207176208, 0.48145362734794617, 0.32271963357925415, 0.3378060460090637, -0.8757593035697937, 0.01356546487659216, -0.8536925315856934, -0.24815736711025238, 0.40934666991233826, -0.38690605759620667, 0.20080223679542542, -0.3477940857410431, -0.11687573045...
func (b *jsiiProxy_BucketDeployment) Prepare() { _jsii_.InvokeVoid( b, "prepare", nil, // no parameters ) }
[ -0.3795648515224457, 0.7389177680015564, 0.250705361366272, 0.10645972937345505, 0.6787325739860535, -0.891352653503418, 0.800872802734375, -0.24754832684993744, -0.25650376081466675, -0.17930731177330017, -0.6172491908073425, 0.5525111556053162, 0.188688263297081, 0.13403311371803284, 0...
func (b *jsiiProxy_BucketDeployment) Synthesize(session awscdk.ISynthesisSession) { _jsii_.InvokeVoid( b, "synthesize", []interface{}{session}, ) }
[ -0.7878972291946411, 1.2074410915374756, 0.08633972704410553, -0.4965100884437561, 0.4760500490665436, -1.231260061264038, 0.4821730852127075, -0.8124635219573975, -0.34649381041526794, -0.5381871461868286, -0.9888047575950623, 1.3185516595840454, 0.7315735220909119, -0.9420369267463684, ...
func (b *jsiiProxy_BucketDeployment) ToString() *string { var returns *string _jsii_.Invoke( b, "toString", nil, // no parameters &returns, ) return returns }
[ -0.4500613808631897, 0.2006450593471527, 0.5599919557571411, -0.5730926990509033, 0.682410478591919, -0.17512549459934235, 0.7775546908378601, -0.629098653793335, -0.4549221098423004, 0.12124200165271759, -0.18167267739772797, 0.4928518533706665, -0.14467817544937134, -0.8992213010787964, ...
func (b *jsiiProxy_BucketDeployment) Validate() *[]*string { var returns *[]*string _jsii_.Invoke( b, "validate", nil, // no parameters &returns, ) return returns }
[ -0.8453658819198608, 0.4708974361419678, 0.4416343867778778, 0.3054852783679962, 1.1561673879623413, -0.4180375933647156, 0.6084120273590088, -0.49358463287353516, -0.520298182964325, -0.1293632686138153, -0.5205485224723816, 0.5987826585769653, -0.38133925199508667, -0.11133742332458496, ...
func CacheControl_FromString(s *string) CacheControl { _init_.Initialize() var returns CacheControl _jsii_.StaticInvoke( "monocdk.aws_s3_deployment.CacheControl", "fromString", []interface{}{s}, &returns, ) return returns }
[ 0.09156518429517746, -0.3034317195415497, 0.3129213750362396, -0.10753494501113892, -0.6504728198051453, 0.37038588523864746, 0.1112445741891861, -0.19511716067790985, 0.541791558265686, 0.169155552983284, -0.6260199546813965, 0.8726235032081604, 0.4992673993110657, -1.2225857973098755, ...
func Expires_After(t awscdk.Duration) Expires { _init_.Initialize() var returns Expires _jsii_.StaticInvoke( "monocdk.aws_s3_deployment.Expires", "after", []interface{}{t}, &returns, ) return returns }
[ 0.06263326108455658, -0.003187697846442461, 0.2951974868774414, -0.2351437658071518, -0.5179039835929871, 0.032529331743717194, -0.6006044149398804, 0.599410891532898, 0.4352862238883972, 0.8268840312957764, -0.37234872579574585, 0.31356433033943176, 0.43849337100982666, -0.515405297279357...
func Expires_AtDate(d *time.Time) Expires { _init_.Initialize() var returns Expires _jsii_.StaticInvoke( "monocdk.aws_s3_deployment.Expires", "atDate", []interface{}{d}, &returns, ) return returns }
[ -0.7303775548934937, 0.15191525220870972, 0.442510187625885, -0.8706681132316589, -0.44640496373176575, -0.301553875207901, -0.6983739733695984, -0.29226452112197876, 0.34783175587654114, 1.2616808414459229, -0.13204771280288696, 1.0359785556793213, 0.7545595169067383, -0.325468510389328, ...
func Expires_AtTimestamp(t *float64) Expires { _init_.Initialize() var returns Expires _jsii_.StaticInvoke( "monocdk.aws_s3_deployment.Expires", "atTimestamp", []interface{}{t}, &returns, ) return returns }
[ -0.5722718238830566, -0.0701775997877121, 0.40133631229400635, -0.46787628531455994, 0.16351957619190216, -0.4264696538448334, -0.6381158232688904, -0.2362101525068283, 0.7324281930923462, 1.4880813360214233, -0.43927356600761414, 0.4577123820781708, 0.6151733994483948, -0.6832536458969116...
func Expires_FromString(s *string) Expires { _init_.Initialize() var returns Expires _jsii_.StaticInvoke( "monocdk.aws_s3_deployment.Expires", "fromString", []interface{}{s}, &returns, ) return returns }
[ -0.04982547089457512, -0.6549233794212341, 0.3611600399017334, -0.10202081501483917, -0.7978719472885132, -0.4838458001613617, -0.44733095169067383, 0.3271237909793854, 1.0159510374069214, 1.0706901550292969, -0.33750104904174805, 0.6890417337417603, -0.13806071877479553, -1.10135757923126...
func Source_Asset(path *string, options *awss3assets.AssetOptions) ISource { _init_.Initialize() var returns ISource _jsii_.StaticInvoke( "monocdk.aws_s3_deployment.Source", "asset", []interface{}{path, options}, &returns, ) return returns }
[ -0.3441462516784668, -0.10384970903396606, 0.2954426407814026, -0.7016429901123047, -0.5861417055130005, 0.10951104760169983, 0.5106226801872253, -0.3150864243507385, 0.5530436038970947, 0.8922575116157532, -0.1346338838338852, 0.9154101014137268, 0.07639344781637192, -0.9913868308067322, ...
func Source_Bucket(bucket awss3.IBucket, zipObjectKey *string) ISource { _init_.Initialize() var returns ISource _jsii_.StaticInvoke( "monocdk.aws_s3_deployment.Source", "bucket", []interface{}{bucket, zipObjectKey}, &returns, ) return returns }
[ -0.6429777145385742, 0.3718245327472687, 0.3005327582359314, -0.12125032395124435, -0.23253905773162842, -0.1962691992521286, 0.8718670010566711, -0.06819624453783035, 0.5934274792671204, 0.7432337403297424, -1.0081838369369507, 0.8249134421348572, 0.13295449316501617, -0.34963127970695496...
func (Cred_CredentialTypes) EnumDescriptor() ([]byte, []int) { return file_credential_proto_rawDescGZIP(), []int{0, 0} }
[ 0.007201633416116238, -0.06796480715274811, 0.39329007267951965, -0.19168297946453094, 0.6119053363800049, -0.003976042848080397, 0.09336242079734802, -0.3148779273033142, -0.03637393191456795, 0.2610306143760681, -0.5127731561660767, 0.2861919105052948, -0.7310047745704651, 1.511740207672...
func (*Cred) Descriptor() ([]byte, []int) { return file_credential_proto_rawDescGZIP(), []int{0} }
[ 0.3768250048160553, 0.2731204926967621, 0.3100244998931885, 0.4183097183704376, 0.120599165558815, 0.3777502775192261, 0.76774001121521, 0.8023704290390015, -0.2151869237422943, -0.8707026839256287, -0.3198156952857971, 0.7713650465011597, 0.1071423813700676, 0.6260431408882141, 0.723625...
func (*Creds) Descriptor() ([]byte, []int) { return file_credential_proto_rawDescGZIP(), []int{1} }
[ -0.2282227873802185, 0.6463830471038818, 0.09899546205997467, -0.22626277804374695, -0.5642292499542236, -0.3749520778656006, 0.16449615359306335, 0.12553074955940247, -0.5086401700973511, -0.32523754239082336, 0.16614031791687012, 0.7601279616355896, -0.02034267969429493, 0.53027856349945...
func (*Key) Descriptor() ([]byte, []int) { return file_credential_proto_rawDescGZIP(), []int{2} }
[ -0.758770763874054, 0.6378607749938965, 0.505298376083374, 0.41210249066352844, -0.47059914469718933, 0.3675791025161743, -0.3658239245414734, 0.8208605051040649, -0.9434059262275696, -0.5222689509391785, -0.3131946325302124, 0.18743370473384857, -0.37931567430496216, 0.7127450108528137, ...
func Split(s string) (dateStamp time.Time, events []string, err error) { if len(s) == 0 { err = fmt.Errorf("unable to parse empty event") return dateStamp, events, err } dateEvent := strings.SplitN(s, " ", 2) dateTime := dateEvent[0] dateStamp, err = parseDate(dateTime) if err != nil { return dateStamp, e...
[ -0.19108250737190247, 0.023324590176343918, 0.7411895990371704, 0.2806903123855591, -0.2749432623386383, -0.36651164293289185, -0.15172091126441956, 0.41271311044692993, 0.39424124360084534, -0.012067590840160847, -0.6763182282447815, 0.5424867868423462, -0.03018764778971672, -0.0652731508...
func parseDate(s string) (combatEventDate time.Time, err error) { layout := "1/2 15:04:05.000 2006" currentDate := time.Now() currentYear := currentDate.Year() combatEventDate, err = time.Parse(layout, s+" "+strconv.Itoa(currentYear)) if combatEventDate.Year() != currentYear { err = fmt.Errorf("event: Failed to...
[ 0.8748270869255066, -0.6836778521537781, 0.9864128232002258, 0.6375753283500671, -1.3250595331192017, -0.25752338767051697, -0.06707385182380676, 0.5458265542984009, 0.5573130249977112, -0.3403467535972595, 0.3914560079574585, -0.04074958339333534, -0.0660712793469429, 0.11926575750112534,...
func Execute() error { return rootCmd.Execute() }
[ 0.5633226037025452, -0.6873026490211487, 0.5470248460769653, 1.3354917764663696, 0.36183056235313416, 0.5999701619148254, -0.44941598176956177, -0.4872923493385315, -0.7654245495796204, -0.8561246395111084, 0.16847941279411316, 0.042799897491931915, -0.5431944131851196, 0.5337516665458679,...
func GetPathToRun(category string, name string, id string) string { return parentRunPath(category, name, id) + "/run.yaml" }
[ 0.16894304752349854, -0.5541126728057861, 0.47343721985816956, 0.47760942578315735, 0.05772794038057327, 0.35984480381011963, 0.5832358002662659, 0.20585845410823822, -1.003139853477478, -0.37708282470703125, 0.4274703562259674, 0.5572269558906555, 0.2625293731689453, 0.7762024402618408, ...
func GetPathToCategory(category string) string { return "categories/" + category + "/category.yaml" }
[ 0.24853923916816711, -0.2327611744403839, 0.4272194504737854, -0.23175647854804993, 0.03150055930018425, 0.3265528976917267, 1.2990881204605103, 0.7916523218154907, -0.32967302203178406, -0.05762491002678871, 0.8530617356300354, 0.20986606180667877, 1.029013991355896, 1.2342922687530518, ...
func GetPathToDataSetIn(category string, run string, runID string, stage string, stageID string, container string) string { return parentContainerPath(category, run, runID, stage, stageID, container) + "/datain.yaml" }
[ 0.4346544146537781, -0.3545427620410919, 0.5617179870605469, -0.14584827423095703, -0.12792272865772247, 0.39514684677124023, 0.5623558759689331, 0.26406657695770264, -0.6861884593963623, -0.6055459976196289, 0.30241215229034424, 1.3258190155029297, 0.7957340478897095, 0.5853999257087708, ...
func GetPathToDataSetOut(category string, run string, runID string, stage string, stageID string, container string) string { return parentContainerPath(category, run, runID, stage, stageID, container) + "/dataout.yaml" }
[ 0.32575851678848267, -0.15323622524738312, 0.4495885372161865, -0.9714162945747375, -0.0392870232462883, 0.0985337421298027, 1.057665467262268, 0.6762658357620239, -0.9796858429908752, -0.491913765668869, 0.7791956663131714, 1.133231282234192, 0.9215359091758728, 0.49218904972076416, 0.2...
func GetPathToContainer(category string, run string, runID string, stage string, stageID string, container string) string { return parentContainerPath(category, run, runID, stage, stageID, container) + "/container.yaml" }
[ 0.6999877095222473, -0.4998862147331238, 0.6702995300292969, 0.2573603391647339, 0.25957706570625305, 0.10059940069913864, 1.64767324924469, -0.09445780515670776, -0.6719828844070435, -0.1987311989068985, 0.848288357257843, 0.6996467709541321, 0.7974734306335449, 1.5302666425704956, 0.89...
func GetPathToRunStatus(category string, run string, runID string) string { return parentRunPath(category, run, runID) + "/runstatus.yaml" }
[ 0.09343556314706802, -1.031427025794983, 0.27270615100860596, 0.1990678608417511, 0.13669854402542114, 0.659574031829834, 0.39839476346969604, 0.5501027703285217, -0.7045994400978088, -0.31494593620300293, 0.42353853583335876, 0.8928272128105164, 0.5762448906898499, 1.1471259593963623, 0...
func WriteJSON(w http.ResponseWriter, v interface{}, status int) { p, err := json.Marshal(&v) if err != nil { JSONError(w, err.Error(), http.StatusInternalServerError) return } w.Header().Set("Content-Type", "application/json") w.WriteHeader(status) w.Write(p) }
[ -1.0498604774475098, -0.8463287353515625, 0.7218245267868042, -0.5322641134262085, -0.3482195734977722, 0.4001624286174774, 0.43126824498176575, 0.5352891683578491, 0.4722827076911926, 0.49399444460868835, -0.28426995873451233, 0.5032062530517578, 0.1788889765739441, 0.953161895275116, 0...
func ReadJSON(r *http.Request, v interface{}) error { p, err := ioutil.ReadAll(r.Body) if err != nil { return err } return json.Unmarshal(p, v) }
[ -1.4293097257614136, -0.5282293558120728, 0.8784840703010559, -0.5070310831069946, -0.7306810021400452, 0.09605636447668076, -0.6739339232444763, -0.21628227829933167, -0.1726948469877243, 0.6675364375114441, 0.35581687092781067, 1.0636268854141235, -0.04906002804636955, -0.115954309701919...
func main() { fmt.Println("Buf test application ver 0.0.1") type data struct { q byte b [3]byte q2 byte m uint32 } myData := data{1, [3]byte{2, 3, 4}, 5, 0x01287353} stdoutDumper := hex.Dumper(os.Stdout) buf := new(bytes.Buffer) le := binary.LittleEndian binary.Write(buf, le, myData) fmt.Print...
[ 1.1143276691436768, -0.7229322195053101, 0.826329231262207, -0.178167924284935, -0.0961795225739479, 1.0679256916046143, 0.1619730293750763, 0.1007094532251358, -0.385716050863266, -0.7937235832214355, -1.146242618560791, 0.2732989490032196, -0.5595037937164307, 0.19580452144145966, -0.4...
func (q *Queue) Pull(pending chan<- *Work) { if !q.canceled { time.Sleep(pullWait) sampleWork := &Work{ repo: GitRepo{fqString: "git://test.repo.git"}, } workToDo := workers + 1 for i := 0; i < workToDo; i++ { pending <- sampleWork } lo...
[ -0.9535253047943115, 0.11061684042215347, 0.42494919896125793, -0.764801561832428, 0.055450309067964554, 0.6432258486747742, -0.12680542469024658, 0.14610296487808228, 0.4149080216884613, -0.6351786255836487, -0.42837241291999817, 0.1151999831199646, -0.649245023727417, 0.13981981575489044...
func ConstructConfiguration(configDir string) *ConfigurationObj { ConfObj := new(ConfigurationObj) absPath, err := filepath.Abs(configDir) if err != nil { fmt.Printf("\nError while calc abs path: %s", err) os.Exit(1) } _, err = os.Stat(absPath) if os.IsNotExist(err) == true { fmt.Printf("\nConfig not pres...
[ -0.23845617473125458, -0.7952619791030884, 0.6560386419296265, -0.447950154542923, -0.6234093904495239, -0.09748963266611099, 0.7498493194580078, 0.3172833025455475, -0.46576598286628723, -0.0038993661291897297, 0.024088945239782333, -0.9329025745391846, -0.09654169529676437, 0.97450119256...
func (f PolicyFunc) NeedRotate(fileState FileState) bool { return f(fileState) }
[ 0.03641081228852272, 0.41518890857696533, 0.43400418758392334, -0.5485904216766357, 0.3013664484024048, 0.7057985663414001, -0.32607001066207886, -0.4114554524421692, -0.6478197574615479, 0.051007676869630814, 0.45958223938941956, -0.02339756116271019, -0.3009553849697113, -0.1345538347959...
func SizeBasedPolicy(size int64) PolicyFunc { return func(fileState FileState) bool { return fileState.Size >= size } }
[ 0.7726688385009766, 0.05109427869319916, 0.48247918486595154, -0.5718353390693665, -0.7111772298812866, 1.0638840198516846, -0.13929063081741333, -0.3218284845352173, 0.34301990270614624, -0.024535246193408966, -0.40883153676986694, -0.4742306172847748, 0.28568196296691895, -0.849541842937...
func TimeBasedPolicy(fn func(openedAtUnix int64) bool) PolicyFunc { return func(fileState FileState) bool { return fn(fileState.OpenedAt) } }
[ -0.2536228895187378, -0.28737014532089233, 0.5065664649009705, -0.6820777654647827, 0.21177759766578674, 1.3105953931808472, -0.5568954348564148, -0.00853588804602623, -0.23598654568195343, 0.08254791796207428, -0.004342995584011078, -0.12124046683311462, 0.5619078278541565, -0.49479505419...
func (o *Knowledgeimportjobreport) String() string { o.Errors = []Knowledgeimportjoberror{{}} j, _ := json.Marshal(o) str, _ := strconv.Unquote(strings.Replace(strconv.Quote(string(j)), `\\u`, `\u`, -1)) return str }
[ 0.5543379783630371, -0.596866250038147, 0.21648046374320984, -0.3592275381088257, -0.813490092754364, 0.07377535849809647, 0.4405616521835327, -0.32185566425323486, -0.30394232273101807, 0.05669200420379639, -0.4243672788143158, 0.6370670199394226, -0.8430312871932983, -0.47143587470054626...
func (t *Trie) FindWithPrefix(p string) (counts map[string]int) { counts = make(map[string]int) charIdx := p[0] - 'a' t.children[charIdx].findWithPrefix(p, &counts) return }
[ 0.11064354330301285, -0.3913963735103607, 0.6265522241592407, -1.150518774986267, -0.5978744029998779, -0.8624786138534546, 0.46549099683761597, -0.3983769118785858, 0.06399025768041611, 0.8326284885406494, -0.29776689410209656, -0.2331981360912323, 0.48235368728637695, 0.8289633393287659,...
func (c *CIFImporter) cleanup() error { log.Println("Removing historic associations") res, err := c.db.Exec("DELETE FROM timetable.assoc WHERE enddate < NOW()::DATE") if err != nil { return err } rc, err := res.RowsAffected() if err != nil { return err } if rc > 0 { log.Printf("Removed %d as...
[ -0.3100699484348297, -0.21496030688285828, 0.8059632182121277, 0.08648452162742615, 0.3031584322452545, -0.06158483028411865, 1.3977962732315063, 0.6006709933280945, -0.4269426167011261, 0.1120300441980362, 0.21920782327651978, -0.7580491304397583, 0.234292671084404, 0.7455758452415466, ...
func (ctx UserManagement) TryGetUserInformation(username string, password string) (config.User, bool) { user, userCouldBeFound := ctx.users[username] if !userCouldBeFound || user.Password != password { return user, false } return user, true }
[ -0.7513973712921143, -0.2997775375843048, 0.37531137466430664, 0.04990852624177933, -0.23042020201683044, 0.3429684638977051, -0.052665211260318756, -1.052235722541809, 0.15089987218379974, -0.04669812321662903, 0.042528185993433, -0.5288589596748352, -0.5229485034942627, 0.293614834547042...
func (ctx UserManagement) GetUserInformation(username string, password string) config.User { user, userCouldBeFound := ctx.TryGetUserInformation(username, password) if userCouldBeFound { return user } panic("User not found") }
[ -0.2833179235458374, -0.11314156651496887, 0.254621684551239, 0.7853259444236755, 0.056230608373880386, 0.42632919549942017, -0.1096537858247757, -0.9284396171569824, -0.00784792099148035, -0.42069944739341736, -0.12514691054821014, 0.30591249465942383, -0.11330318450927734, 0.002999953925...
func selectionSort(arr []int) []int { // time complexity O(n^2) for i := 0; i < len(arr); i++ { min := i for j := i + 1; j < len(arr); j++ { if arr[min] > arr[j] { min = j } } arr[i], arr[min] = arr[min], arr[i] } return arr }
[ -0.5565515160560608, -0.9393758177757263, 0.6708347797393799, -0.09524068236351013, -0.9570031762123108, -0.1194751039147377, 0.45797741413116455, -1.5232524871826172, 1.1478251218795776, 0.4224357306957245, -0.23706310987472534, 0.6818246841430664, -0.4772474467754364, 0.3269592821598053,...
func (o Options) Validate() []error { return []error{ o.validateTLS(), } }
[ 0.029378430917859077, 0.6114416718482971, 0.5363574028015137, 0.4387677013874054, 0.8070615530014038, 0.17502811551094055, 0.048683833330869675, -0.7928669452667236, 0.21630319952964783, 0.24953892827033997, 0.30278658866882324, -0.37006640434265137, 0.341191828250885, 0.5258926749229431, ...
func (o Options) Printable() ([]byte, error) { optJSON, err := json.Marshal(o) if err != nil { return nil, errors.Wrap(err, "unable to convert config to JSON") } return optJSON, nil }
[ -0.5047369003295898, -0.20493288338184357, 0.6817549467086792, -0.5480722784996033, -0.03712105378508568, -0.7228535413742065, -0.9353516101837158, -0.7130687832832336, -0.3860529363155365, 1.6253886222839355, -0.5314843058586121, 0.6034558415412903, -0.27107927203178406, -0.46658566594123...
func (t TLSOptions) Validate() []error { var errs []error if t.MasterCert != "" && t.SkipVerify { errs = append(errs, errors.New("cannot specify a master cert file with verification off")) } return errs }
[ 0.4550163149833679, 0.6103443503379822, 0.5036967992782593, 0.4464167356491089, 0.46331703662872314, 0.47866877913475037, -0.023091956973075867, -0.07420410215854645, -0.3877421021461487, 0.760861873626709, -0.3379403054714203, -0.5329344272613525, -0.2061414122581482, 0.9831459522247314, ...
func maybeBeginWork(workState *uint32) bool { var state uint32 var done bool for !done { switch state = atomic.LoadUint32(workState); state { case stateUnstarted: done = atomic.CompareAndSwapUint32(workState, state, stateWorking) state = stateWorking case stateWorking: done = atomic.CompareAndSwapUint...
[ -0.3852095603942871, 0.2983429431915283, 0.9684246182441711, 0.03721494600176811, -0.7401149868965149, 0.3100149929523468, 0.4110599458217621, -0.7607795596122742, 0.6090406179428101, -0.3105452060699463, -0.22847996652126312, -0.8165343403816223, -0.970684826374054, 0.04704131558537483, ...
func maybeTryFinishWork(workState *uint32, again bool) bool { switch state := atomic.LoadUint32(workState); state { // Working: // If again, we know we should continue; keep our state. // If not again, we try to downgrade state and stop. // If we cannot, then something slipped in to say keep going. case stateWork...
[ -0.3644091784954071, 0.6014163494110107, 0.8054581880569458, -0.12425365298986435, -0.3736152648925781, 0.27133381366729736, -0.3593061864376068, -1.214622974395752, 0.11429593712091446, -0.26864930987358093, -0.6264764070510864, -0.9519948959350586, -1.0538216829299927, 0.0516880117356777...
func TestIntegrtionForGitHooks(t *testing.T) { assert := assert.New(t) server, requestsChan := helpers.CreateRequestRecorder(t) upstream := setupBareGitRepo(t) defer helpers.CleanupRepository(t, upstream.Path) cfgDir, cfg := setupConfig(t, upstream) defer os.RemoveAll(cfgDir) hook := setupStore(t, server.URL...
[ 0.3395354747772217, 0.6071815490722656, 0.7607877850532532, -0.4358932375907898, 0.9430356025695801, 0.6884620785713196, 0.7044546008110046, 0.18057125806808472, -0.5737304091453552, 0.6638851165771484, -0.6967241168022156, -0.28833749890327454, -0.43144115805625916, 0.21509647369384766, ...
func setupBareGitRepo(t *testing.T) *repositories.GitRepository { t.Helper() assert := assert.New(t) repoDir, err := ioutil.TempDir("", "rb-gateway-bare-repo-") assert.Nil(err) _, err = git.PlainInit(repoDir, true) assert.Nil(err) return &repositories.GitRepository{ RepositoryInfo: repositories.RepositoryIn...
[ 0.3828425705432892, 0.3618123531341553, 0.728416383266449, -1.4664256572723389, -0.007915616035461426, 0.302190363407135, 0.3786979019641876, 0.10170731693506241, 0.009343435987830162, -0.374632865190506, -0.4143546521663666, 0.4453645944595337, -0.33506685495376587, 0.5535704493522644, ...
func (e PermissionType) PLC4XEnumName() string { switch e { case PermissionType_permissionTypeNone: return "permissionTypeNone" case PermissionType_permissionTypeBrowse: return "permissionTypeBrowse" case PermissionType_permissionTypeDeleteHistory: return "permissionTypeDeleteHistory" case PermissionType_per...
[ -0.19186513125896454, -0.5506054759025574, 1.0732184648513794, -0.3935304880142212, -0.3842623829841614, -0.1705501526594162, -0.13731972873210907, 0.19891804456710815, 0.504665732383728, 0.4280826151371002, 0.3613246977329254, 0.41045838594436646, -0.6630752086639404, -0.07392633706331253...
func AggregateSnapshots(snapshots []Snapshot) Snapshot { result := createSnapshot() for _, s := range snapshots { result.mergeFrom(s) } return result }
[ -0.3399309515953064, 0.9426078200340271, 0.3537015914916992, -0.033930808305740356, 0.010117992758750916, 0.03710644319653511, -0.05372066795825958, -0.4314917325973511, 0.9938085675239563, -0.4039272964000702, 0.09044519066810608, -1.4884477853775024, 0.033639486879110336, 0.3538048267364...
func WhenAll(tasks ...Task) Task { return Run(func() (interface{}, error) { if len(tasks) == 0 { return nil, nil } var waitGroup sync.WaitGroup waitGroup.Add(len(tasks)) for _, task := range tasks { go func(task Task) { defer waitGroup.Done() _, _ = task.Result() }(task) } waitGroup.Wai...
[ 0.9934977293014526, 0.702105700969696, 0.8343059420585632, 1.1900057792663574, -0.3161001205444336, 0.4823717772960663, -0.11289992183446884, 0.47736138105392456, -0.5746875405311584, -0.04365387558937073, -0.6002819538116455, -0.289032518863678, -0.11543094366788864, 0.5730064511299133, ...
func WaitAll(tasks ...Task) { t := WhenAll(tasks...) t.Wait() }
[ 1.3815348148345947, 0.49410951137542725, 0.5875725746154785, 1.7507824897766113, -0.2569352388381958, 1.270080327987671, -0.3501102030277252, 0.7472032904624939, -0.8962079882621765, -0.5075425505638123, -0.6639638543128967, -0.2763165533542633, 0.5384476184844971, 0.7575258016586304, -0...
func WhenAny(tasks ...Task) Task { return Run(func() (interface{}, error) { if len(tasks) == 0 { return nil, nil } finished := make(chan Task) var waitGroup sync.WaitGroup waitGroup.Add(1) // perhaps add cancelation here to avoid blocking these unfinished go routines? for _, task := range tasks { ...
[ 0.19889865815639496, 0.38018062710762024, 0.9586568474769592, 1.0671038627624512, -0.0883493423461914, -0.5191521048545837, -0.13414867222309113, -0.06600292026996613, -0.6578116416931152, -0.452456533908844, -0.4268112778663635, -0.6729879379272461, -0.42233404517173767, 0.366863667964935...
func WaitAny(tasks ...Task) Task { t := WhenAny() value, err := t.Result() if err != nil { return FromError(err) } // create unwrap function? innerTask, ok := value.(Task) if !ok { return FromError(fmt.Errorf("unable to cast value to task")) } return innerTask }
[ -1.1094624996185303, -0.10957461595535278, 0.9489075541496277, 1.1296278238296509, -0.25251856446266174, -0.5172970294952393, -0.3797707259654999, 0.24563941359519958, -0.743798017501831, -0.911106288433075, -0.4283275902271271, -0.29002052545547485, 0.1330854594707489, -0.2206709831953048...