text
stringlengths
11
6.3k
embedding
listlengths
768
768
func NewManager() (*Manager, error) { sm := &Manager{ sessions: make(map[string]*client), } sm.updateCondition = sync.NewCond(&sm.mu) return sm, nil }
[ -0.6507415771484375, -0.9062137603759766, 0.3207519054412842, 0.28843626379966736, -1.5206056833267212, 0.09117551892995834, -0.4226084351539612, -0.5763993263244629, 0.3502420485019684, 0.21248164772987366, 0.03797418251633644, 0.20683762431144714, -0.6930568814277649, 1.3429005146026611,...
func (sm *Manager) HandleHTTPRequest(ctx context.Context, w http.ResponseWriter, r *http.Request) error { hijacker, ok := w.(http.Hijacker) if !ok { return errors.New("handler does not support hijack") } id := r.Header.Get(headerSessionID) proto := r.Header.Get("Upgrade") sm.mu.Lock() if _, ok := sm.session...
[ -1.0261050462722778, -0.7656717300415039, 1.047872543334961, 0.4285397529602051, 0.3499167859554291, -0.1333378702402115, -0.3575221598148346, -0.4855595529079437, -0.07717844098806381, 0.7521450519561768, -0.1497562974691391, -0.4374161660671234, -0.08032426983118057, 0.07563047111034393,...
func (sm *Manager) HandleConn(ctx context.Context, conn net.Conn, opts map[string][]string) error { sm.mu.Lock() return sm.handleConn(ctx, conn, opts) }
[ -0.49959275126457214, -0.09476634114980698, 0.38422465324401855, 0.8552170395851135, -0.07783378660678864, -0.5007739067077637, -0.8073965907096863, 0.1749807447195053, 0.14243188500404358, -1.007855772972107, -0.060218486934900284, -0.5332085490226746, 0.0468752458691597, 0.28213801980018...
func (sm *Manager) handleConn(ctx context.Context, conn net.Conn, opts map[string][]string) error { ctx, cancel := context.WithCancel(ctx) defer cancel() opts = canonicalHeaders(opts) h := http.Header(opts) id := h.Get(headerSessionID) name := h.Get(headerSessionName) sharedKey := h.Get(headerSessionSharedKey)...
[ -0.20260177552700043, -0.5567407011985779, 0.8782274723052979, 0.36728453636169434, -0.2538400888442993, -0.5225977897644043, 0.17376959323883057, -0.40685781836509705, 0.316950261592865, 0.09179960191249847, -0.22878745198249817, -0.4717269539833069, -0.6695877909660339, -0.55361562967300...
func (sm *Manager) Get(ctx context.Context, id string, noWait bool) (Caller, error) { // session prefix is used to identify vertexes with different contexts so // they would not collide, but for lookup we don't need the prefix if p := strings.SplitN(id, ":", 2); len(p) == 2 && len(p[1]) > 0 { id = p[1] } ctx, c...
[ -0.2799277901649475, -0.7985602617263794, 0.8883023858070374, -0.7876537442207336, -0.5127459764480591, -0.42668771743774414, -0.19230005145072937, -1.7248523235321045, 0.46077707409858704, 0.670842707157135, -0.06730824708938599, 0.5927954912185669, -0.75147944688797, -0.49545273184776306...
func SearchForElement(root *html.Node, tester elempred) *html.Node { stack := list.New() currElem := root for currElem != nil { if tester(currElem) == true { return currElem } for e := currElem.FirstChild; e != nil; e = e.NextSibling { stack.PushFront(e) ...
[ 0.3405972719192505, 0.3666197657585144, 0.5074589848518372, 0.474373459815979, -0.6935318112373352, 0.00485711544752121, 0.90248703956604, -0.04463735222816467, -0.08408445119857788, -0.33557167649269104, 0.6598008275032043, 0.30073457956314087, -0.374205619096756, 1.6209696531295776, 0....
func MakeFullGroupFromName(name string) string { return getHalfBySep(name, ".", 1) }
[ 0.5601853132247925, -0.35966601967811584, 0.34604373574256897, -0.25615453720092773, -1.8459854125976562, -0.1623249650001526, 0.12103388458490372, -0.2377283275127411, 0.36595648527145386, 0.2166280746459961, -0.7117030024528503, -0.08124507963657379, 0.3380800783634186, 0.525070488452911...
func MakeGroupFromFullGroup(group string) string { return getHalfBySep(group, ".", 0) }
[ 0.2688022553920746, -0.4085562229156494, 0.07747044414281845, -0.047465093433856964, -1.5823545455932617, -0.7134939432144165, 0.7117661237716675, -0.23182930052280426, 0.4729668200016022, -0.49694526195526123, -0.16434985399246216, -0.24052758514881134, 0.1515674889087677, 0.2461051642894...
func getHalfBySep(s, sep string, half uint) string { if split := strings.SplitN(s, sep, 2); len(split) == 2 && half < 2 { return split[half] } return s }
[ 0.367490291595459, -0.3159201443195343, 0.7694846987724304, 0.4832133650779724, -0.4081629812717438, -1.0571472644805908, -0.2300921380519867, -1.0850480794906616, 0.01794336549937725, -0.9143544435501099, 0.13877391815185547, 0.0586104691028595, 0.137057825922966, -0.5008265972137451, 0...
func (g generator) buildCRDDescriptionFromType(gvk schema.GroupVersionKind, kindType *markers.TypeInfo) (v1alpha1.CRDDescription, error) { // Initialize the description. description := v1alpha1.CRDDescription{ Description: kindType.Doc, DisplayName: k8sutil.GetDisplayName(gvk.Kind), Version: gvk.Version, ...
[ 0.492241770029068, -1.0848331451416016, 0.5648783445358276, -0.0750555768609047, -0.25624462962150574, -0.15974992513656616, -0.13877137005329132, -0.38996589183807373, -0.5600221157073975, 0.2685680389404297, 0.3699416518211365, 0.904826283454895, -0.06859686970710754, 1.1033117771148682,...
func findChildForDescType(info *markers.TypeInfo, typ descType) (markers.FieldInfo, error) { for _, field := range info.Fields { tags, err := structtag.Parse(string(field.Tag)) if err != nil { return markers.FieldInfo{}, err } jsonTag, err := tags.Get("json") if err == nil && jsonTag.Name == string(typ) {...
[ 0.6098881363868713, -0.6749494671821594, 0.6694536209106445, -1.214187502861023, 0.4725680947303772, -0.047772832214832306, -0.18266595900058746, -1.3025351762771606, -1.0390971899032593, -0.35157841444015503, -0.5842430591583252, -0.8247763514518738, 0.38810423016548157, 0.278701454401016...
func sortDescriptors(v interface{}) { slice := reflect.ValueOf(v) values := toValueSlice(slice) sort.Slice(values, func(i, j int) bool { return values[i].FieldByName("Path").String() < values[j].FieldByName("Path").String() }) for i := 0; i < slice.Len(); i++ { slice.Index(i).Set(values[i]) } }
[ -0.7415103316307068, -0.054542217403650284, 0.7115859985351562, -1.3860695362091064, 0.0605647936463356, -0.6952677369117737, 0.3573029339313507, -0.22057776153087616, -0.8594183921813965, 0.7110732793807983, -0.1879347860813141, 0.3139549493789673, 0.2791188061237335, 0.5559783577919006, ...
func sortDescription(v interface{}) { slice := reflect.ValueOf(v) values := toValueSlice(slice) sort.Slice(values, func(i, j int) bool { nameI := values[i].FieldByName("Name").String() nameJ := values[j].FieldByName("Name").String() if nameI == nameJ { kindI := values[i].FieldByName("Kind").String() kind...
[ -0.2418835461139679, -0.37951990962028503, 0.7913298606872559, -0.7568844556808472, -0.6362841725349426, 0.04665742814540863, 0.07154302299022675, -0.7610539197921753, -0.7744102478027344, 1.352773666381836, -0.2585088610649109, 0.7366229891777039, -0.49860864877700806, 0.8887619972229004,...
func toValueSlice(slice reflect.Value) []reflect.Value { sliceCopy := reflect.MakeSlice(slice.Type(), slice.Len(), slice.Len()) reflect.Copy(sliceCopy, slice) values := make([]reflect.Value, sliceCopy.Len()) for i := 0; i < sliceCopy.Len(); i++ { values[i] = sliceCopy.Index(i) } return values }
[ -0.8565700054168701, -0.06197429075837135, 0.7386286854743958, 0.1402503252029419, 0.35115110874176025, 0.0636100172996521, -0.4000679552555084, -0.4751826524734497, 0.07215746492147446, 1.194021224975586, -0.2682441771030426, 1.2534265518188477, 0.531825840473175, 0.5136301517486572, -0...
func (svc *basicAuthNService) ValidateToken(tokenString, kid string) (dto.CustomClaim, error) { claim := dto.CustomClaim{} kf := func(token *stdjwt.Token) (interface{}, error) { keyID := token.Header["kid"].(string) if keyID != kid { return claim, stdjwt.ErrInvalidKeyType } return []byte(svcconf.C.Auth.Se...
[ 0.3469836115837097, -0.324961394071579, 0.46328437328338623, 0.23557916283607483, -1.1624279022216797, -0.17725855112075806, -0.5134581327438354, 0.5471646785736084, 0.23079228401184082, -0.31778761744499207, -0.5273094773292542, 0.8352994918823242, 0.06447391211986542, -0.1373729556798935...
func (svc *basicAuthNService) VerifyToken(ctx context.Context, accessToken string) bool { _, err := svc.ValidateToken(accessToken, svcconf.C.Auth.AccessKID) return err == nil }
[ 0.13815607130527496, 0.2006429135799408, 0.5463584065437317, 0.20572838187217712, 0.20667678117752075, 0.14439387619495392, -0.4585559666156769, -0.04629955068230629, 0.8075003027915955, -0.9359368085861206, -0.31619352102279663, 1.1369032859802246, 0.27310118079185486, 0.6065334677696228,...
func (r *RemoteIO) SendOutput(outp ,errp io.ReadCloser) { defer outp.Close() defer errp.Close() // buf := make([]byte, 1024, 4096) chbuf:=make(chan []byte) go getOut(chbuf,outp) go getOut(chbuf,errp) for { /* var( n int err error ) select{ case n, err = outp.Read(buf): case n, err =errp.Read(buf)...
[ -0.02772417850792408, -0.6860055327415466, 0.8801119327545166, -0.11923898011445999, -0.4159579575061798, 0.17913053929805756, 1.1762502193450928, -0.6455532908439636, -0.8690617084503174, 0.3041903078556061, 0.20116619765758514, 0.29844802618026733, -0.731738269329071, 0.08639957010746002...
func Register(name string, f messageConstructorFunc) { registry[name] = f }
[ -0.062812939286232, 0.44765859842300415, 0.15107828378677368, 0.12829071283340454, -0.008622619323432446, -0.7617642879486084, 0.12623213231563568, 0.2990022301673889, -1.3750016689300537, -0.8983413577079773, -0.9583920240402222, 0.10988567769527435, 0.5650624632835388, 0.4944796562194824...
func Encode(msg Message) []byte { n := make([]byte, 0, 1000) // Make a guess at the size needed - being wrong doesn't hurt n = []byte(msg.Name()) n = append(n, Sep) b, _ := json.Marshal(msg) n = append(n, b...) return n }
[ -0.050852689892053604, 0.9660124182701111, 0.6205119490623474, 0.014547907747328281, -0.1226952075958252, -0.7439725995063782, -0.4979613125324249, -0.18871591985225677, 0.18657033145427704, 0.07121091336011887, -0.2604188621044159, 0.4711706042289734, -0.7059698104858398, 0.82572197914123...
func Decode(b []byte) (Message, error) { ix := bytes.IndexByte(b, Sep) if ix == -1 { return nil, fmt.Errorf("Message lacks a name prefix separated by '%b'", Sep) } name := string(b[:ix]) payload := b[ix+1:] // Does this message have a constructor in the registry? constructor := registry[name] if constructor...
[ -0.21642203629016876, 0.07011836022138596, 0.6825438737869263, -0.30434051156044006, -0.473937451839447, -0.8097452521324158, -0.2012149691581726, -0.48609617352485657, 0.15637704730033875, -0.16012901067733765, -0.49253618717193604, 0.1612805724143982, -1.0599955320358276, -0.046224512159...
func (r *IPPoolReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, rerr error) { ctx = context.Background() metadataLog := r.Log.WithName(ipPoolControllerName).WithValues("metal3-ippool", req.NamespacedName) // Fetch the IPPool instance. ipamv1IPPool := &ipamv1.IPPool{} if err := r.Clien...
[ -0.8735994696617126, 0.19097362458705902, 0.7883487939834595, -0.5154531598091125, 0.17033478617668152, 0.4167194664478302, -0.09397424757480621, -0.10389959067106247, 0.18151353299617767, 0.703652024269104, 0.7415193915367126, 0.6268008351325989, -0.7613095641136169, -1.0641510486602783, ...
func (r *IPPoolReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). For(&ipamv1.IPPool{}). Watches( &source.Kind{Type: &ipamv1.IPClaim{}}, handler.EnqueueRequestsFromMapFunc(r.IPClaimToIPPool), ). WithEventFilter(predicates.ResourceNotPaused...
[ -0.10213397443294525, -0.08651158958673477, 0.6582744121551514, -0.8174343705177307, -0.5223519802093506, -0.43619972467422485, 0.5410645604133606, -0.46201109886169434, 0.3366910517215729, -0.026255851611495018, 0.22194945812225342, 0.03371024876832962, 0.4581774175167084, 0.9147673249244...
func (r *IPPoolReconciler) IPClaimToIPPool(obj client.Object) []ctrl.Request { if m3ipc, ok := obj.(*ipamv1.IPClaim); ok { if m3ipc.Spec.Pool.Name != "" { namespace := m3ipc.Spec.Pool.Namespace if namespace == "" { namespace = m3ipc.Namespace } return []ctrl.Request{ { NamespacedName: types....
[ -0.9103831052780151, -0.5757409930229187, 0.6474170088768005, -0.6849094033241272, 0.2736767828464508, 0.8182963132858276, -0.15051287412643433, -0.3521134555339813, 0.966278076171875, 0.4808794856071472, 0.1614684760570526, 0.7945956587791443, -0.49567949771881104, -0.5051947832107544, ...
func Extend(client *golangsdk.ServiceClient, id string, opts ExtendOpts) (err error) { body, err := build.RequestBody(opts, "") if err != nil { return } // POST /v1.0/{project_id}/instances/{instance_id}/extend _, err = client.Post(client.ServiceURL("instances", id, "extend"), body, nil, &golangsdk.RequestOpts{...
[ -0.8786155581474304, 0.719584047794342, 0.4879298508167267, -0.07037672400474548, -0.3503912389278412, 0.736331045627594, -0.5951758623123169, 0.625991940498352, 0.3172563910484314, 0.30401208996772766, -0.6108813285827637, 1.6578127145767212, -1.3151944875717163, -0.07209034264087677, 0...
func Convert(pipelineStates []PipelineState) []Project { projects := make([]Project, 0) for _, pipeline := range pipelineStates { for _, stage := range pipeline.StageStates { projects = append(projects, Project{ Name: buildName(pipeline.Name, stage), LastBuildStatus: buildLastBuildStatu...
[ -0.9793075919151306, -0.49869081377983093, 0.6142457723617554, -0.2515348792076111, 0.19020894169807434, 0.618067741394043, 0.18064925074577332, 0.03441278636455536, 1.0730984210968018, 0.6358182430267334, -0.1351710855960846, -0.39132770895957947, 0.08527597784996033, -0.4690147340297699,...
func readInput(filename string) []string { var input []string f, _ := os.Open(filename + ".txt") scanner := bufio.NewScanner(f) for scanner.Scan() { input = append(input, scanner.Text()) } return input }
[ -0.8113241195678711, -0.7162932753562927, 0.8080462217330933, -0.21057580411434174, -0.36683616042137146, 1.7907564640045166, -0.19550290703773499, 1.0064352750778198, -0.9776545763015747, 0.22543811798095703, 0.12610824406147003, 0.5632923245429993, -0.448855996131897, 0.03786734119057655...
func GetStatic() (http.FileSystem, error) { return fs.New() }
[ -0.44634565711021423, 0.11543189734220505, 0.37936460971832275, 0.8835169672966003, 0.22544437646865845, -1.066634178161621, 0.056330740451812744, -1.0470151901245117, -0.2874434292316437, -1.8211150169372559, -0.3280441462993622, 0.5395936369895935, 0.5939001441001892, -0.3653824627399444...
func (s *MyStatic) AddFilter(name string, f FilterFunc) { s.filters[name] = f return }
[ -0.8153203725814819, 0.22548459470272064, 0.3155166804790497, 0.5470035076141357, -0.7453887462615967, -0.09399476647377014, -0.863860011100769, -0.12724743783473969, -0.6347787380218506, -0.42776015400886536, -0.5868045091629028, 0.4422820806503296, 0.8978942036628723, 0.4780360162258148,...
func (f *FI) Name() string { return f.name }
[ -0.3367137312889099, -0.5483355522155762, 0.3516620397567749, 0.4432482123374939, -0.5570278167724609, -0.06921911239624023, 0.38602718710899353, 0.008330502547323704, -1.2808974981307983, 0.3524593710899353, -0.46233099699020386, -0.1596841663122177, 0.12071272730827332, -0.05731010809540...
func IsMatchStrs(str string, regStrs []string) (bool, error) { var err error if len(regStrs) == 0 { return true, nil } re, err := CompileStrs(regStrs) if err != nil { return false, err } return re.MatchString(str), nil }
[ -0.21241217851638794, -0.44929954409599304, 0.575527012348175, 0.5273327827453613, 0.3165089786052704, -0.13332736492156982, -0.1487118899822235, 0.12188554555177689, 0.7305052280426025, 0.15631003677845, 0.4906260371208191, 1.0617672204971313, -0.6787297129631042, -0.2573586106300354, -...
func CompileStrs(regStrs []string) (*regexp.Regexp, error) { if len(regStrs) == 0 { return nil, fmt.Errorf("regStrs must be greater than or equal to 1") } regStr := "(" + strings.Join(regStrs, "|") + ")" re, err := regexp.Compile(regStr) if err != nil { return nil, err } return re, nil }
[ -0.6845417618751526, -0.14060130715370178, 0.30299556255340576, 0.158610999584198, -0.013234383426606655, 0.1781957447528839, 0.05715616047382355, 0.2970373332500458, 0.31819215416908264, 0.06948916614055634, 0.7076845169067383, 0.2631470263004303, -1.1096893548965454, 0.1502230018377304, ...
func ScanWrite(scanner *bufio.Scanner, writer io.Writer, print bool) { for scanner.Scan() { t := scanner.Text() fmt.Fprintf(writer, "%s\n", t) if print { fmt.Println(t) } } if err := scanner.Err(); err != nil { fmt.Fprintln(os.Stderr, err) } }
[ -0.23721951246261597, -0.7046372294425964, 0.48837265372276306, 0.33513692021369934, 0.019643567502498627, -0.33989694714546204, -0.22211454808712006, 0.20270110666751862, -0.562711775302887, 0.06481069326400757, 0.4800143837928772, -0.04713355377316475, 0.29791393876075745, 0.025480698794...
func ScanPrintStdout(scanner *bufio.Scanner, print bool) { for scanner.Scan() { if print { fmt.Fprintf(os.Stdout, "%s\n", scanner.Text()) } } if err := scanner.Err(); err != nil { fmt.Fprintln(os.Stderr, err) } }
[ 0.7886854410171509, -0.668999433517456, 0.7453515529632568, -0.020578669384121895, -1.0756648778915405, -0.15025854110717773, -0.5584862232208252, -0.2126350849866867, -0.28192591667175293, -0.280429482460022, 0.8360500335693359, 0.34020549058914185, 0.14323341846466064, 0.4577900171279907...
func ScanPrintStderr(scanner *bufio.Scanner, print bool) { for scanner.Scan() { if print { fmt.Fprintf(os.Stderr, "%s\n", scanner.Text()) } } if err := scanner.Err(); err != nil { fmt.Fprintln(os.Stderr, err) } }
[ 0.09605418145656586, -0.8840031027793884, 0.4820159673690796, -0.0008091405034065247, -0.865623950958252, 0.5073801875114441, -0.8237056732177734, -0.12732484936714172, 0.16728393733501434, -0.35459622740745544, 0.9698432683944702, 0.3833955228328705, -0.1348796933889389, 0.752088785171508...
func ReadToBuf(scanner *bufio.Scanner) (*bytes.Buffer, error) { buf := new(bytes.Buffer) for scanner.Scan() { buf.WriteString(scanner.Text()) } if err := scanner.Err(); err != nil { return nil, err } return buf, nil }
[ 0.5637648701667786, -0.42461830377578735, 0.3244321644306183, -0.4177956283092499, -0.4555385112762451, 0.6260401010513306, 0.4028838872909546, 0.19247758388519287, -0.7669118046760559, -0.7540385723114014, -0.21861103177070618, -0.13782189786434174, -0.42917346954345703, 0.048818204551935...
func BaseName(path string) string { base := filepath.Base(path) ext := filepath.Ext(path) re := regexp.MustCompile(ext + "$") return re.ReplaceAllString(base, "") }
[ 0.8592604994773865, -0.9309887290000916, 0.740230917930603, 0.3413984179496765, -0.836209774017334, 0.5342277884483337, -0.09227922558784485, 1.075188159942627, 0.019438020884990692, 1.3480939865112305, 0.006208873353898525, -0.30976593494415283, -0.3379186689853668, -0.5715705156326294, ...
func GetCmdPath(cmd string) (string, error) { if filepath.IsAbs(cmd) { return cmd, nil } return exec.LookPath(cmd) }
[ 0.9973103404045105, -0.33840635418891907, 0.5673322081565857, 0.7283147573471069, -0.23616231977939606, 0.8430988788604736, 0.341622531414032, -1.0173426866531372, 0.604401171207428, -0.03321583941578865, 1.060052514076233, 0.1206684559583664, 0.33338019251823425, 1.3404477834701538, 0.8...
func GetGlobArgs(args []string) ([]string, error) { var a []string for _, v := range args { files, err := filepath.Glob(v) if err != nil { return nil, err } a = append(a, files...) } return a, nil }
[ -0.5814194679260254, 0.7063286900520325, 0.9361783266067505, 1.0027049779891968, 0.8074839115142822, 1.0924140214920044, 0.5676998496055603, -0.25402694940567017, -0.6498783230781555, 1.023048758506775, 0.4463057518005371, 0.6832180023193359, -1.4064452648162842, 1.1959304809570312, -0.2...
func NewCmd(cmdLine string) (*Cmd, error) { parseCmd, err := shellwords.Parse(cmdLine) if err != nil { return nil, err } return &Cmd{Cmd: exec.Command(parseCmd[0], parseCmd[1:]...)}, nil }
[ 0.7089457511901855, -0.8443422913551331, 0.3542407751083374, 0.07748284190893173, -0.25773099064826965, 0.43821969628334045, -0.13926979899406433, 0.11890724301338196, 0.09382541477680206, -1.0438556671142578, 0.2399081140756607, 0.2091730237007141, -0.07881896942853928, 0.2836222350597381...
func (c *Cmd) CmdWait() { c.Wg.Wait() c.ExitError = c.Cmd.Wait() c.GetExitCode() }
[ 0.3008626699447632, -1.0931979417800903, 0.3553110361099243, -0.38808467984199524, 0.33158236742019653, 0.8959078788757324, -0.03706694394350052, -0.09247326105833054, -0.8007240295410156, -0.6503236889839172, 0.19969090819358826, 0.3997764587402344, 0.7274547219276428, 0.5928633213043213,...
func (c *Cmd) GetExitCode() { c.ExitCode = 1 if c.ExitError != nil { if c.Cmd.ProcessState != nil { if status, ok := c.Cmd.ProcessState.Sys().(syscall.WaitStatus); ok { c.ExitCode = status.ExitStatus() } } } else { c.ExitCode = 0 } }
[ 0.49717676639556885, -0.6095085740089417, 0.620236873626709, 0.5513915419578552, 0.5008038282394409, -0.5720174908638, -0.017753513529896736, 1.5196301937103271, -0.5722867846488953, -0.048640165477991104, 0.3102513551712036, 0.339613676071167, 0.11146587878465652, 1.48335862159729, 0.99...
func PP(a ...interface{}) (int, error) { return pp.Println(a...) }
[ -0.44448986649513245, 0.31470638513565063, 0.8655406832695007, 0.6798977255821228, -1.0707634687423706, -0.25447878241539, -0.09885156899690628, -0.40353521704673767, 0.15727049112319946, 0.0748240053653717, 0.48297953605651855, 0.09402342140674591, -0.5046049356460571, 0.44404253363609314...
func PPf(format string, a ...interface{}) (int, error) { return pp.Printf(format, a...) }
[ -0.039572637528181076, 0.052194688469171524, 0.7618902921676636, -0.39121368527412415, -0.5316979289054871, -0.921154260635376, 0.6213130950927734, 0.1808808147907257, -0.6928499341011047, -0.5111901760101318, 0.2783959209918976, 0.7160433530807495, -0.34483471512794495, 0.0651181638240814...
func (s *Service) Parent() eh.ReadRepo { return nil }
[ 0.4209997355937958, 0.32262662053108215, 0.4847421646118164, -0.3327208161354065, -0.4646151661872864, -0.3806878626346588, 0.5287381410598755, -0.1150926873087883, 0.17139193415641785, -1.5554362535476685, 1.0369418859481812, -0.3298672139644623, -0.42270952463150024, -0.04811994358897209...
func (s *Service) Find(ctx context.Context, uuid eh.UUID) (eh.Entity, error) { l, err := s.service.Find(ctx, string(uuid)) if err != nil { if err == logs.ErrLogNotFound { return nil, eh.RepoError{ Err: eh.ErrEntityNotFound, } } return nil, err } ll := &Log{ UUID: eh.UUID(l.UUID), User: ...
[ -0.006465598940849304, -0.32076743245124817, 0.5514735579490662, -0.6096125841140747, 0.1380901038646698, 0.387675017118454, -0.448163241147995, -0.5877770781517029, -0.5244560837745667, 0.3208658695220947, 0.5403080582618713, 0.3976409137248993, -0.7916510701179504, 0.7567020058631897, ...
func (s *Service) FindAll(ctx context.Context) ([]eh.Entity, error) { return nil, errors.New("not implemented") }
[ 0.21891915798187256, -0.038171619176864624, 0.5942662358283997, 1.0133734941482544, 0.9739810824394226, 1.0423532724380493, -0.31725355982780457, -0.007799375336617231, 0.32769519090652466, -0.01552483718842268, 0.5185111165046692, 0.6121691465377808, -0.016338204964995384, 1.7326450347900...
func (s *Service) Save(ctx context.Context, entity eh.Entity) error { ll, ok := entity.(*Log) if !ok { return errors.New("model is of incorrect type") } l := logs.Log{ UUID: string(ll.UUID), User: ll.User, Content: ll.Content, CreatedAt: ll.CreatedAt, UpdatedAt: ll.UpdatedAt, } return s....
[ -0.7406638860702515, -0.10409905016422272, 0.6354565620422363, -0.21730777621269226, 0.1258862316608429, 0.5463829636573792, -0.3651766777038574, -0.7419913411140442, -0.6452776193618774, 0.8263154029846191, -0.7951437830924988, 0.1289844512939453, -0.1319017857313156, 0.7648227214813232, ...
func (s *Service) Remove(ctx context.Context, uuid eh.UUID) error { return s.service.Delete(ctx, string(uuid)) }
[ -0.7282562255859375, -0.10232044756412506, 0.22558389604091644, -0.3054993748664856, -0.6511698961257935, -0.12674842774868011, -0.6055660843849182, 1.140566349029541, 0.6124300360679626, 0.2769858241081238, -0.1793038696050644, 0.4397830665111542, -0.7721399664878845, -0.02682156860828399...
func (o *TriggerVCenterDataCollectionUsingPUTReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewTriggerVCenterDataCollectionUsingPUTOK() if err := result.readResponse(response, consumer, o.formats); err != nil { ...
[ -0.15043772757053375, -0.8300958275794983, 0.7351046800613403, 0.12455223500728607, -0.16006635129451752, -1.0537666082382202, 0.5106256604194641, -0.0500480979681015, 0.37557533383369446, 0.3642425835132599, 0.0984572246670723, -0.7397359013557434, -1.1990509033203125, -0.521133542060852,...
func NewTriggerVCenterDataCollectionUsingPUTOK() *TriggerVCenterDataCollectionUsingPUTOK { return &TriggerVCenterDataCollectionUsingPUTOK{} }
[ -0.34936413168907166, 0.16509337723255157, 0.3109777271747589, -0.09742489457130432, -0.7028989791870117, -0.6218917965888977, 0.8909209370613098, 0.6831604838371277, -0.5907914042472839, 0.33145880699157715, -0.47440585494041443, -0.6964761018753052, -0.4374450445175171, -0.36125862598419...
func NewTriggerVCenterDataCollectionUsingPUTCreated() *TriggerVCenterDataCollectionUsingPUTCreated { return &TriggerVCenterDataCollectionUsingPUTCreated{} }
[ 0.2602130174636841, 0.2506966292858124, 0.1930420994758606, -0.4057847857475281, -0.11482556164264679, -0.2975688576698303, 0.643634557723999, 0.27547091245651245, -0.2518383264541626, -0.5272421836853027, -0.4263918101787567, -0.636792004108429, -0.8552337288856506, -0.29168030619621277, ...
func NewTriggerVCenterDataCollectionUsingPUTUnauthorized() *TriggerVCenterDataCollectionUsingPUTUnauthorized { return &TriggerVCenterDataCollectionUsingPUTUnauthorized{} }
[ -0.7669492959976196, 0.25969287753105164, 0.40613454580307007, -0.04624335840344429, -1.161297082901001, -0.3336711823940277, 0.20994128286838531, 1.1692315340042114, -0.08756599575281143, -0.6789699196815491, -0.5220454335212708, 0.6288993954658508, -0.7067463397979736, -0.877324223518371...
func NewTriggerVCenterDataCollectionUsingPUTForbidden() *TriggerVCenterDataCollectionUsingPUTForbidden { return &TriggerVCenterDataCollectionUsingPUTForbidden{} }
[ 0.00948339980095625, 0.6355888843536377, 0.516247034072876, -0.07029324769973755, -0.9958196878433228, -0.09315890818834305, 0.7355924248695374, 0.1420874297618866, -0.33477911353111267, -0.08429355919361115, -0.4176909029483795, -0.12438520044088364, -1.1407172679901123, -1.01953971385955...
func NewTriggerVCenterDataCollectionUsingPUTNotFound() *TriggerVCenterDataCollectionUsingPUTNotFound { return &TriggerVCenterDataCollectionUsingPUTNotFound{} }
[ -0.3591935634613037, -0.6743703484535217, 0.3693944811820984, -0.6925598978996277, -0.3042343556880951, -0.16702212393283844, 0.8923543691635132, 0.4324757158756256, -0.005822198465466499, -0.22761014103889465, -0.6626701951026917, -0.10744518786668777, -0.8624762296676636, -0.601989090442...
func createFeedsManager(t *testing.T, orm feeds.ORM) int64 { mgr := &feeds.FeedsManager{ URI: uri, Name: name, PublicKey: publicKey, JobTypes: jobTypes, IsOCRBootstrapPeer: false, } id, err := orm.CreateManager(context.Background(), mgr) require.NoError(t, ...
[ -0.028321368619799614, -0.22404657304286957, 0.4334295392036438, -0.3288458585739136, -0.002562320791184902, -0.6372551321983337, -0.5026016235351562, -0.8179976344108582, 0.2685548663139343, -0.7649611830711365, -0.5868342518806458, 0.11055076867341995, -1.2131569385528564, 1.060672283172...
func NewResourceMapper(resolver Resolver) ResourceMapper { return &resourceMapper{ res: resolver, } }
[ -0.8328642845153809, -1.097846508026123, -0.20337972044944763, 0.48120924830436707, -1.3567640781402588, -0.6303752660751343, 0.00011034934141207486, -0.5888224840164185, 1.2972382307052612, -0.2519092559814453, -0.7410743832588196, -1.6069591045379639, -0.2518754005432129, 0.4821555018424...
func (m *resourceMapper) MapResource(ctx context.Context, spec authz.SubjectAccessReviewSpec) (string, []webhook.AthenzAccessCheck, error) { var verb, namespace, group, resource, sub, name string if spec.ResourceAttributes != nil { name = spec.ResourceAttributes.Name namespace = spec.ResourceAttributes.Namespace...
[ -0.39882826805114746, -0.8894169330596924, 0.7383237481117249, 0.0249367393553257, -1.0679311752319336, 0.41959160566329956, 0.3308306932449341, -0.6649918556213379, 0.9472052454948425, 0.7244055271148682, 0.9024049639701843, 0.09085594862699509, -0.24866878986358643, 0.83580082654953, 0...
func (m *resourceMapper) createAdminAccessCheck(accessCheckParam athenzAccessCheckParam) []webhook.AthenzAccessCheck { accessChecks := make([]webhook.AthenzAccessCheck, len(accessCheckParam.domains)+1) for i, domain := range accessCheckParam.domains { accessChecks[i] = webhook.AthenzAccessCheck{ Resource: m.res....
[ 0.21437744796276093, -0.7561517357826233, 0.8333479762077332, -0.23120254278182983, -0.33454057574272156, 0.23862817883491516, 0.527102530002594, -0.07772675901651382, 0.03569922596216202, 0.20562829077243805, 0.41270774602890015, 0.4416791498661041, 0.5057056546211243, 1.3095046281814575,...
func (m *resourceMapper) createAccessCheck(accessCheckParam athenzAccessCheckParam) []webhook.AthenzAccessCheck { accessChecks := make([]webhook.AthenzAccessCheck, 0, len(accessCheckParam.domains)) for _, domain := range accessCheckParam.domains { accessChecks = append(accessChecks, webhook.AthenzAccessCheck{ ...
[ 0.06988444924354553, -0.9987176656723022, 0.6673145890235901, 0.11567652970552444, 0.20654281973838806, 0.09396596997976303, 0.9478104710578918, 0.18959729373455048, -0.330655574798584, 0.23161591589450836, 0.5049499869346619, -0.24265162646770477, 0.5659254789352417, 1.0694445371627808, ...
func (httpcalls) Login(url string, jsonData []byte, client http.Client) (*http.Response, error) { req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData)) req.Header.Add("Accept", "application/json") req.Header.Add("Content-type", "application/json") resp, err := client.Do(req) return resp, err }
[ -0.8762929439544678, 0.09276231378316879, 1.0802979469299316, -0.43319013714790344, -0.8557966351509094, 0.47566476464271545, -1.0993636846542358, -0.6770561337471008, -0.22177033126354218, -0.01778540015220642, -1.3252625465393066, 0.8604292273521423, -0.6215406060218811, -0.2361946105957...
func (httpcalls) PrometheusMetricsScrape(url string, client http.Client) (*http.Response, error) { req, err := http.NewRequest("GET", url, nil) resp, err := client.Do(req) return resp, err }
[ -0.6591596007347107, 0.736707329750061, 0.9749860763549805, 0.0873788520693779, -0.4215630292892456, 0.417199969291687, -0.6123676300048828, -0.6263582110404968, -0.20968511700630188, 0.7585883140563965, -0.3182276785373688, 0.6612418293952942, -1.2728939056396484, -0.7265966534614563, 0...
func DCOSLogin(jsonConfig *system.JSON, remote common.DCOSCalls) string { skip := false timeout := time.Duration(5 * time.Second) client := http.Client{ Timeout: timeout, } url := jsonConfig.ServiceDiscovery.Login.Url username := jsonConfig.ServiceDiscovery.Login.Username password := jsonConfig.ServiceDiscover...
[ -1.0624001026153564, 0.1948987990617752, 0.821382999420166, -0.3106516897678375, -1.2523642778396606, 0.25973978638648987, -0.24016472697257996, -0.9045845866203308, -0.29357975721359253, 0.14200517535209656, -1.1592012643814087, 0.1223236471414566, -0.6604202389717102, -0.5041500926017761...
func (httpcalls) ServiceDiscovery(token string, url string, client http.Client) (*http.Response, error) { req, err := http.NewRequest("GET", url, nil) if err != nil { return nil, err } req.Header.Add("Authorization", "token="+token) req.Header.Add("Content-type", "application/json") req.Header.Add("Accept", "ap...
[ -0.3777783215045929, 0.34118905663490295, 0.8256449699401855, -0.265428751707077, -0.008506478741765022, -0.4511747658252716, -0.7148483991622925, -0.5861320495605469, -0.8190776705741882, 0.036225900053977966, -0.9862594604492188, 0.6108759641647339, -0.6092254519462585, 0.233405038714408...
func GetServiceList(token string, url string, appPort string, appId string, remote common.DCOSCalls) ([]string, error) { var urlList []string exposedPort := appPort portLocation := -1 timeout := time.Duration(5 * time.Second) client := http.Client{ Timeout: timeout, } resp, err := remote.ServiceDiscovery(toke...
[ -0.30171850323677063, 0.060465700924396515, 1.1305872201919556, 0.4055107533931732, 0.13707436621189117, 0.32234469056129456, 0.40972113609313965, -0.5918935537338257, -0.04597979038953781, 0.3912184536457062, 0.10027683526277542, 0.2922150790691376, -0.49069634079933167, 0.936184465885162...
func PollDCOS(ConfigObject *common.Config, aggregateFile string, forever bool) { duration := ConfigObject.JsonConfig.ServiceDiscovery.Scrape_interval token := DCOSLogin(&ConfigObject.JsonConfig, hrc) serviceType := ConfigObject.JsonConfig.ServiceDiscovery.Type // Setup storage dir common.SetupStorage(ConfigObject,...
[ -0.8881416320800781, 0.0846150815486908, 1.073451280593872, -0.04375164210796356, 0.2914554476737976, 0.4243343472480774, 0.5634323954582214, -0.3858852982521057, -0.359817773103714, 0.22169359028339386, 0.15725386142730713, -0.5918596386909485, 0.33585286140441895, 0.27774426341056824, ...
func PollLocal(ConfigObject *common.Config, aggregateFile string, forever bool) { duration := ConfigObject.JsonConfig.LocalMetrics.Scrape_interval serviceType := ConfigObject.JsonConfig.LocalMetrics.Type // Setup storage dir common.SetupStorage(ConfigObject, serviceType, aggregateFile) for { if len(ConfigObject....
[ -0.1664087474346161, -0.18623140454292297, 0.8763594627380371, -0.0811224952340126, 0.45068955421447754, 0.8096193671226501, 0.6517311334609985, 0.14852452278137207, -1.0732402801513672, 0.45249417424201965, 0.16490450501441956, -0.2162478119134903, -0.1718895584344864, 0.714704155921936, ...
func ParseJSONFromReq(r *http.Request, m interface{}) error { return json.NewDecoder(r.Body).Decode(m) }
[ -1.1827789545059204, -0.6962271928787231, 0.5742378234863281, -0.6228488087654114, -0.6695541143417358, -0.27015379071235657, -0.8943710327148438, -0.4376765191555023, 0.11669175326824188, 0.4082528054714203, -0.21086600422859192, 0.12252597510814667, 0.15623082220554352, 0.746792018413543...
func (ls LabelsAdapter) MarshalJSON() ([]byte, error) { labelsMap := make(map[string]string, len(ls)) for _, l := range ls { labelsMap[l.Name] = l.Value } return json.Marshal(labelsMap) }
[ -1.3421458005905151, -1.0201852321624756, 0.3623170256614685, -0.9645219445228577, -1.6515318155288696, -0.06571938097476959, -0.9279578328132629, 0.6552091240882874, 0.7306650280952454, 0.8849819898605347, 0.009344825521111488, 0.48773616552352905, 0.4843423366546631, 1.2502025365829468, ...
func (ls *LabelsAdapter) UnmarshalJSON(b []byte) error { var m map[string]string if err := json.Unmarshal(b, &m); err != nil { return err } *ls = make([]LabelAdapter, 0, len(m)) for k, v := range m { *ls = append(*ls, LabelAdapter{Name: k, Value: v}) } slices.SortFunc(*ls, func(a, b LabelAdapter) bool { re...
[ -1.3497892618179321, -0.6175756454467773, 0.7368221282958984, -1.4912596940994263, -1.6531535387039185, -0.15115132927894592, -0.1389598846435547, -0.212345689535141, -0.18621623516082764, 0.8285155892372131, -0.15927542746067047, 0.27915409207344055, 0.05757177993655205, 0.925353229045867...
func (m *LabelAdapter) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPush } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ ...
[ -0.5199506282806396, -0.36070942878723145, 0.9278452396392822, -0.5864687561988831, -1.202254056930542, 0.2661508619785309, 0.4476102590560913, -0.387484610080719, 0.18098561465740204, 0.6166499853134155, 0.12818129360675812, 0.3509960174560547, -0.5066971182823181, 0.23147253692150116, ...
func getstring(org string) string { result := "" // it is a little status machine( IN ESPCAE: '"...\', NOT IN ESPCE: '"...'( // mormal string that do not have char '\') IN_ESPCAE_STATUS := false for _, v := range org[1 : len(org)-1] { if IN_ESPCAE_STATUS { // if now in espcae status, it will espcae char '\', ...
[ -0.3814314603805542, -0.47218093276023865, 0.7485650777816772, 0.03164681792259216, -0.4759596884250641, 0.1753806471824646, 0.10385725647211075, 0.3197328746318817, -0.09564552456140518, 0.44097232818603516, 0.641315758228302, 0.7380037903785706, -0.320462167263031, 0.27523937821388245, ...
func (l *GoLex) Lex(lval *yySymType) int { for l.pos < len(l.input) { // get the next Rune(part of string) and its length r, n := utf8.DecodeRune(l.input[l.pos:]) // if it is a space, then skip it. if unicode.IsSpace(r) && r != '\n' { l.pos += n continue } switch { case re[SREACH].Match(l.input[l.p...
[ 0.035327427089214325, -0.16160519421100616, 1.0072325468063354, -0.5274503231048584, -1.1207422018051147, -0.4310356378555298, 0.02245298959314823, 0.3718467652797699, -0.11880038678646088, -0.4298487603664398, -0.2133738398551941, -0.1528157740831375, -0.965954065322876, 0.257118135690689...
func (l *GoLex) Error(s string) { fmt.Printf(" | syntax error: %s\n", s) }
[ 0.6784194111824036, -0.3248365819454193, 0.27111899852752686, -0.19630692899227142, 0.20381207764148712, 0.6856819987297058, -0.4897339940071106, 0.6383411288261414, -0.700958251953125, -0.23893892765045166, 0.11995647847652435, 1.5324031114578247, -0.1967233121395111, 0.08517193794250488,...
func GetAST(s string) *AST { if s == "" { return nil } yyParse(&GoLex{input: []byte(s)}) // [WARNING] ast_result is a global variable return ast_result }
[ 0.4974862337112427, -0.8209138512611389, 0.4872305393218994, -0.4823244512081146, -0.9172180891036987, -0.7085935473442078, -0.8129599690437317, 0.0986514762043953, 1.0588937997817993, -0.7218599319458008, -0.6616577506065369, 1.080976128578186, 0.0726580023765564, -0.1081542819738388, 0...
func New() *App { return &App{} }
[ 0.22297413647174835, -1.391117811203003, -0.24867910146713257, 0.6257871985435486, -1.1883913278579712, 0.5542667508125305, -0.04277009889483452, -0.3416232466697693, -0.012613705359399319, -0.35332149267196655, -0.29315996170043945, 0.15253111720085144, 0.7870513796806335, 0.2563552558422...
func (app *App) Address(addr string) *App { app.Addr = addr return app }
[ 0.24521790444850922, -1.0212326049804688, 0.4923763573169708, 0.44401419162750244, -1.3958868980407715, 1.7900968790054321, 0.07275091111660004, 0.7201102375984192, 1.9411488771438599, 0.2149108648300171, 0.22441771626472473, 0.6291928291320801, 0.4845955967903137, 1.2726948261260986, 0....
func (app *App) Handler(h http.Handler) *App { app.handler = h return app }
[ 0.40107524394989014, -0.013300104066729546, 0.2523336410522461, 1.095920443534851, -0.29706618189811707, 1.692268967628479, 0.31191790103912354, 0.893795907497406, 0.6567696928977966, -1.160382866859436, -0.65973961353302, 0.12197087705135345, 1.280151128768921, 0.7414566874504089, 0.082...
func (app *App) BeforeRender(m middleware.Middleware) *App { app.beforeRender = m return app }
[ 0.942156195640564, 0.45926812291145325, 0.39136484265327454, 0.28364723920822144, -0.786345899105072, 0.4286106824874878, -1.0671097040176392, 0.5612075924873352, 1.0651434659957886, -0.3302079737186432, 0.24565067887306213, -0.7534617781639099, -1.2936413288116455, 1.3544108867645264, -...
func (app *App) ListenAndServe() error { if app.gracefulShutdown != nil { return app.GracefulShutdown().ListenAndServe() } return app.listenAndServe() }
[ 0.7118032574653625, -1.1934205293655396, 0.5607971549034119, 0.8210601806640625, 0.5438361167907715, 0.22714558243751526, -0.5864023566246033, 0.3974224328994751, 0.21832159161567688, -0.08197277784347534, 0.6190730929374695, -0.9665226340293884, -0.33438393473625183, 0.3212760090827942, ...
func (app *App) TLS(certFile, keyFile string) *App { cert, err := tls.LoadX509KeyPair(certFile, keyFile) if err != nil { panic("hime: load key pair error; " + err.Error()) } if app.TLSConfig == nil { app.TLSConfig = &tls.Config{} } app.TLSConfig.Certificates = append(app.TLSConfig.Certificates, cert) return...
[ 1.0553044080734253, 0.568304717540741, 0.37253496050834656, -0.3790566921234131, -1.0694952011108398, 0.7670210599899292, -0.7710815072059631, 0.30730634927749634, -0.04598427563905716, 0.23667708039283752, 0.08053641021251678, -0.8617867827415466, 0.2338210791349411, -0.01616530492901802,...
func (app *App) GracefulShutdown() *GracefulShutdownApp { if app.gracefulShutdown == nil { app.gracefulShutdown = &gracefulShutdown{} } return &GracefulShutdownApp{ App: app, gracefulShutdown: app.gracefulShutdown, } }
[ 1.143817663192749, 0.005893199238926172, 0.7486132383346558, 0.8349496722221375, -0.5050240159034729, 1.0703250169754028, 0.32191264629364014, 0.44256392121315, 0.4690207839012146, -0.11419369280338287, -0.0005168237257748842, -0.456465482711792, 0.25618308782577515, -0.17389044165611267, ...
func Test(t *testing.T) { TestingT(t) }
[ 0.5603705644607544, 0.47240784764289856, 0.14808350801467896, 0.21293595433235168, 0.38073426485061646, 0.712630569934845, 1.494964361190796, -0.18387949466705322, -0.4030367434024811, 0.012481830082833767, -0.6709293127059937, -0.1728723794221878, -0.05282559245824814, 0.4567270874977112,...
func NewRole() *Role { t := &Role{ Permissions: []string{}, } return t }
[ 0.2654419243335724, 0.19594652950763702, 0.17881406843662262, 0.7814573049545288, -0.30074629187583923, -0.5565038323402405, -0.31199973821640015, -0.45613160729408264, 0.07110434770584106, -0.8005070686340332, 0.14436820149421692, 0.3910576403141022, -0.7681817412376404, -0.07964727282524...
func (t *Role) Merge(t1 *Role) error { if t1.ID != "" { t.ID = t1.ID } if t1.Name != "" { t.Name = t1.Name } if t1.Domain != "" { t.Domain = t1.Domain } t.Permissions = t1.Permissions return nil }
[ -1.1518503427505493, 0.18998481333255768, 0.5718355178833008, -0.5804617404937744, 0.34158816933631897, 0.2837217152118683, -1.0323739051818848, 0.07466582208871841, -0.5999723672866821, -0.2388887256383896, -0.9668818712234497, -0.23741135001182556, -0.5974525809288025, 0.3745515346527099...
func NewBindingWorkSubscriber(dao dao.Dao) *BindingWorkSubscriber { return &BindingWorkSubscriber{dao: dao} }
[ -0.0900401696562767, 0.48108425736427307, 0.0750228762626648, 0.6275678277015686, -0.9431378245353699, 0.3317418098449707, 0.06980418413877487, -0.022810369729995728, -0.29422470927238464, -0.5790323615074158, -0.3278147280216217, -0.4620586037635803, 0.05700100585818291, 0.868089973926544...
func (b *BindingWorkSubscriber) Subscribe(msgBuffer <-chan JobMsg) { go func() { log.Info("Listening for binding messages") for msg := range msgBuffer { log.Debug("Processed binding message from buffer") if _, err := b.dao.SetState(msg.InstanceUUID, msg.State); err != nil { log.Errorf("failed to set stat...
[ -0.031453728675842285, -0.12994946539402008, 0.5694245100021362, 0.2816494107246399, 0.42121630907058716, 0.287537157535553, 0.3982941508293152, 0.33151745796203613, -0.36337101459503174, -0.2034492939710617, -0.7243930697441101, 0.30866023898124695, -0.6379854083061218, 1.1139394044876099...
func (ptr *KeyholeInfo) Log(s string) { ptr.Logs = append(ptr.Logs, fmt.Sprintf(`%v %v`, time.Now().Format(time.RFC3339), s)) }
[ 0.1873142421245575, 0.37175053358078003, 0.5162966251373291, -0.7472034096717834, -0.44046029448509216, 0.7703121304512024, -0.6414658427238464, -0.06830435246229172, 0.3428863286972046, -0.08104704320430756, -0.6362761855125427, 0.009904446080327034, -0.24454855918884277, 0.18641090393066...
func (ptr *KeyholeInfo) Print() string { if ptr == nil { return "" } strs := []string{fmt.Sprintf(`{ keyhole: { version: "%v", args: "%v" } }`, ptr.Version, ptr.Params)} strs = append(strs, ptr.Logs...) return strings.Join(strs, "\n") }
[ 0.31241342425346375, -0.6463022828102112, 0.8464447259902954, -0.7125812768936157, -0.4576553702354431, 0.6825762987136841, -0.9282690286636353, -1.0775965452194214, -0.4038808047771454, 0.28066352009773254, 0.7215148210525513, 0.7790010571479797, -1.0696734189987183, 0.40817877650260925, ...
func Go(f func(), nsrefs ...Referrer) error { started := make(chan error) go func() { // Lock, but never unlock the OS thread exclusively powering our Go // routine. This ensures that the Golang runtime will destroy the OS // thread and never attempts to reuse it. runtime.LockOSThread() // Switch our highly...
[ 0.22773121297359467, 0.8886520266532898, 1.0696395635604858, -0.3180544078350067, 0.21017013490200043, -0.5769472122192383, -0.36044788360595703, -0.6902615427970886, -0.544542670249939, -0.5572298765182495, 0.46822965145111084, 0.7749001383781433, 0.0988629162311554, 0.8236358165740967, ...
func (e SyntaxIdType) PLC4XEnumName() string { switch e { case SyntaxIdType_S7ANY: return "S7ANY" case SyntaxIdType_PBC_ID: return "PBC_ID" case SyntaxIdType_ALARM_LOCKFREESET: return "ALARM_LOCKFREESET" case SyntaxIdType_ALARM_INDSET: return "ALARM_INDSET" case SyntaxIdType_ALARM_ACKSET: return "ALARM_...
[ -0.3492239713668823, -0.5534998774528503, 0.7484723925590515, -0.6218900680541992, -0.3481365144252777, -0.09526354819536209, -1.0294075012207031, -0.3352905511856079, 0.21481794118881226, 0.23389598727226257, -0.6888125538825989, 0.14110903441905975, -0.1797124296426773, 0.043833807110786...
func Exit() error { for _, a := range adapters { a.Close() } adapters = map[string]*adapter.Adapter1{} return bluez.CloseConnections() }
[ -1.12168288230896, -0.32444289326667786, 0.44394469261169434, 0.46676984429359436, -0.24979929625988007, 0.36087384819984436, -0.01489492878317833, -0.19929416477680206, 0.13931788504123688, 0.40926864743232727, 0.10362894833087921, -0.16214103996753693, -0.9319842457771301, 1.005299687385...
func NewPoolListener(synchronizer VirtualIPSynchronizer) *PoolListener { return &PoolListener{synchronizer: synchronizer, Timeout: time.Second * 5} }
[ 0.7084401845932007, -0.37728413939476013, 0.1247827559709549, 0.6175022125244141, -1.1620378494262695, 0.31852078437805176, 0.13527758419513702, -0.10971543192863464, 0.30465230345726013, 0.9810024499893188, -1.1128387451171875, -0.15280717611312866, -0.0013899863697588444, 0.5350090861320...
func (l *PoolListener) SetConnection(connection client.Connection) { l.connection = connection }
[ 0.24972130358219147, -0.945921003818512, -0.06376351416110992, 0.3212159276008606, 0.4109284579753876, 0.698909342288971, 0.6053259968757629, -0.24033166468143463, -0.47751596570014954, 0.4246671497821808, -0.4297497272491455, -0.17239120602607727, -0.3201049864292145, 0.9114676117897034, ...
func (l *PoolListener) GetPath(nodes ...string) string { return Base().Pools().Path() }
[ 0.5835349559783936, -0.3406742215156555, 0.24227342009544373, 0.23125022649765015, 0.6469640135765076, 1.1502745151519775, 1.4368383884429932, -1.4842497110366821, -0.6357930898666382, 0.20412544906139374, 0.6321085095405579, 0.24273502826690674, -0.7562041878700256, 0.029913367703557014, ...
func (l *PoolListener) Ready() (err error) { return nil }
[ 0.6448909044265747, -1.0231297016143799, 0.40640902519226074, -0.26150456070899963, 0.16645191609859467, 1.0299848318099976, 0.4239538908004761, -0.22202084958553314, 0.27218788862228394, -0.08512431383132935, -0.4803345501422882, 1.2316715717315674, 0.0653793215751648, 0.6658390760421753,...
func (l *PoolListener) Done() {}
[ 0.24366971850395203, -0.8168308734893799, 0.5074666738510132, 0.2918800413608551, 0.641187846660614, 1.3522859811782837, 0.9381645917892456, -1.0482025146484375, -0.25074321031570435, 0.3116794228553772, -0.9410505294799805, 0.6414133310317993, -0.10602834075689316, 1.0364389419555664, -...
func (l *PoolListener) PostProcess(p map[string]struct{}) {}
[ 0.16505058109760284, -1.253059983253479, 0.49138227105140686, -1.086368203163147, -0.23013220727443695, 0.6804474592208862, 0.36135637760162354, -0.16149364411830902, -0.3131076395511627, -0.09584073722362518, -0.7442430853843689, -0.6355246305465698, -1.003319263458252, 0.2546669244766235...
func (l *PoolListener) Spawn(shutdown <-chan interface{}, poolID string) { logger := plog.WithField("poolid", poolID) logger.Debug("Spawning pool listener") stop := make(chan struct{}) defer func() { close(stop) }() timeout := time.NewTimer(1 * time.Second) timeout.Stop() for { poolPath := Base().Pools().I...
[ -0.4342520534992218, -1.1679621934890747, 1.0214122533798218, -0.0536147803068161, -0.6571364402770996, 0.3080995976924896, 0.3052239716053009, -0.5027962923049927, 0.1791922152042389, 0.6767695546150208, 0.30464184284210205, 0.4273402988910675, 0.6249788403511047, 0.8354848027229309, -0...
func swap(x, y string) (string, string) { // type of returned variables can be written in bracket return y, x }
[ -1.6888363361358643, -1.0063557624816895, 0.7137383222579956, -0.5546841621398926, -0.49110737442970276, 0.07974805682897568, -0.812477707862854, -0.3982304632663727, -1.0313153266906738, -0.3224763572216034, 0.11002888530492783, 1.5577406883239746, 0.17022553086280823, -0.8997793197631836...
func (qc *QueueClient) checkAndEnforceAckAllRequest(req *pb.AckAllQueueMessagesRequest) error { if req.ClientID == "" { return entities.ErrInvalidClientID } if err := qc.checkChannelNameValidity(req.Channel); err != nil { return err } if req.WaitTimeSeconds > qc.policyCfg.MaxWaitTimeoutSeconds || req.WaitTime...
[ 0.1456664651632309, -0.013441091403365135, 0.7626123428344727, -0.22002315521240234, -0.08235897123813629, 0.041991330683231354, -0.5030016899108887, -0.17560669779777527, -0.022652452811598778, 0.7597177624702454, 1.286695122718811, 0.8434581756591797, -0.14107537269592285, 1.762515902519...