hunk dict | file stringlengths 0 11.8M | file_path stringlengths 2 234 | label int64 0 1 | commit_url stringlengths 74 103 | dependency_score listlengths 5 5 |
|---|---|---|---|---|---|
{
"id": 8,
"code_window": [
"\t\t}\n",
"\n",
"\t\tret, ttl, err := s.updateState(origState, tryUpdate)\n",
"\t\tif err != nil {\n",
"\t\t\t// If our data is already up to date, return the error\n",
"\t\t\tif !mustCheckData {\n",
"\t\t\t\treturn err\n",
"\t\t\t}\n",
"\n"
],
"l... | /*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go | 1 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.9975804090499878,
0.06794591248035431,
0.00016094969760160893,
0.0001781554165063426,
0.23265129327774048
] |
{
"id": 8,
"code_window": [
"\t\t}\n",
"\n",
"\t\tret, ttl, err := s.updateState(origState, tryUpdate)\n",
"\t\tif err != nil {\n",
"\t\t\t// If our data is already up to date, return the error\n",
"\t\t\tif !mustCheckData {\n",
"\t\t\t\treturn err\n",
"\t\t\t}\n",
"\n"
],
"l... | load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"fake_apiregistration_client.go",
"fake_apiservice.go",
],
importmap = "k8s.io/kubernetes/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/type... | staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/fake/BUILD | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.00017676602874416858,
0.00017551386554259807,
0.0001724042958812788,
0.0001764425542205572,
0.0000018006833215622464
] |
{
"id": 8,
"code_window": [
"\t\t}\n",
"\n",
"\t\tret, ttl, err := s.updateState(origState, tryUpdate)\n",
"\t\tif err != nil {\n",
"\t\t\t// If our data is already up to date, return the error\n",
"\t\t\tif !mustCheckData {\n",
"\t\t\t\treturn err\n",
"\t\t\t}\n",
"\n"
],
"l... | /*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softw... | staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.00019462672935333103,
0.00017696154827717692,
0.00016865998622961342,
0.00017449639562983066,
0.000008210856321966276
] |
{
"id": 8,
"code_window": [
"\t\t}\n",
"\n",
"\t\tret, ttl, err := s.updateState(origState, tryUpdate)\n",
"\t\tif err != nil {\n",
"\t\t\t// If our data is already up to date, return the error\n",
"\t\t\tif !mustCheckData {\n",
"\t\t\t\treturn err\n",
"\t\t\t}\n",
"\n"
],
"l... | /*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softw... | staging/src/k8s.io/client-go/informers/batch/v1beta1/interface.go | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.0002560432767495513,
0.00018928060308098793,
0.00016570631123613566,
0.00017803908849600703,
0.00003385815944056958
] |
{
"id": 9,
"code_window": [
"\t\t\tif err != nil {\n",
"\t\t\t\treturn err\n",
"\t\t\t}\n",
"\t\t\tmustCheckData = false\n",
"\t\t\t// Retry\n",
"\t\t\tcontinue\n",
"\t\t}\n",
"\n",
"\t\tdata, err := runtime.Encode(s.codec, ret)\n"
],
"labels": [
"keep",
"keep",
"... | /*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go | 1 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.9979524612426758,
0.13186602294445038,
0.0001633269857848063,
0.00027382108964957297,
0.31796351075172424
] |
{
"id": 9,
"code_window": [
"\t\t\tif err != nil {\n",
"\t\t\t\treturn err\n",
"\t\t\t}\n",
"\t\t\tmustCheckData = false\n",
"\t\t\t// Retry\n",
"\t\t\tcontinue\n",
"\t\t}\n",
"\n",
"\t\tdata, err := runtime.Encode(s.codec, ret)\n"
],
"labels": [
"keep",
"keep",
"... | /*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | cmd/kubeadm/app/phases/certs/renewal/manager_test.go | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.0006353679927997291,
0.00020184733148198575,
0.00016256967501249164,
0.00017045751155819744,
0.00009373549983138219
] |
{
"id": 9,
"code_window": [
"\t\t\tif err != nil {\n",
"\t\t\t\treturn err\n",
"\t\t\t}\n",
"\t\t\tmustCheckData = false\n",
"\t\t\t// Retry\n",
"\t\t\tcontinue\n",
"\t\t}\n",
"\n",
"\t\tdata, err := runtime.Encode(s.codec, ret)\n"
],
"labels": [
"keep",
"keep",
"... | /*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | test/integration/apiserver/apply/apply_crd_test.go | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.0018631969578564167,
0.0002985649334732443,
0.00015828220057301223,
0.00017196821863763034,
0.0003077724832110107
] |
{
"id": 9,
"code_window": [
"\t\t\tif err != nil {\n",
"\t\t\t\treturn err\n",
"\t\t\t}\n",
"\t\t\tmustCheckData = false\n",
"\t\t\t// Retry\n",
"\t\t\tcontinue\n",
"\t\t}\n",
"\n",
"\t\tdata, err := runtime.Encode(s.codec, ret)\n"
],
"labels": [
"keep",
"keep",
"... | // Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/api/types/metrics.proto
package types
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
types "github.com/gogo/protobuf/types"
io "io"
math "math... | vendor/github.com/containerd/containerd/api/types/metrics.pb.go | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.8904421329498291,
0.019569817930459976,
0.00016232400957960635,
0.0001716883125482127,
0.129822239279747
] |
{
"id": 10,
"code_window": [
"\t\tif !origState.stale && bytes.Equal(data, origState.data) {\n",
"\t\t\t// if we skipped the original Get in this loop, we must refresh from\n",
"\t\t\t// etcd in order to be sure the data in the store is equivalent to\n",
"\t\t\t// our desired serialization\n",
"... | /*
Copyright 2015 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | staging/src/k8s.io/apiserver/pkg/storage/interfaces.go | 1 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.00164900254458189,
0.00029402237851172686,
0.00016242310812231153,
0.00016857542505022138,
0.0003471016825642437
] |
{
"id": 10,
"code_window": [
"\t\tif !origState.stale && bytes.Equal(data, origState.data) {\n",
"\t\t\t// if we skipped the original Get in this loop, we must refresh from\n",
"\t\t\t// etcd in order to be sure the data in the store is equivalent to\n",
"\t\t\t// our desired serialization\n",
"... | package humanize
import "strconv"
// Ordinal gives you the input number in a rank/ordinal format.
//
// Ordinal(3) -> 3rd
func Ordinal(x int) string {
suffix := "th"
switch x % 10 {
case 1:
if x%100 != 11 {
suffix = "st"
}
case 2:
if x%100 != 12 {
suffix = "nd"
}
case 3:
if x%100 != 13 {
suffi... | vendor/github.com/dustin/go-humanize/ordinals.go | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.000174105676705949,
0.0001726657064864412,
0.0001716784026939422,
0.00017221305461134762,
0.000001041341533891682
] |
{
"id": 10,
"code_window": [
"\t\tif !origState.stale && bytes.Equal(data, origState.data) {\n",
"\t\t\t// if we skipped the original Get in this loop, we must refresh from\n",
"\t\t\t// etcd in order to be sure the data in the store is equivalent to\n",
"\t\t\t// our desired serialization\n",
"... | apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: php-apache
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: php-apache
minReplicas: 1
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 50
| test/fixtures/pkg/kubectl/cmd/convert/v2beta1HPA.yaml | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.00017611696966923773,
0.0001754272379912436,
0.00017473750631324947,
0.0001754272379912436,
6.89731677994132e-7
] |
{
"id": 10,
"code_window": [
"\t\tif !origState.stale && bytes.Equal(data, origState.data) {\n",
"\t\t\t// if we skipped the original Get in this loop, we must refresh from\n",
"\t\t\t// etcd in order to be sure the data in the store is equivalent to\n",
"\t\t\t// our desired serialization\n",
"... | /*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softw... | staging/src/k8s.io/client-go/listers/rbac/v1/expansion_generated.go | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.0003500515886116773,
0.00021654779266100377,
0.00016771172522567213,
0.00017952488269656897,
0.00006793135980842635
] |
{
"id": 11,
"code_window": [
"\t\t\t\torigState, err = getCurrentState()\n",
"\t\t\t\tif err != nil {\n",
"\t\t\t\t\treturn err\n",
"\t\t\t\t}\n",
"\t\t\t\tmustCheckData = false\n",
"\t\t\t\tif !bytes.Equal(data, origState.data) {\n",
"\t\t\t\t\t// original data changed, restart loop\n",... | /*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go | 1 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.9972133040428162,
0.0740298479795456,
0.00015902650193311274,
0.00017470834427513182,
0.2543081045150757
] |
{
"id": 11,
"code_window": [
"\t\t\t\torigState, err = getCurrentState()\n",
"\t\t\t\tif err != nil {\n",
"\t\t\t\t\treturn err\n",
"\t\t\t\t}\n",
"\t\t\t\tmustCheckData = false\n",
"\t\t\t\tif !bytes.Equal(data, origState.data) {\n",
"\t\t\t\t\t// original data changed, restart loop\n",... | load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["cow.go"],
importmap = "k8s.io/kubernetes/vendor/github.com/Microsoft/hcsshim/internal/cow",
importpath = "github.com/Microsoft/hcsshim/internal/cow",
visibility = ["//vendor/github.com/Microsoft/h... | vendor/github.com/Microsoft/hcsshim/internal/cow/BUILD | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.00017766124801710248,
0.00017584273882675916,
0.00017290955292992294,
0.00017695744463708252,
0.00000209388986149861
] |
{
"id": 11,
"code_window": [
"\t\t\t\torigState, err = getCurrentState()\n",
"\t\t\t\tif err != nil {\n",
"\t\t\t\t\treturn err\n",
"\t\t\t\t}\n",
"\t\t\t\tmustCheckData = false\n",
"\t\t\t\tif !bytes.Equal(data, origState.data) {\n",
"\t\t\t\t\t// original data changed, restart loop\n",... | // This work is subject to the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
// license. Its contents can be found at:
// http://creativecommons.org/publicdomain/zero/1.0/
package bindata
import (
"io"
)
const lowerHex = "0123456789abcdef"
type StringWriter struct {
io.Writer
c int
}
func (w *StringWrite... | vendor/github.com/go-bindata/go-bindata/stringwriter.go | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.00017854926409199834,
0.00017557253886479884,
0.00016725962632335722,
0.00017824064707383513,
0.0000048014494495873805
] |
{
"id": 11,
"code_window": [
"\t\t\t\torigState, err = getCurrentState()\n",
"\t\t\t\tif err != nil {\n",
"\t\t\t\t\treturn err\n",
"\t\t\t\t}\n",
"\t\t\t\tmustCheckData = false\n",
"\t\t\t\tif !bytes.Equal(data, origState.data) {\n",
"\t\t\t\t\t// original data changed, restart loop\n",... | package(default_visibility = ["//visibility:public"])
load(
"//build:go.bzl",
go_binary = "go_binary_conditional_pure",
)
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_binary(
name = "gendocs",
embed = [":go_default_library"],
)
go_library(
name = "go_default_library",
srcs = ["gen_... | cmd/gendocs/BUILD | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.00017673653201200068,
0.00017548594041727483,
0.00017306393419858068,
0.00017607168410904706,
0.0000014827693348706816
] |
{
"id": 12,
"code_window": [
"\t\t\tif err != nil {\n",
"\t\t\t\treturn err\n",
"\t\t\t}\n",
"\t\t\ttrace.Step(\"Retry value restored\")\n",
"\t\t\tmustCheckData = false\n",
"\t\t\tcontinue\n",
"\t\t}\n",
"\t\tputResp := txnResp.Responses[0].GetResponsePut()\n"
],
"labels": [
... | /*
Copyright 2015 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | staging/src/k8s.io/apiserver/pkg/storage/interfaces.go | 1 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.0014449828304350376,
0.00026223555323667824,
0.00016291727661155164,
0.00016907815006561577,
0.00028158852364867926
] |
{
"id": 12,
"code_window": [
"\t\t\tif err != nil {\n",
"\t\t\t\treturn err\n",
"\t\t\t}\n",
"\t\t\ttrace.Step(\"Retry value restored\")\n",
"\t\t\tmustCheckData = false\n",
"\t\t\tcontinue\n",
"\t\t}\n",
"\t\tputResp := txnResp.Responses[0].GetResponsePut()\n"
],
"labels": [
... | package network
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unl... | vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.001950613223016262,
0.0002971550857182592,
0.00016224849969148636,
0.00017908676818478853,
0.00036998288123868406
] |
{
"id": 12,
"code_window": [
"\t\t\tif err != nil {\n",
"\t\t\t\treturn err\n",
"\t\t\t}\n",
"\t\t\ttrace.Step(\"Retry value restored\")\n",
"\t\t\tmustCheckData = false\n",
"\t\t\tcontinue\n",
"\t\t}\n",
"\t\tputResp := txnResp.Responses[0].GetResponsePut()\n"
],
"labels": [
... | // Copyright ©2016 The Gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !noasm,!appengine,!safe
#include "textflag.h"
// MOVSHDUP X3, X2
#define MOVSHDUP_X3_X2 BYTE $0xF3; BYTE $0x0F; BYTE $0x16; BYTE $0xD3
// MOVSLD... | vendor/gonum.org/v1/gonum/internal/asm/c64/axpyunitaryto_amd64.s | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.0002260178589494899,
0.00017313679563812912,
0.00016144201799761504,
0.00016900553600862622,
0.000014727054804097861
] |
{
"id": 12,
"code_window": [
"\t\t\tif err != nil {\n",
"\t\t\t\treturn err\n",
"\t\t\t}\n",
"\t\t\ttrace.Step(\"Retry value restored\")\n",
"\t\t\tmustCheckData = false\n",
"\t\t\tcontinue\n",
"\t\t}\n",
"\t\tputResp := txnResp.Responses[0].GetResponsePut()\n"
],
"labels": [
... | #!/usr/bin/env bash
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | hack/verify-cli-conventions.sh | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.0001762464817147702,
0.000172754458617419,
0.00016428834351245314,
0.00017567520262673497,
0.000004537071163213113
] |
{
"id": 13,
"code_window": [
"\t// the current contents of the object when deciding how the update object should look.\n",
"\t// If the key doesn't exist, it will return NotFound storage error if ignoreNotFound=false\n",
"\t// or zero value in 'ptrToType' parameter otherwise.\n",
"\t// If the object... | /*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go | 1 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.03591546788811684,
0.0014180648140609264,
0.00016116394544951618,
0.0001712876110104844,
0.005436722654849291
] |
{
"id": 13,
"code_window": [
"\t// the current contents of the object when deciding how the update object should look.\n",
"\t// If the key doesn't exist, it will return NotFound storage error if ignoreNotFound=false\n",
"\t// or zero value in 'ptrToType' parameter otherwise.\n",
"\t// If the object... | /*
Copyright 2014 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | staging/src/k8s.io/apiserver/pkg/registry/rest/resttest/resttest.go | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.00036184382042847574,
0.00016961366054601967,
0.00015807044110260904,
0.00016690602933522314,
0.0000179293128894642
] |
{
"id": 13,
"code_window": [
"\t// the current contents of the object when deciding how the update object should look.\n",
"\t// If the key doesn't exist, it will return NotFound storage error if ignoreNotFound=false\n",
"\t// or zero value in 'ptrToType' parameter otherwise.\n",
"\t// If the object... | // +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable l... | staging/src/k8s.io/code-generator/_examples/apiserver/apis/example2/zz_generated.deepcopy.go | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.00017860493971966207,
0.0001687382027739659,
0.0001624141150387004,
0.00016764762403909117,
0.000005899444204260362
] |
{
"id": 13,
"code_window": [
"\t// the current contents of the object when deciding how the update object should look.\n",
"\t// If the key doesn't exist, it will return NotFound storage error if ignoreNotFound=false\n",
"\t// or zero value in 'ptrToType' parameter otherwise.\n",
"\t// If the object... | #!/usr/bin/env python
# Copyright 2015 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | hack/verify-flags-underscore.py | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.00017653510440140963,
0.00016908251564018428,
0.00016548464191146195,
0.00016803076141513884,
0.0000033434705528634368
] |
{
"id": 14,
"code_window": [
"\t// return cur, nil, nil\n",
"\t// },\n",
"\t// )\n",
"\tGuaranteedUpdate(\n",
"\t\tctx context.Context, key string, ptrToType runtime.Object, ignoreNotFound bool,\n",
"\t\tprecondtions *Preconditions, tryUpdate UpdateFunc, suggestion runtime.Object) e... | /*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go | 1 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.96177738904953,
0.08122016489505768,
0.0001673928345553577,
0.0005679408786818385,
0.23067359626293182
] |
{
"id": 14,
"code_window": [
"\t// return cur, nil, nil\n",
"\t// },\n",
"\t// )\n",
"\tGuaranteedUpdate(\n",
"\t\tctx context.Context, key string, ptrToType runtime.Object, ignoreNotFound bool,\n",
"\t\tprecondtions *Preconditions, tryUpdate UpdateFunc, suggestion runtime.Object) e... | package longpath
import (
"path/filepath"
"strings"
)
// LongAbs makes a path absolute and returns it in NT long path form.
func LongAbs(path string) (string, error) {
if strings.HasPrefix(path, `\\?\`) || strings.HasPrefix(path, `\\.\`) {
return path, nil
}
if !filepath.IsAbs(path) {
absPath, err := filepat... | vendor/github.com/Microsoft/hcsshim/internal/longpath/longpath.go | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.0002907739544752985,
0.00021280946384649724,
0.0001711193035589531,
0.00017653510440140963,
0.00005517354657058604
] |
{
"id": 14,
"code_window": [
"\t// return cur, nil, nil\n",
"\t// },\n",
"\t// )\n",
"\tGuaranteedUpdate(\n",
"\t\tctx context.Context, key string, ptrToType runtime.Object, ignoreNotFound bool,\n",
"\t\tprecondtions *Preconditions, tryUpdate UpdateFunc, suggestion runtime.Object) e... | package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
"go_test",
)
go_test(
name = "go_default_test",
srcs = ["storage_test.go"],
embed = [":go_default_library"],
deps = [
"//pkg/apis/core:go_default_library",
"//pkg/reg... | pkg/registry/core/event/storage/BUILD | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.00017391702567692846,
0.00017195510736200958,
0.00016717576363589615,
0.00017253472469747066,
0.0000022025315047358163
] |
{
"id": 14,
"code_window": [
"\t// return cur, nil, nil\n",
"\t// },\n",
"\t// )\n",
"\tGuaranteedUpdate(\n",
"\t\tctx context.Context, key string, ptrToType runtime.Object, ignoreNotFound bool,\n",
"\t\tprecondtions *Preconditions, tryUpdate UpdateFunc, suggestion runtime.Object) e... | package govalidator
import (
"errors"
"fmt"
"html"
"math"
"path"
"regexp"
"strings"
"unicode"
"unicode/utf8"
)
// Contains check if the string contains the substring.
func Contains(str, substring string) bool {
return strings.Contains(str, substring)
}
// Matches check if string matches the pattern (patter... | vendor/github.com/asaskevich/govalidator/utils.go | 0 | https://github.com/kubernetes/kubernetes/commit/d0726e4b1354b1c8c3978b96ab7b01d13a2b6340 | [
0.9963867664337158,
0.03878387063741684,
0.00016222530393861234,
0.00024894802481867373,
0.18461838364601135
] |
{
"id": 0,
"code_window": [
"\t\"k8s.io/component-base/logs\"\n",
"\t\"k8s.io/component-base/metrics\"\n",
"\tcmconfig \"k8s.io/controller-manager/config\"\n",
"\tcmoptions \"k8s.io/controller-manager/options\"\n",
"\tkubecontrollerconfig \"k8s.io/kubernetes/cmd/kube-controller-manager/app/confi... | /*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | staging/src/k8s.io/controller-manager/options/generic.go | 1 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.014305219054222107,
0.0029892639722675085,
0.0001650162012083456,
0.00020967898308299482,
0.004812292288988829
] |
{
"id": 0,
"code_window": [
"\t\"k8s.io/component-base/logs\"\n",
"\t\"k8s.io/component-base/metrics\"\n",
"\tcmconfig \"k8s.io/controller-manager/config\"\n",
"\tcmoptions \"k8s.io/controller-manager/options\"\n",
"\tkubecontrollerconfig \"k8s.io/kubernetes/cmd/kube-controller-manager/app/confi... | package netlink
import (
"fmt"
"math"
)
const (
HANDLE_NONE = 0
HANDLE_INGRESS = 0xFFFFFFF1
HANDLE_CLSACT = HANDLE_INGRESS
HANDLE_ROOT = 0xFFFFFFFF
PRIORITY_MAP_LEN = 16
)
const (
HANDLE_MIN_INGRESS = 0xFFFFFFF2
HANDLE_MIN_EGRESS = 0xFFFFFFF3
)
type Qdisc interface {
Attrs() *QdiscAttrs
Ty... | vendor/github.com/vishvananda/netlink/qdisc.go | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.0003574116271920502,
0.00017386589024681598,
0.0001603970886208117,
0.00016631813195999712,
0.00003344070864841342
] |
{
"id": 0,
"code_window": [
"\t\"k8s.io/component-base/logs\"\n",
"\t\"k8s.io/component-base/metrics\"\n",
"\tcmconfig \"k8s.io/controller-manager/config\"\n",
"\tcmoptions \"k8s.io/controller-manager/options\"\n",
"\tkubecontrollerconfig \"k8s.io/kubernetes/cmd/kube-controller-manager/app/confi... | {
"kind": "PodDisruptionBudget",
"apiVersion": "policy/v1",
"metadata": {
"name": "2",
"generateName": "3",
"namespace": "4",
"selfLink": "5",
"uid": "7",
"resourceVersion": "11042405498087606203",
"generation": 8071137005907523419,
"creationTimestamp": null,
"deletionGracePeri... | staging/src/k8s.io/api/testdata/HEAD/policy.v1.PodDisruptionBudget.json | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.00017615007527638227,
0.0001729926443658769,
0.0001711147342575714,
0.00017264166672248393,
0.0000014944776012271177
] |
{
"id": 0,
"code_window": [
"\t\"k8s.io/component-base/logs\"\n",
"\t\"k8s.io/component-base/metrics\"\n",
"\tcmconfig \"k8s.io/controller-manager/config\"\n",
"\tcmoptions \"k8s.io/controller-manager/options\"\n",
"\tkubecontrollerconfig \"k8s.io/kubernetes/cmd/kube-controller-manager/app/confi... | /*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | vendor/k8s.io/utils/mount/mount_helper_common.go | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.0005857925279997289,
0.00020977872190997005,
0.0001651890343055129,
0.0001711429504211992,
0.00011898476077476516
] |
{
"id": 1,
"code_window": [
"\t\t\t\tDebuggingConfiguration: &componentbaseconfig.DebuggingConfiguration{\n",
"\t\t\t\t\tEnableProfiling: false,\n",
"\t\t\t\t\tEnableContentionProfiling: true,\n",
"\t\t\t\t},\n",
"\t\t\t},\n",
"\t\t},\n",
"\t\tKubeCloudShared: &cpoptions.KubeCl... | /*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | staging/src/k8s.io/controller-manager/options/generic.go | 1 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.0060897707007825375,
0.0006781427073292434,
0.0001628928876016289,
0.00016934573068283498,
0.001632258645258844
] |
{
"id": 1,
"code_window": [
"\t\t\t\tDebuggingConfiguration: &componentbaseconfig.DebuggingConfiguration{\n",
"\t\t\t\t\tEnableProfiling: false,\n",
"\t\t\t\t\tEnableContentionProfiling: true,\n",
"\t\t\t\t},\n",
"\t\t\t},\n",
"\t\t},\n",
"\t\tKubeCloudShared: &cpoptions.KubeCl... | # See the OWNERS docs at https://go.k8s.io/owners
reviewers:
- brendandburns
- smarterclayton
- thockin
approvers:
- sig-docs-approvers
- brendandburns
- smarterclayton
- thockin
- pwittrock
| docs/OWNERS | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.00017425348050892353,
0.00017279366147704422,
0.0001713338278932497,
0.00017279366147704422,
0.00000145982630783692
] |
{
"id": 1,
"code_window": [
"\t\t\t\tDebuggingConfiguration: &componentbaseconfig.DebuggingConfiguration{\n",
"\t\t\t\t\tEnableProfiling: false,\n",
"\t\t\t\t\tEnableContentionProfiling: true,\n",
"\t\t\t\t},\n",
"\t\t\t},\n",
"\t\t},\n",
"\t\tKubeCloudShared: &cpoptions.KubeCl... | /*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | cmd/kubeadm/app/cmd/token_test.go | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.00017749532707966864,
0.00017070242029149085,
0.00016175603377632797,
0.00017161629511974752,
0.0000034607405723363627
] |
{
"id": 1,
"code_window": [
"\t\t\t\tDebuggingConfiguration: &componentbaseconfig.DebuggingConfiguration{\n",
"\t\t\t\t\tEnableProfiling: false,\n",
"\t\t\t\t\tEnableContentionProfiling: true,\n",
"\t\t\t\t},\n",
"\t\t\t},\n",
"\t\t},\n",
"\t\tKubeCloudShared: &cpoptions.KubeCl... | /*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | pkg/kubelet/eviction/eviction_manager.go | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.00017799140186980367,
0.00016976067854557186,
0.00015841537970118225,
0.00017017481150105596,
0.000004177956725470722
] |
{
"id": 2,
"code_window": [
"\tserviceconfig \"k8s.io/cloud-provider/controllers/service/config\"\n",
"\tcomponentbaseconfig \"k8s.io/component-base/config\"\n",
"\tcmconfig \"k8s.io/controller-manager/config\"\n",
"\tcmoptions \"k8s.io/controller-manager/options\"\n",
")\n",
"\n",
"func... | /*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | staging/src/k8s.io/controller-manager/options/generic.go | 1 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.0030019599944353104,
0.0007986955461092293,
0.00016969285206869245,
0.00020763531210832298,
0.0009586758678779006
] |
{
"id": 2,
"code_window": [
"\tserviceconfig \"k8s.io/cloud-provider/controllers/service/config\"\n",
"\tcomponentbaseconfig \"k8s.io/component-base/config\"\n",
"\tcmconfig \"k8s.io/controller-manager/config\"\n",
"\tcmoptions \"k8s.io/controller-manager/options\"\n",
")\n",
"\n",
"func... | /*
Copyright (c) 2018 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
vUnless required by applicable law or agreed ... | vendor/github.com/vmware/govmomi/vapi/tags/tag_association.go | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.00017834643949754536,
0.00017261008906643838,
0.0001652993232710287,
0.00017281559121329337,
0.0000043089276005048305
] |
{
"id": 2,
"code_window": [
"\tserviceconfig \"k8s.io/cloud-provider/controllers/service/config\"\n",
"\tcomponentbaseconfig \"k8s.io/component-base/config\"\n",
"\tcmconfig \"k8s.io/controller-manager/config\"\n",
"\tcmoptions \"k8s.io/controller-manager/options\"\n",
")\n",
"\n",
"func... | // +build !windows
package godirwalk
import (
"os"
"syscall"
"unsafe"
)
// Scanner is an iterator to enumerate the contents of a directory.
type Scanner struct {
scratchBuffer []byte // read directory bytes from file system into this buffer
workBuffer []byte // points into scratchBuffer, from which we chunk ... | vendor/github.com/karrick/godirwalk/scandir_unix.go | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.00039060405106283724,
0.00018482677114661783,
0.00016153886099345982,
0.00017505117284599692,
0.00005169810901861638
] |
{
"id": 2,
"code_window": [
"\tserviceconfig \"k8s.io/cloud-provider/controllers/service/config\"\n",
"\tcomponentbaseconfig \"k8s.io/component-base/config\"\n",
"\tcmconfig \"k8s.io/controller-manager/config\"\n",
"\tcmoptions \"k8s.io/controller-manager/options\"\n",
")\n",
"\n",
"func... | inverseRules:
# Allow Internal packages only in apiextensions-apiserver itself, discourage use elsewhere.
- selectorRegexp: k8s[.]io/apiextensions-apiserver
allowedPrefixes:
- ''
# Forbid use of this package in other k8s.io packages.
- selectorRegexp: k8s[.]io
forbiddenPrefixes:
- ''
| staging/src/k8s.io/apiextensions-apiserver/pkg/apis/.import-restrictions | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.0001685144961811602,
0.0001685144961811602,
0.0001685144961811602,
0.0001685144961811602,
0
] |
{
"id": 3,
"code_window": [
"\t\t\t\t\tEnableContentionProfiling: false,\n",
"\t\t\t\t},\n",
"\t\t\t},\n",
"\t\t},\n",
"\t\tKubeCloudShared: &KubeCloudSharedOptions{\n",
"\t\t\tKubeCloudSharedConfiguration: &cpconfig.KubeCloudSharedConfiguration{\n"
],
"labels": [
"keep",
"keep",... | /*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | cmd/kube-controller-manager/app/options/options_test.go | 1 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.02188277803361416,
0.0006278840592131019,
0.00016440915351267904,
0.0001697954721748829,
0.0026942575350403786
] |
{
"id": 3,
"code_window": [
"\t\t\t\t\tEnableContentionProfiling: false,\n",
"\t\t\t\t},\n",
"\t\t\t},\n",
"\t\t},\n",
"\t\tKubeCloudShared: &KubeCloudSharedOptions{\n",
"\t\t\tKubeCloudSharedConfiguration: &cpconfig.KubeCloudSharedConfiguration{\n"
],
"labels": [
"keep",
"keep",... | /*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | cmd/kubeadm/app/phases/copycerts/copycerts_test.go | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.00026473411708138883,
0.0001754497061483562,
0.00016591802705079317,
0.00017105534789152443,
0.00001775756936694961
] |
{
"id": 3,
"code_window": [
"\t\t\t\t\tEnableContentionProfiling: false,\n",
"\t\t\t\t},\n",
"\t\t\t},\n",
"\t\t},\n",
"\t\tKubeCloudShared: &KubeCloudSharedOptions{\n",
"\t\t\tKubeCloudSharedConfiguration: &cpconfig.KubeCloudSharedConfiguration{\n"
],
"labels": [
"keep",
"keep",... | /*
Ginkgo accepts a number of configuration options.
These are documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli)
You can also learn more via
ginkgo help
or (I kid you not):
go test -asdf
*/
package config
import (
"flag"
"time"
"fmt"
)
const VERSION = "1.11.0"
type GinkgoConfigType struct {
... | vendor/github.com/onsi/ginkgo/config/config.go | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.00018936464039143175,
0.00017398329509887844,
0.00016581079398747534,
0.0001736658305162564,
0.000006075204055377981
] |
{
"id": 3,
"code_window": [
"\t\t\t\t\tEnableContentionProfiling: false,\n",
"\t\t\t\t},\n",
"\t\t\t},\n",
"\t\t},\n",
"\t\tKubeCloudShared: &KubeCloudSharedOptions{\n",
"\t\t\tKubeCloudSharedConfiguration: &cpconfig.KubeCloudSharedConfiguration{\n"
],
"labels": [
"keep",
"keep",... | // Copyright 2015 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | vendor/go.etcd.io/etcd/embed/serve.go | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.0006616838509216905,
0.00018137795268557966,
0.00016283232253044844,
0.00016860502364579588,
0.00007373114203801379
] |
{
"id": 4,
"code_window": [
"\t\t\t\tDebuggingConfiguration: &componentbaseconfig.DebuggingConfiguration{\n",
"\t\t\t\t\tEnableProfiling: false,\n",
"\t\t\t\t\tEnableContentionProfiling: true,\n",
"\t\t\t\t},\n",
"\t\t\t},\n",
"\t\t},\n",
"\t\tKubeCloudShared: &KubeCloudSharedO... | /*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | staging/src/k8s.io/controller-manager/options/generic.go | 1 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.00193254672922194,
0.0005075673689134419,
0.00016374517872463912,
0.00016984101966954768,
0.000631161849014461
] |
{
"id": 4,
"code_window": [
"\t\t\t\tDebuggingConfiguration: &componentbaseconfig.DebuggingConfiguration{\n",
"\t\t\t\t\tEnableProfiling: false,\n",
"\t\t\t\t\tEnableContentionProfiling: true,\n",
"\t\t\t\t},\n",
"\t\t\t},\n",
"\t\t},\n",
"\t\tKubeCloudShared: &KubeCloudSharedO... | /*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | staging/src/k8s.io/api/autoscaling/v2beta2/register.go | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.00022353397798724473,
0.00017999338160734624,
0.0001609759492566809,
0.00017411564476788044,
0.00002010680691455491
] |
{
"id": 4,
"code_window": [
"\t\t\t\tDebuggingConfiguration: &componentbaseconfig.DebuggingConfiguration{\n",
"\t\t\t\t\tEnableProfiling: false,\n",
"\t\t\t\t\tEnableContentionProfiling: true,\n",
"\t\t\t\t},\n",
"\t\t\t},\n",
"\t\t},\n",
"\t\tKubeCloudShared: &KubeCloudSharedO... | /*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softw... | staging/src/k8s.io/client-go/informers/storage/v1beta1/csidriver.go | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.000946564192418009,
0.00025691164773888886,
0.0001646606542635709,
0.00017136649694293737,
0.0002438597148284316
] |
{
"id": 4,
"code_window": [
"\t\t\t\tDebuggingConfiguration: &componentbaseconfig.DebuggingConfiguration{\n",
"\t\t\t\t\tEnableProfiling: false,\n",
"\t\t\t\t\tEnableContentionProfiling: true,\n",
"\t\t\t\t},\n",
"\t\t\t},\n",
"\t\t},\n",
"\t\tKubeCloudShared: &KubeCloudSharedO... | /*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | pkg/controller/daemon/update_test.go | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.0008245292701758444,
0.0001803808263503015,
0.00015588646056130528,
0.00016982803936116397,
0.00008134645031532273
] |
{
"id": 5,
"code_window": [
"\to := &GenericControllerManagerConfigurationOptions{\n",
"\t\tGenericControllerManagerConfiguration: cfg,\n",
"\t\tDebugging: RecommendedDebuggingOptions(),\n",
"\t\tLeaderMigration: nil,\n",
"\t}\n",
"\n",
"... | /*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | cmd/kube-controller-manager/app/options/options_test.go | 1 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.006719296332448721,
0.000281510321656242,
0.00016332510858774185,
0.00016868139209691435,
0.0007944538374431431
] |
{
"id": 5,
"code_window": [
"\to := &GenericControllerManagerConfigurationOptions{\n",
"\t\tGenericControllerManagerConfiguration: cfg,\n",
"\t\tDebugging: RecommendedDebuggingOptions(),\n",
"\t\tLeaderMigration: nil,\n",
"\t}\n",
"\n",
"... | // +build !providerless
/*
Copyright 2020 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law ... | staging/src/k8s.io/legacy-cloud-providers/azure/clients/routeclient/interface.go | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.0001786240318324417,
0.0001694418751867488,
0.00016154210607055575,
0.00016760638391133398,
0.0000058252408052794635
] |
{
"id": 5,
"code_window": [
"\to := &GenericControllerManagerConfigurationOptions{\n",
"\t\tGenericControllerManagerConfiguration: cfg,\n",
"\t\tDebugging: RecommendedDebuggingOptions(),\n",
"\t\tLeaderMigration: nil,\n",
"\t}\n",
"\n",
"... | {
"kind": "NetworkPolicy",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "2",
"generateName": "3",
"namespace": "4",
"selfLink": "5",
"uid": "7",
"resourceVersion": "11042405498087606203",
"generation": 8071137005907523419,
"creationTimestamp": null,
"deletionGraceP... | staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.NetworkPolicy.json | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.00017875795310828835,
0.0001730612711980939,
0.0001700482243904844,
0.00017309223767369986,
0.0000021580681277555414
] |
{
"id": 5,
"code_window": [
"\to := &GenericControllerManagerConfigurationOptions{\n",
"\t\tGenericControllerManagerConfiguration: cfg,\n",
"\t\tDebugging: RecommendedDebuggingOptions(),\n",
"\t\tLeaderMigration: nil,\n",
"\t}\n",
"\n",
"... | /*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | pkg/volume/util/fs/fs_windows_test.go | 0 | https://github.com/kubernetes/kubernetes/commit/68ebe29529b861cfdd075f76bad5643c58ece70f | [
0.00017885562556330115,
0.0001761049497872591,
0.0001717306295176968,
0.00017607398331165314,
0.000002292297494932427
] |
{
"id": 0,
"code_window": [
"\t\treturn syncErr\n",
"\t}\n",
"\n",
"\t// If the network plugin is not ready, only start the pod if it uses the host network\n",
"\tif rs := kl.runtimeState.networkErrors(); len(rs) != 0 && !podUsesHostNetwork(pod) {\n",
"\t\treturn fmt.Errorf(\"network is not ... | /*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | pkg/kubelet/kubelet_pods.go | 1 | https://github.com/kubernetes/kubernetes/commit/15fc470343dfb6d8593f2548fe24ccec5ca27761 | [
0.013125995174050331,
0.0012077264254912734,
0.00016397815488744527,
0.00027254552696831524,
0.002166930353268981
] |
{
"id": 0,
"code_window": [
"\t\treturn syncErr\n",
"\t}\n",
"\n",
"\t// If the network plugin is not ready, only start the pod if it uses the host network\n",
"\tif rs := kl.runtimeState.networkErrors(); len(rs) != 0 && !podUsesHostNetwork(pod) {\n",
"\t\treturn fmt.Errorf(\"network is not ... | package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
"go_test",
"cgo_library",
)
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"fake_shaper.go",
"interfaces.go",
... | pkg/util/bandwidth/BUILD | 0 | https://github.com/kubernetes/kubernetes/commit/15fc470343dfb6d8593f2548fe24ccec5ca27761 | [
0.00017734307039063424,
0.00017559781554155052,
0.00017390707216691226,
0.0001758365979185328,
0.0000011396044783396064
] |
{
"id": 0,
"code_window": [
"\t\treturn syncErr\n",
"\t}\n",
"\n",
"\t// If the network plugin is not ready, only start the pod if it uses the host network\n",
"\tif rs := kl.runtimeState.networkErrors(); len(rs) != 0 && !podUsesHostNetwork(pod) {\n",
"\t\treturn fmt.Errorf(\"network is not ... | {
"foo": "bar"
}
| pkg/kubelet/dockertools/fixtures/seccomp/test | 0 | https://github.com/kubernetes/kubernetes/commit/15fc470343dfb6d8593f2548fe24ccec5ca27761 | [
0.00017232589016202837,
0.00017232589016202837,
0.00017232589016202837,
0.00017232589016202837,
0
] |
{
"id": 0,
"code_window": [
"\t\treturn syncErr\n",
"\t}\n",
"\n",
"\t// If the network plugin is not ready, only start the pod if it uses the host network\n",
"\tif rs := kl.runtimeState.networkErrors(); len(rs) != 0 && !podUsesHostNetwork(pod) {\n",
"\t\treturn fmt.Errorf(\"network is not ... | /*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | pkg/runtime/schema/generated.proto | 0 | https://github.com/kubernetes/kubernetes/commit/15fc470343dfb6d8593f2548fe24ccec5ca27761 | [
0.00017818583000916988,
0.00017657682474236935,
0.00017353387374896556,
0.0001780107559170574,
0.000002152874458261067
] |
{
"id": 2,
"code_window": [
"\t}\n",
"\treturn nil\n",
"}\n",
"\n",
"// returns whether the pod uses the host network namespace.\n",
"func podUsesHostNetwork(pod *v1.Pod) bool {\n",
"\treturn pod.Spec.HostNetwork\n",
"}\n",
"\n",
"// getPullSecretsForPod inspects the Pod and ... | /*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | pkg/kubelet/kubelet_pods.go | 1 | https://github.com/kubernetes/kubernetes/commit/15fc470343dfb6d8593f2548fe24ccec5ca27761 | [
0.9991200566291809,
0.021732261404395103,
0.00016611700993962586,
0.0008374682511202991,
0.1307878941297531
] |
{
"id": 2,
"code_window": [
"\t}\n",
"\treturn nil\n",
"}\n",
"\n",
"// returns whether the pod uses the host network namespace.\n",
"func podUsesHostNetwork(pod *v1.Pod) bool {\n",
"\treturn pod.Spec.HostNetwork\n",
"}\n",
"\n",
"// getPullSecretsForPod inspects the Pod and ... | /*
Copyright 2015 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | pkg/apis/abac/types.go | 0 | https://github.com/kubernetes/kubernetes/commit/15fc470343dfb6d8593f2548fe24ccec5ca27761 | [
0.0013832122785970569,
0.0004033868317492306,
0.00016770247020758688,
0.00019042764324694872,
0.00041074142791330814
] |
{
"id": 2,
"code_window": [
"\t}\n",
"\treturn nil\n",
"}\n",
"\n",
"// returns whether the pod uses the host network namespace.\n",
"func podUsesHostNetwork(pod *v1.Pod) bool {\n",
"\treturn pod.Spec.HostNetwork\n",
"}\n",
"\n",
"// getPullSecretsForPod inspects the Pod and ... | #cloud-config
---
write-files:
- path: /etc/conf.d/nfs
permissions: '0644'
content: |
OPTS_RPC_MOUNTD=""
- path: /opt/bin/wupiao
permissions: '0755'
content: |
#!/bin/bash
# [w]ait [u]ntil [p]ort [i]s [a]ctually [o]pen
[ -n "$1" ] && \
until curl -o /dev/null -sIf ht... | test/fixtures/doc-yaml/getting-started-guides/coreos/cloud-configs/master.yaml | 0 | https://github.com/kubernetes/kubernetes/commit/15fc470343dfb6d8593f2548fe24ccec5ca27761 | [
0.0001749684161040932,
0.00016933397273533046,
0.00016526466060895473,
0.00016895293083507568,
0.000002274949110869784
] |
{
"id": 2,
"code_window": [
"\t}\n",
"\treturn nil\n",
"}\n",
"\n",
"// returns whether the pod uses the host network namespace.\n",
"func podUsesHostNetwork(pod *v1.Pod) bool {\n",
"\treturn pod.Spec.HostNetwork\n",
"}\n",
"\n",
"// getPullSecretsForPod inspects the Pod and ... | // Copyright 2015 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | vendor/github.com/coreos/etcd/pkg/pbutil/pbutil.go | 0 | https://github.com/kubernetes/kubernetes/commit/15fc470343dfb6d8593f2548fe24ccec5ca27761 | [
0.00029301168979145586,
0.00019467156380414963,
0.0001643223367864266,
0.00017237701104022563,
0.000043631567677948624
] |
{
"id": 3,
"code_window": [
"\t\tif err != nil {\n",
"\t\t\tglog.V(4).Infof(\"Cannot get host IP: %v\", err)\n",
"\t\t} else {\n",
"\t\t\ts.HostIP = hostIP.String()\n",
"\t\t\tif podUsesHostNetwork(pod) && s.PodIP == \"\" {\n",
"\t\t\t\ts.PodIP = hostIP.String()\n",
"\t\t\t}\n",
"\t\... | /*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | pkg/kubelet/kubelet_pods.go | 1 | https://github.com/kubernetes/kubernetes/commit/15fc470343dfb6d8593f2548fe24ccec5ca27761 | [
0.9981256127357483,
0.007804118562489748,
0.00016009164392016828,
0.00022861361503601074,
0.08065246790647507
] |
{
"id": 3,
"code_window": [
"\t\tif err != nil {\n",
"\t\t\tglog.V(4).Infof(\"Cannot get host IP: %v\", err)\n",
"\t\t} else {\n",
"\t\t\ts.HostIP = hostIP.String()\n",
"\t\t\tif podUsesHostNetwork(pod) && s.PodIP == \"\" {\n",
"\t\t\t\ts.PodIP = hostIP.String()\n",
"\t\t\t}\n",
"\t\... | /*
Copyright 2014 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | pkg/kubectl/cmd/config/create_authinfo.go | 0 | https://github.com/kubernetes/kubernetes/commit/15fc470343dfb6d8593f2548fe24ccec5ca27761 | [
0.00022786053887102753,
0.00017476920038461685,
0.00016156335186678916,
0.000174198838067241,
0.000010994046533596702
] |
{
"id": 3,
"code_window": [
"\t\tif err != nil {\n",
"\t\t\tglog.V(4).Infof(\"Cannot get host IP: %v\", err)\n",
"\t\t} else {\n",
"\t\t\ts.HostIP = hostIP.String()\n",
"\t\t\tif podUsesHostNetwork(pod) && s.PodIP == \"\" {\n",
"\t\t\t\ts.PodIP = hostIP.String()\n",
"\t\t\t}\n",
"\t\... | apiVersion: v1
kind: ReplicationController
metadata:
name: update-demo-kitten
spec:
selector:
name: update-demo
version: kitten
template:
metadata:
labels:
name: update-demo
version: kitten
spec:
containers:
- image: gcr.io/google_containers/update-demo:kitten
... | test/fixtures/doc-yaml/user-guide/update-demo/kitten-rc.yaml | 0 | https://github.com/kubernetes/kubernetes/commit/15fc470343dfb6d8593f2548fe24ccec5ca27761 | [
0.0001800877507776022,
0.0001789791276678443,
0.00017822592053562403,
0.0001786236825864762,
8.005638392205583e-7
] |
{
"id": 3,
"code_window": [
"\t\tif err != nil {\n",
"\t\t\tglog.V(4).Infof(\"Cannot get host IP: %v\", err)\n",
"\t\t} else {\n",
"\t\t\ts.HostIP = hostIP.String()\n",
"\t\t\tif podUsesHostNetwork(pod) && s.PodIP == \"\" {\n",
"\t\t\t\ts.PodIP = hostIP.String()\n",
"\t\t\t}\n",
"\t\... | # Contributing to SpdyStream
Want to hack on spdystream? Awesome! Here are instructions to get you
started.
SpdyStream is a part of the [Docker](https://docker.io) project, and follows
the same rules and principles. If you're already familiar with the way
Docker does things, you'll feel right at home.
Otherwise, go ... | vendor/github.com/docker/spdystream/CONTRIBUTING.md | 0 | https://github.com/kubernetes/kubernetes/commit/15fc470343dfb6d8593f2548fe24ccec5ca27761 | [
0.00017466371355112642,
0.0001727342896629125,
0.00017080485122278333,
0.0001727342896629125,
0.0000019294311641715467
] |
{
"id": 0,
"code_window": [
"}\n",
"\n",
"// handleMsg is invoked whenever an inbound message is received from a remote\n",
"// peer. The remote connection is torn down upon returning any error.\n",
"func (pm *ProtocolManager) handleMsg(p *peer) error {\n",
"\t// Read the next message from t... | // Copyright 2016 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... | les/peer.go | 1 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.8852399587631226,
0.015882428735494614,
0.00016744456661399454,
0.0011699660681188107,
0.09728758037090302
] |
{
"id": 0,
"code_window": [
"}\n",
"\n",
"// handleMsg is invoked whenever an inbound message is received from a remote\n",
"// peer. The remote connection is torn down upon returning any error.\n",
"func (pm *ProtocolManager) handleMsg(p *peer) error {\n",
"\t// Read the next message from t... | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ma... | vendor/github.com/uber/jaeger-client-go/thrift/binary_protocol.go | 0 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.00998084619641304,
0.0017390100983902812,
0.0001681564172031358,
0.0009716777130961418,
0.001896852976642549
] |
{
"id": 0,
"code_window": [
"}\n",
"\n",
"// handleMsg is invoked whenever an inbound message is received from a remote\n",
"// peer. The remote connection is torn down upon returning any error.\n",
"func (pm *ProtocolManager) handleMsg(p *peer) error {\n",
"\t// Read the next message from t... | package simulations
import (
"testing"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/p2p/enode"
"github.com/ethereum/go-ethereum/p2p/enr"
"github.com/ethereum/go-ethereum/rpc"
)
// NoopService is the service that does not do anything
// but implements node.Service interface.
type NoopSe... | p2p/simulations/test.go | 0 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.004846200812608004,
0.000841597851831466,
0.00016782147577032447,
0.00021358260710258037,
0.0015156746376305819
] |
{
"id": 0,
"code_window": [
"}\n",
"\n",
"// handleMsg is invoked whenever an inbound message is received from a remote\n",
"// peer. The remote connection is torn down upon returning any error.\n",
"func (pm *ProtocolManager) handleMsg(p *peer) error {\n",
"\t// Read the next message from t... | {{.CommentWithoutT "a"}}
func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool {
return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}})
}
| vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl | 0 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.00016756293189246207,
0.00016756293189246207,
0.00016756293189246207,
0.00016756293189246207,
0
] |
{
"id": 1,
"code_window": [
"\t\t}\n",
"\t\tbv := p.fcClient.RequestProcessed(reqID, responseCount, maxCost, realCost)\n",
"\t\tif reply != nil {\n",
"\t\t\tp.queueSend(func() {\n",
"\t\t\t\tif err := reply.send(bv); err != nil {\n",
"\t\t\t\t\tp.errCh <- err\n",
"\t\t\t\t}\n",
"\t\t... | // Copyright 2016 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... | les/handler.go | 1 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.997778594493866,
0.015224715694785118,
0.00016367588250432163,
0.00017348524124827236,
0.11958920210599899
] |
{
"id": 1,
"code_window": [
"\t\t}\n",
"\t\tbv := p.fcClient.RequestProcessed(reqID, responseCount, maxCost, realCost)\n",
"\t\tif reply != nil {\n",
"\t\t\tp.queueSend(func() {\n",
"\t\t\t\tif err := reply.send(bv); err != nil {\n",
"\t\t\t\t\tp.errCh <- err\n",
"\t\t\t\t}\n",
"\t\t... | # XHandler
[](https://godoc.org/github.com/rs/xhandler) [](https://raw.githubusercontent.com/rs/xhandler/master/LICENSE) [\n",
"\t\tif reply != nil {\n",
"\t\t\tp.queueSend(func() {\n",
"\t\t\t\tif err := reply.send(bv); err != nil {\n",
"\t\t\t\t\tp.errCh <- err\n",
"\t\t\t\t}\n",
"\t\t... | package packer
import (
"fmt"
"math"
"reflect"
"strings"
"github.com/graph-gophers/graphql-go/errors"
"github.com/graph-gophers/graphql-go/internal/common"
"github.com/graph-gophers/graphql-go/internal/schema"
)
type packer interface {
Pack(value interface{}) (reflect.Value, error)
}
type Builder struct {
... | vendor/github.com/graph-gophers/graphql-go/internal/exec/packer/packer.go | 0 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.002329179085791111,
0.00035703295725397766,
0.00016029694234021008,
0.00017419364303350449,
0.00041969234007410705
] |
{
"id": 1,
"code_window": [
"\t\t}\n",
"\t\tbv := p.fcClient.RequestProcessed(reqID, responseCount, maxCost, realCost)\n",
"\t\tif reply != nil {\n",
"\t\t\tp.queueSend(func() {\n",
"\t\t\t\tif err := reply.send(bv); err != nil {\n",
"\t\t\t\t\tp.errCh <- err\n",
"\t\t\t\t}\n",
"\t\t... | package gosigar
import (
"time"
)
type ConcreteSigar struct{}
func (c *ConcreteSigar) CollectCpuStats(collectionInterval time.Duration) (<-chan Cpu, chan<- struct{}) {
// samplesCh is buffered to 1 value to immediately return first CPU sample
samplesCh := make(chan Cpu, 1)
stopCh := make(chan struct{})
go fun... | vendor/github.com/elastic/gosigar/concrete_sigar.go | 0 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.002199288457632065,
0.00039646608638577163,
0.00016486849926877767,
0.00016810976376291364,
0.0006374231306836009
] |
{
"id": 2,
"code_window": [
"\tisOnlyAnnounce bool\n",
"}\n",
"\n",
"func newPeer(version int, network uint64, isTrusted bool, p *p2p.Peer, rw p2p.MsgReadWriter) *peer {\n",
"\tid := p.ID()\n",
"\n",
"\treturn &peer{\n",
"\t\tPeer: p,\n",
"\t\trw: rw,\n"
],
"label... | // Copyright 2016 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... | les/peer.go | 1 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.9982485771179199,
0.20716065168380737,
0.0001690501085249707,
0.022144798189401627,
0.34438085556030273
] |
{
"id": 2,
"code_window": [
"\tisOnlyAnnounce bool\n",
"}\n",
"\n",
"func newPeer(version int, network uint64, isTrusted bool, p *p2p.Peer, rw p2p.MsgReadWriter) *peer {\n",
"\tid := p.ID()\n",
"\n",
"\treturn &peer{\n",
"\t\tPeer: p,\n",
"\t\trw: rw,\n"
],
"label... | // Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package browser provides utilities for interacting with users' browsers.
package browser
import (
"os"
"os/exec"
"runtime"
)
// Commands returns a list ... | cmd/internal/browser/browser.go | 0 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.00018229168199468404,
0.00017311629198957235,
0.00016872721607796848,
0.0001692848018137738,
0.000005372844952944433
] |
{
"id": 2,
"code_window": [
"\tisOnlyAnnounce bool\n",
"}\n",
"\n",
"func newPeer(version int, network uint64, isTrusted bool, p *p2p.Peer, rw p2p.MsgReadWriter) *peer {\n",
"\tid := p.ID()\n",
"\n",
"\treturn &peer{\n",
"\t\tPeer: p,\n",
"\t\trw: rw,\n"
],
"label... | package check
import (
"fmt"
"reflect"
"regexp"
)
// -----------------------------------------------------------------------
// CommentInterface and Commentf helper, to attach extra information to checks.
type comment struct {
format string
args []interface{}
}
// Commentf returns an infomational value to us... | vendor/gopkg.in/check.v1/checkers.go | 0 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.0012267931597307324,
0.0003182310319971293,
0.00016670410695951432,
0.00022758993145544082,
0.00023559766123071313
] |
{
"id": 2,
"code_window": [
"\tisOnlyAnnounce bool\n",
"}\n",
"\n",
"func newPeer(version int, network uint64, isTrusted bool, p *p2p.Peer, rw p2p.MsgReadWriter) *peer {\n",
"\tid := p.ID()\n",
"\n",
"\treturn &peer{\n",
"\t\tPeer: p,\n",
"\t\trw: rw,\n"
],
"label... | // This test checks that an error response is sent for calls
// with named parameters.
--> {"jsonrpc":"2.0","method":"test_echo","params":{"int":23},"id":3}
<-- {"jsonrpc":"2.0","id":3,"error":{"code":-32602,"message":"non-array args"}}
| rpc/testdata/reqresp-namedparam.js | 0 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.0001681820722296834,
0.0001681820722296834,
0.0001681820722296834,
0.0001681820722296834,
0
] |
{
"id": 3,
"code_window": [
"\t\trw: rw,\n",
"\t\tversion: version,\n",
"\t\tnetwork: network,\n",
"\t\tid: fmt.Sprintf(\"%x\", id),\n",
"\t\tisTrusted: isTrusted,\n"
],
"labels": [
"keep",
"keep",
"keep",
"replace",
"keep"
],
"after_edit": [
"\t... | // Copyright 2016 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... | les/peer.go | 1 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.9546393752098083,
0.012536067515611649,
0.00016230142500717193,
0.00017435054178349674,
0.1047060564160347
] |
{
"id": 3,
"code_window": [
"\t\trw: rw,\n",
"\t\tversion: version,\n",
"\t\tnetwork: network,\n",
"\t\tid: fmt.Sprintf(\"%x\", id),\n",
"\t\tisTrusted: isTrusted,\n"
],
"labels": [
"keep",
"keep",
"keep",
"replace",
"keep"
],
"after_edit": [
"\t... | // Copyright 2017 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... | params/denomination.go | 0 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.00017722643679007888,
0.0001764084881870076,
0.0001755620032781735,
0.00017643699538893998,
6.798012464059866e-7
] |
{
"id": 3,
"code_window": [
"\t\trw: rw,\n",
"\t\tversion: version,\n",
"\t\tnetwork: network,\n",
"\t\tid: fmt.Sprintf(\"%x\", id),\n",
"\t\tisTrusted: isTrusted,\n"
],
"labels": [
"keep",
"keep",
"keep",
"replace",
"keep"
],
"after_edit": [
"\t... | package selected
import (
"fmt"
"reflect"
"sync"
"github.com/graph-gophers/graphql-go/errors"
"github.com/graph-gophers/graphql-go/internal/common"
"github.com/graph-gophers/graphql-go/internal/exec/packer"
"github.com/graph-gophers/graphql-go/internal/exec/resolvable"
"github.com/graph-gophers/graphql-go/int... | vendor/github.com/graph-gophers/graphql-go/internal/exec/selected/selected.go | 0 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.00018034085223916918,
0.00017173087690025568,
0.00016542625962756574,
0.0001715344114927575,
0.0000030403984965232667
] |
{
"id": 3,
"code_window": [
"\t\trw: rw,\n",
"\t\tversion: version,\n",
"\t\tnetwork: network,\n",
"\t\tid: fmt.Sprintf(\"%x\", id),\n",
"\t\tisTrusted: isTrusted,\n"
],
"labels": [
"keep",
"keep",
"keep",
"replace",
"keep"
],
"after_edit": [
"\t... | // Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:generate go run gen.go
// Package identifier defines the contract between implementations of Encoding
// and Index by defining identifiers that uniquely i... | vendor/golang.org/x/text/encoding/internal/identifier/identifier.go | 0 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.002557415282353759,
0.0004818284360226244,
0.00016202233382500708,
0.0001733010431053117,
0.0007440326735377312
] |
{
"id": 4,
"code_window": [
"\t\tisTrusted: isTrusted,\n",
"\t}\n",
"}\n",
"\n",
"// rejectUpdate returns true if a parameter update has to be rejected because\n",
"// the size and/or rate of updates exceed the capacity limitation\n"
],
"labels": [
"add",
"keep",
"keep",
... | // Copyright 2016 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... | les/handler.go | 1 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.03763309121131897,
0.00048640501336194575,
0.00016386639617849141,
0.0001693595404503867,
0.0031935512088239193
] |
{
"id": 4,
"code_window": [
"\t\tisTrusted: isTrusted,\n",
"\t}\n",
"}\n",
"\n",
"// rejectUpdate returns true if a parameter update has to be rejected because\n",
"// the size and/or rate of updates exceed the capacity limitation\n"
],
"labels": [
"add",
"keep",
"keep",
... | // Copyright 2015 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... | rpc/server.go | 0 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.0005091977654956281,
0.00020040906383655965,
0.00016467431851197034,
0.00017374679737258703,
0.00008407450513914227
] |
{
"id": 4,
"code_window": [
"\t\tisTrusted: isTrusted,\n",
"\t}\n",
"}\n",
"\n",
"// rejectUpdate returns true if a parameter update has to be rejected because\n",
"// the size and/or rate of updates exceed the capacity limitation\n"
],
"labels": [
"add",
"keep",
"keep",
... | // Copyright 2018 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... | swarm/state/dbstore_test.go | 0 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.00018964307673741132,
0.00017302302876487374,
0.00016763596795499325,
0.00017235464474651963,
0.00000542315729035181
] |
{
"id": 4,
"code_window": [
"\t\tisTrusted: isTrusted,\n",
"\t}\n",
"}\n",
"\n",
"// rejectUpdate returns true if a parameter update has to be rejected because\n",
"// the size and/or rate of updates exceed the capacity limitation\n"
],
"labels": [
"add",
"keep",
"keep",
... | // Copyright 2017 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... | consensus/clique/clique.go | 0 | https://github.com/ethereum/go-ethereum/commit/c53c5e616f04ae8b041bfb64309cbc7f3e70303a | [
0.0006359854014590383,
0.00020694706472568214,
0.00016381015302613378,
0.00017079099779948592,
0.00008592059020884335
] |
{
"id": 0,
"code_window": [
"}\n",
"\n",
"func (queue *TimedQueue) cleanup(tick <-chan time.Time) {\n",
"\tfor now := range tick {\n",
"\t\tnowSec := now.UTC().Unix()\n",
"\t\tfor {\n",
"\t\t\tqueue.access.RLock()\n",
"\t\t\tqueueLen := queue.queue.Len()\n"
],
"labels": [
"ke... | // Package vmess contains protocol definition, io lib for VMess.
package protocol
import (
"crypto/aes"
"crypto/cipher"
"encoding/binary"
"hash/fnv"
"io"
"time"
"github.com/v2ray/v2ray-core/common/alloc"
v2io "github.com/v2ray/v2ray-core/common/io"
"github.com/v2ray/v2ray-core/common/log"
v2net "github.com/... | proxy/vmess/protocol/vmess.go | 1 | https://github.com/v2ray/v2ray-core/commit/fdb41bbd50444b702940b117efee5216a4f4756a | [
0.0010304334573447704,
0.00021732127061113715,
0.00016542673984076828,
0.0001704408205114305,
0.00017901942192111164
] |
{
"id": 0,
"code_window": [
"}\n",
"\n",
"func (queue *TimedQueue) cleanup(tick <-chan time.Time) {\n",
"\tfor now := range tick {\n",
"\t\tnowSec := now.UTC().Unix()\n",
"\t\tfor {\n",
"\t\t\tqueue.access.RLock()\n",
"\t\t\tqueueLen := queue.queue.Len()\n"
],
"labels": [
"ke... | The MIT License (MIT)
Copyright (c) 2015 V2Ray
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, d... | LICENSE | 0 | https://github.com/v2ray/v2ray-core/commit/fdb41bbd50444b702940b117efee5216a4f4756a | [
0.00017663782637100667,
0.00017247488722205162,
0.00016922492068260908,
0.00017156188550870866,
0.000003094399062320008
] |
{
"id": 0,
"code_window": [
"}\n",
"\n",
"func (queue *TimedQueue) cleanup(tick <-chan time.Time) {\n",
"\tfor now := range tick {\n",
"\t\tnowSec := now.UTC().Unix()\n",
"\t\tfor {\n",
"\t\t\tqueue.access.RLock()\n",
"\t\t\tqueueLen := queue.queue.Len()\n"
],
"labels": [
"ke... | package io
import (
"crypto/cipher"
"io"
)
// CryptionReader is a general purpose reader that applies a stream cipher on top of a regular reader.
type CryptionReader struct {
stream cipher.Stream
reader io.Reader
}
// NewCryptionReader creates a new CryptionReader instance from given stream cipher and reader.
fu... | common/io/encryption.go | 0 | https://github.com/v2ray/v2ray-core/commit/fdb41bbd50444b702940b117efee5216a4f4756a | [
0.00019721323042176664,
0.00017758172180037946,
0.00016749791393522173,
0.00017384116654284298,
0.000010723380000854377
] |
{
"id": 0,
"code_window": [
"}\n",
"\n",
"func (queue *TimedQueue) cleanup(tick <-chan time.Time) {\n",
"\tfor now := range tick {\n",
"\t\tnowSec := now.UTC().Unix()\n",
"\t\tfor {\n",
"\t\t\tqueue.access.RLock()\n",
"\t\t\tqueueLen := queue.queue.Len()\n"
],
"labels": [
"ke... | package wildcard_router
import (
"github.com/v2ray/v2ray-core/app/router"
v2net "github.com/v2ray/v2ray-core/common/net"
"github.com/v2ray/v2ray-core/config"
)
type WildcardRouter struct {
}
func (router *WildcardRouter) TakeDetour(packet v2net.Packet) (config.ConnectionTag, error) {
return "", nil
}
type Wildc... | app/router/wildcard_router/router.go | 0 | https://github.com/v2ray/v2ray-core/commit/fdb41bbd50444b702940b117efee5216a4f4756a | [
0.0001815447467379272,
0.00017813622253015637,
0.00017317272431682795,
0.00017969118198379874,
0.0000035903690331906546
] |
{
"id": 1,
"code_window": [
"\tassert := unit.Assert(t)\n",
"\n",
"\tremoved := make(map[string]bool)\n",
"\n",
"\tnowSec := time.Now().UTC().Unix()\n",
"\tq := NewTimedQueue(2)\n",
"\n",
"\tgo func() {\n",
"\t\tfor {\n",
"\t\t\tentry := <-q.RemovedEntries()\n"
],
"labels... | package collect
import (
"container/heap"
"sync"
"time"
)
type timedQueueEntry struct {
timeSec int64
value interface{}
}
type timedQueueImpl []*timedQueueEntry
func (queue timedQueueImpl) Len() int {
return len(queue)
}
func (queue timedQueueImpl) Less(i, j int) bool {
return queue[i].timeSec < queue[j].... | common/collect/timed_queue.go | 1 | https://github.com/v2ray/v2ray-core/commit/fdb41bbd50444b702940b117efee5216a4f4756a | [
0.9980765581130981,
0.2033812552690506,
0.00017052738985512406,
0.0016548354178667068,
0.39176008105278015
] |
{
"id": 1,
"code_window": [
"\tassert := unit.Assert(t)\n",
"\n",
"\tremoved := make(map[string]bool)\n",
"\n",
"\tnowSec := time.Now().UTC().Unix()\n",
"\tq := NewTimedQueue(2)\n",
"\n",
"\tgo func() {\n",
"\t\tfor {\n",
"\t\t\tentry := <-q.RemovedEntries()\n"
],
"labels... | package net
import (
"bytes"
"crypto/rand"
"io"
"io/ioutil"
"testing"
"github.com/v2ray/v2ray-core/common/alloc"
"github.com/v2ray/v2ray-core/testing/unit"
)
func TestReaderAndWrite(t *testing.T) {
assert := unit.Assert(t)
size := 1024 * 1024
buffer := make([]byte, size)
nBytes, err := rand.Read(buffer)
... | common/net/transport_test.go | 0 | https://github.com/v2ray/v2ray-core/commit/fdb41bbd50444b702940b117efee5216a4f4756a | [
0.00017770328850019723,
0.00017171799845527858,
0.0001668908225838095,
0.00017231091624125838,
0.000003261598521930864
] |
{
"id": 1,
"code_window": [
"\tassert := unit.Assert(t)\n",
"\n",
"\tremoved := make(map[string]bool)\n",
"\n",
"\tnowSec := time.Now().UTC().Unix()\n",
"\tq := NewTimedQueue(2)\n",
"\n",
"\tgo func() {\n",
"\t\tfor {\n",
"\t\t\tentry := <-q.RemovedEntries()\n"
],
"labels... | package json
import (
"github.com/v2ray/v2ray-core/config"
"github.com/v2ray/v2ray-core/config/json"
vmessconfig "github.com/v2ray/v2ray-core/proxy/vmess/config"
)
type Inbound struct {
AllowedClients []*ConfigUser `json:"clients"`
UDP bool `json:"udp"`
}
func (c *Inbound) AllowedUsers() []v... | proxy/vmess/config/json/inbound.go | 0 | https://github.com/v2ray/v2ray-core/commit/fdb41bbd50444b702940b117efee5216a4f4756a | [
0.0001769287628121674,
0.00016959107597358525,
0.00016543651872780174,
0.0001679995039012283,
0.000004368334884929936
] |
{
"id": 1,
"code_window": [
"\tassert := unit.Assert(t)\n",
"\n",
"\tremoved := make(map[string]bool)\n",
"\n",
"\tnowSec := time.Now().UTC().Unix()\n",
"\tq := NewTimedQueue(2)\n",
"\n",
"\tgo func() {\n",
"\t\tfor {\n",
"\t\t\tentry := <-q.RemovedEntries()\n"
],
"labels... | // +build !windows
package platform
import (
"os"
)
func ExpandEnv(s string) string {
return os.ExpandEnv(s)
}
func LineSeparator() string {
return "\n"
}
| common/platform/others.go | 0 | https://github.com/v2ray/v2ray-core/commit/fdb41bbd50444b702940b117efee5216a4f4756a | [
0.00019661278929561377,
0.00018279333016835153,
0.00016897388559300452,
0.00018279333016835153,
0.00001381945185130462
] |
{
"id": 2,
"code_window": [
"\tremoved[\"Value2\"] = false\n",
"\n",
"\t<-tick\n",
"\tassert.Bool(removed[\"Values\"]).IsFalse()\n",
"\n",
"\tq.Add(\"Value1\", time.Now().UTC().Unix()+10)\n",
"\n",
"\t<-tick\n",
"\tv1, ok = removed[\"Value1\"]\n",
"\tassert.Bool(ok).IsTrue()\... | // Package vmess contains protocol definition, io lib for VMess.
package protocol
import (
"crypto/aes"
"crypto/cipher"
"encoding/binary"
"hash/fnv"
"io"
"time"
"github.com/v2ray/v2ray-core/common/alloc"
v2io "github.com/v2ray/v2ray-core/common/io"
"github.com/v2ray/v2ray-core/common/log"
v2net "github.com/... | proxy/vmess/protocol/vmess.go | 1 | https://github.com/v2ray/v2ray-core/commit/fdb41bbd50444b702940b117efee5216a4f4756a | [
0.00018599187023937702,
0.00017331945127807558,
0.00016425935609731823,
0.0001735182013362646,
0.000004656760665966431
] |
{
"id": 2,
"code_window": [
"\tremoved[\"Value2\"] = false\n",
"\n",
"\t<-tick\n",
"\tassert.Bool(removed[\"Values\"]).IsFalse()\n",
"\n",
"\tq.Add(\"Value1\", time.Now().UTC().Unix()+10)\n",
"\n",
"\t<-tick\n",
"\tv1, ok = removed[\"Value1\"]\n",
"\tassert.Bool(ok).IsTrue()\... | package protocol
import (
"encoding/binary"
"errors"
"github.com/v2ray/v2ray-core/common/alloc"
"github.com/v2ray/v2ray-core/common/log"
v2net "github.com/v2ray/v2ray-core/common/net"
)
var (
ErrorUnknownAddressType = errors.New("Unknown Address Type.")
)
type Socks5UDPRequest struct {
Fragment byte
Address... | proxy/socks/protocol/udp.go | 0 | https://github.com/v2ray/v2ray-core/commit/fdb41bbd50444b702940b117efee5216a4f4756a | [
0.00019011744007002562,
0.00017467213911004364,
0.000164565077284351,
0.00017372608999721706,
0.000006993699571467005
] |
{
"id": 2,
"code_window": [
"\tremoved[\"Value2\"] = false\n",
"\n",
"\t<-tick\n",
"\tassert.Bool(removed[\"Values\"]).IsFalse()\n",
"\n",
"\tq.Add(\"Value1\", time.Now().UTC().Unix()+10)\n",
"\n",
"\t<-tick\n",
"\tv1, ok = removed[\"Value1\"]\n",
"\tassert.Bool(ok).IsTrue()\... | package socks
import (
"github.com/v2ray/v2ray-core/app"
"github.com/v2ray/v2ray-core/proxy"
"github.com/v2ray/v2ray-core/proxy/socks/config/json"
)
type SocksServerFactory struct {
}
func (factory SocksServerFactory) Create(dispatcher app.PacketDispatcher, rawConfig interface{}) (proxy.InboundConnectionHandler, ... | proxy/socks/socksfactory.go | 0 | https://github.com/v2ray/v2ray-core/commit/fdb41bbd50444b702940b117efee5216a4f4756a | [
0.00017724705685395747,
0.00017524539725854993,
0.0001733851822791621,
0.00017510393809061497,
0.0000015797733112776768
] |
{
"id": 2,
"code_window": [
"\tremoved[\"Value2\"] = false\n",
"\n",
"\t<-tick\n",
"\tassert.Bool(removed[\"Values\"]).IsFalse()\n",
"\n",
"\tq.Add(\"Value1\", time.Now().UTC().Unix()+10)\n",
"\n",
"\t<-tick\n",
"\tv1, ok = removed[\"Value1\"]\n",
"\tassert.Bool(ok).IsTrue()\... | {
"port": 1080,
"log": {
"access": ""
},
"inbound": {
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": false,
"ip": "127.0.0.1"
}
},
"outbound": {
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "127.0.0.1",
"p... | release/config/vpoint_socks_vmess.json | 0 | https://github.com/v2ray/v2ray-core/commit/fdb41bbd50444b702940b117efee5216a4f4756a | [
0.00017642791499383748,
0.00017511907208245248,
0.00017299958562944084,
0.00017592967196833342,
0.0000015124334140637075
] |
{
"id": 3,
"code_window": [
"\t}\n",
"}\n",
"\n",
"func (us *TimedUserSet) updateUserHash(tick <-chan time.Time) {\n",
"\tlastSec := time.Now().UTC().Unix() - cacheDurationSec\n",
"\n",
"\tfor now := range tick {\n"
],
"labels": [
"keep",
"keep",
"keep",
"keep",
"... | package user
import (
"sync"
"time"
"github.com/v2ray/v2ray-core/common/collect"
"github.com/v2ray/v2ray-core/proxy/vmess/config"
)
const (
updateIntervalSec = 10
cacheDurationSec = 120
)
type UserSet interface {
AddUser(user config.User) error
GetUser(timeHash []byte) (*config.ID, int64, bool)
}
type Tim... | proxy/vmess/protocol/user/userset.go | 1 | https://github.com/v2ray/v2ray-core/commit/fdb41bbd50444b702940b117efee5216a4f4756a | [
0.9989494681358337,
0.7371603846549988,
0.0001891228457679972,
0.9973317384719849,
0.4014653265476227
] |
{
"id": 3,
"code_window": [
"\t}\n",
"}\n",
"\n",
"func (us *TimedUserSet) updateUserHash(tick <-chan time.Time) {\n",
"\tlastSec := time.Now().UTC().Unix() - cacheDurationSec\n",
"\n",
"\tfor now := range tick {\n"
],
"labels": [
"keep",
"keep",
"keep",
"keep",
"... | # V2Ray 安装方式
## 预编译程序
发布于 [Release](https://github.com/v2ray/v2ray-core/releases) 中,每周更新,[更新周期见此](https://github.com/V2Ray/v2ray-core/blob/master/spec/roadmap.md)。
其中:
* v2ray-linux-32.zip: 适用于 32 位 Linux,各种发行版均可。
* v2ray-linux-64.zip: 适用于 64 位 Linux,各种发行版均可。
* v2ray-linux-arm.zip: 适用于 ARMv6 及之后平台的 Linux,如 Raspberry ... | spec/install.md | 0 | https://github.com/v2ray/v2ray-core/commit/fdb41bbd50444b702940b117efee5216a4f4756a | [
0.0001686109317233786,
0.00016686064191162586,
0.00016481144120916724,
0.0001672709477134049,
0.0000013095972235532827
] |
{
"id": 3,
"code_window": [
"\t}\n",
"}\n",
"\n",
"func (us *TimedUserSet) updateUserHash(tick <-chan time.Time) {\n",
"\tlastSec := time.Now().UTC().Unix() - cacheDurationSec\n",
"\n",
"\tfor now := range tick {\n"
],
"labels": [
"keep",
"keep",
"keep",
"keep",
"... | package json
import (
"encoding/json"
"github.com/v2ray/v2ray-core/proxy/vmess/config"
)
// ConfigUser is an user account in VMess configuration.
type ConfigUser struct {
Id *config.ID
Email string
}
func (u *ConfigUser) UnmarshalJSON(data []byte) error {
type rawUser struct {
IdString string `json:"id... | proxy/vmess/config/json/user.go | 0 | https://github.com/v2ray/v2ray-core/commit/fdb41bbd50444b702940b117efee5216a4f4756a | [
0.0034342731814831495,
0.001141026965342462,
0.00017711645341478288,
0.0004763590404763818,
0.0013314918614923954
] |
{
"id": 3,
"code_window": [
"\t}\n",
"}\n",
"\n",
"func (us *TimedUserSet) updateUserHash(tick <-chan time.Time) {\n",
"\tlastSec := time.Now().UTC().Unix() - cacheDurationSec\n",
"\n",
"\tfor now := range tick {\n"
],
"labels": [
"keep",
"keep",
"keep",
"keep",
"... | package socks
import (
"net"
"github.com/v2ray/v2ray-core/common/alloc"
"github.com/v2ray/v2ray-core/common/log"
v2net "github.com/v2ray/v2ray-core/common/net"
"github.com/v2ray/v2ray-core/proxy/socks/protocol"
)
var udpAddress v2net.Address
func (server *SocksServer) ListenUDP(port uint16) error {
addr := &n... | proxy/socks/udp.go | 0 | https://github.com/v2ray/v2ray-core/commit/fdb41bbd50444b702940b117efee5216a4f4756a | [
0.00018902169540524483,
0.0001710852957330644,
0.00016479009354952723,
0.00016758800484240055,
0.000007437259682774311
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.