query
stringlengths
10
3.85k
ru_query
stringlengths
9
3.76k
document
stringlengths
17
430k
metadata
dict
negatives
listlengths
97
100
negative_scores
listlengths
97
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
RegisteredMigrations returns currently registered Migrations.
RegisteredMigrations возвращает текущие зарегистрированные Migrations.
func RegisteredMigrations() []*Migration { return DefaultCollection.Migrations() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m Migrator) RunMigrations() error {\n\t// Run everything in a transaction. In case of error, we can roll it back\n\ttx, err := m.Connection.Database.Begin()\n\tif err != nil {\n\t\t// Connection could not be started\n\t\treturn err\n\t}\n\n\t// First check if the database db_migrations exists\n\tres := tx.Qu...
[ "0.59993494", "0.5917453", "0.5908439", "0.5828041", "0.56374675", "0.55805904", "0.5571452", "0.55068016", "0.5480716", "0.5442322", "0.54304135", "0.5336703", "0.533496", "0.5296084", "0.52461225", "0.5194173", "0.5160693", "0.51398253", "0.50593525", "0.49677986", "0.48873...
0.7982301
0
Read MeasurementsGET sends measurements json response
Чтение измеренийGET отправляет ответ в формате json с измерениями
func MeasurementsGET(w http.ResponseWriter, r *http.Request) { // Get condition GET parameter condition := r.URL.Query().Get("condition") // Validate condition reg, errReg := regexp.Compile("^(\\w+[<>=]+\\w+(\\s(and|or)\\s?)?)*$") if errReg != nil { log.Println(errReg) response.SendError(w, http.StatusInterna...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (a *UnsupportedApiService) MeasurementsGET(ctx context.Context, measurementConfigId string) (MeasurementConfig, *http.Response, error) {\n\tvar (\n\t\tlocalVarHttpMethod = strings.ToUpper(\"Get\")\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalV...
[ "0.74997777", "0.67356014", "0.6283912", "0.61545205", "0.6074424", "0.6033546", "0.6003006", "0.5927213", "0.5910613", "0.5830679", "0.5797388", "0.5765787", "0.5747032", "0.5735315", "0.5729223", "0.5726011", "0.5648738", "0.56365585", "0.55921185", "0.55593187", "0.5550674...
0.7500745
0
QueryStringParser converts URL querystring into a slice of `FilteredResult.` Given the querystring `?first_name=john:eq:and&last_name=doe:eq`
QueryStringParser преобразует URL querystring в срез `FilteredResult`. Дан querystring `?first_name=john:eq:and&last_name=doe:eq`
func QueryStringParser(queryStr string, filters map[string]string) []FilteredResult { //define custom map type to allowduplicate keys type Map struct { Key string Value string } params := []Map{} searchFilters := []FilteredResult{} parts := strings.Split(queryStr, "&") //build a key/value map of the que...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ExtractPaginationQueryString(qry url.Values) map[string]interface{} {\n\n\tpg := map[string]interface{}{\n\t\t\"Page\": 1,\n\t\t\"PerPage\": 15,\n\t\t\"Filter\": \"\",\n\t\t\"Order\": \"created_at\",\n\t\t\"OrderType\": \"desc\",\n\t\t\"NoPagination\": false,\n\t}\n\n\t// Extract ...
[ "0.6135432", "0.60866284", "0.59948343", "0.59735113", "0.58965135", "0.5751068", "0.57321346", "0.56327635", "0.5629603", "0.55736727", "0.55452985", "0.5522028", "0.5475098", "0.54211044", "0.53964305", "0.53878003", "0.5383441", "0.5383123", "0.5362183", "0.53502405", "0.5...
0.748404
0
RHSParser separates the fragment part of the query string into three parts value, comparison operator (=, >, , =, LIKE) and logical operator (AND/OR).
RHSParser разделяет часть запроса, соответствующую фрагменту, на три части: значение, оператор сравнения (=, >, , =, LIKE) и логический оператор (AND/OR).
func RHSParser(queryStrValue string, valueType string) (value interface{}, comparisonOperator string, logicOperator string) { var val interface{} var cOperator string = " = " var lOperator string = " AND " parts := strings.Split(queryStrValue, ":") len := len(parts) if valueType == "int" { var number int64 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func QueryStringParser(queryStr string, filters map[string]string) []FilteredResult {\n\t//define custom map type to allowduplicate keys\n\ttype Map struct {\n\t\tKey string\n\t\tValue string\n\t}\n\n\tparams := []Map{}\n\tsearchFilters := []FilteredResult{}\n\n\tparts := strings.Split(queryStr, \"&\")\n\n\t//bu...
[ "0.6000679", "0.5544201", "0.5538723", "0.5515873", "0.53919816", "0.5371112", "0.5337646", "0.5244362", "0.5227058", "0.5201624", "0.5035713", "0.49393153", "0.49017668", "0.4891215", "0.48855764", "0.48798397", "0.48732585", "0.486875", "0.48676294", "0.4867318", "0.4865230...
0.73141813
0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DailyRule.
DeepCopy — это автоматически сгенерированная функция глубокого копирования, копирующая получатель, создавая новый DailyRule.
func (in *DailyRule) DeepCopy() *DailyRule { if in == nil { return nil } out := new(DailyRule) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *Rule) DeepCopy() *Rule {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Rule)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *Rule) DeepCopy() *Rule {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Rule)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *Rule) DeepCopy() *Rule {\...
[ "0.5939093", "0.5939093", "0.5939093", "0.5939093", "0.5939093", "0.5546245", "0.5436166", "0.5406394", "0.539924", "0.5398177", "0.5362258", "0.53486407", "0.5299951", "0.52968395", "0.52954674", "0.5180423", "0.51571137", "0.4970968", "0.49688", "0.4924555", "0.49125367", ...
0.8802274
0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleRule.
DeepCopy — это автоматически сгенерированная функция глубокого копирования, копирующая получателя, создавая новый ScaleRule.
func (in *ScaleRule) DeepCopy() *ScaleRule { if in == nil { return nil } out := new(ScaleRule) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *Scale) DeepCopy() *Scale {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Scale)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *ScaleTarget) DeepCopy() *ScaleTarget {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(ScaleTarget)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (c *Li...
[ "0.69663656", "0.6074237", "0.5888195", "0.5856589", "0.57944095", "0.5784623", "0.55765456", "0.55765456", "0.55765456", "0.55765456", "0.55765456", "0.54937565", "0.5412746", "0.53581494", "0.5351253", "0.5344039", "0.53345853", "0.5311341", "0.52926254", "0.5274284", "0.52...
0.86958313
0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleSpec.
DeepCopy — это автоматически сгенерированная функция глубокого копирования, копирующая получателя, создавая новый ScaleSpec.
func (in *ScaleSpec) DeepCopy() *ScaleSpec { if in == nil { return nil } out := new(ScaleSpec) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *Scale) DeepCopy() *Scale {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Scale)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *ScalableTargetSpec) DeepCopy() *ScalableTargetSpec {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(ScalableTargetSpec)\n\tin.DeepCopyInto(out)\n\treturn ou...
[ "0.6918439", "0.64695114", "0.64396256", "0.6130816", "0.60759723", "0.6040713", "0.6040713", "0.59715873", "0.59645355", "0.5837462", "0.5815961", "0.579574", "0.5686585", "0.5682257", "0.56207305", "0.55996025", "0.5592483", "0.5588218", "0.5588218", "0.5588218", "0.558774"...
0.883849
0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleTarget.
DeepCopy — это автоматически сгенерированная функция глубокого копирования, копирующая получателя, создавая новый ScaleTarget.
func (in *ScaleTarget) DeepCopy() *ScaleTarget { if in == nil { return nil } out := new(ScaleTarget) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *Scale) DeepCopy() *Scale {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Scale)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *ScalableTarget) DeepCopy() *ScalableTarget {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(ScalableTarget)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "fu...
[ "0.76370376", "0.67633396", "0.62799335", "0.619151", "0.6033552", "0.6033552", "0.59817666", "0.5977553", "0.5958769", "0.5904952", "0.58848196", "0.5880546", "0.58670145", "0.5864372", "0.5860537", "0.58537394", "0.58474916", "0.5838018", "0.5838018", "0.581858", "0.5758691...
0.8381954
0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledPodScaler.
DeepCopy — это автоматически сгенерированная функция глубокого копирования, копирующая получателя, создавая новый ScheduledPodScaler.
func (in *ScheduledPodScaler) DeepCopy() *ScheduledPodScaler { if in == nil { return nil } out := new(ScheduledPodScaler) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *ScheduledPodScalerSpec) DeepCopy() *ScheduledPodScalerSpec {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(ScheduledPodScalerSpec)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *SchedulingScaler) DeepCopy() *SchedulingScaler {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Schedulin...
[ "0.71119064", "0.693392", "0.6830506", "0.6721001", "0.61442715", "0.5926196", "0.57947385", "0.56189704", "0.52660084", "0.5264063", "0.52457696", "0.51870626", "0.5126987", "0.5046777", "0.50401556", "0.49712822", "0.49698833", "0.49486116", "0.48586017", "0.4850098", "0.48...
0.8683148
0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledPodScalerList.
DeepCopy — это автоматически сгенерированная функция глубокого копирования, копирующая получателя, создавая новый ScheduledPodScalerList.
func (in *ScheduledPodScalerList) DeepCopy() *ScheduledPodScalerList { if in == nil { return nil } out := new(ScheduledPodScalerList) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *ScheduledPodScaler) DeepCopy() *ScheduledPodScaler {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(ScheduledPodScaler)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *SchedulingScalerList) DeepCopy() *SchedulingScalerList {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(SchedulingSca...
[ "0.7750979", "0.7559887", "0.6551569", "0.6509302", "0.6166534", "0.6004988", "0.58682466", "0.5656365", "0.5619697", "0.55305785", "0.54600435", "0.54446167", "0.54325646", "0.5428292", "0.5374004", "0.52421725", "0.5234001", "0.51786524", "0.5168573", "0.5000829", "0.499045...
0.8506346
0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledPodScalerSpec.
DeepCopy — это автоматически сгенерированная функция глубокого копирования, копирующая получатель, создавая новый ScheduledPodScalerSpec.
func (in *ScheduledPodScalerSpec) DeepCopy() *ScheduledPodScalerSpec { if in == nil { return nil } out := new(ScheduledPodScalerSpec) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *ScheduledPodScaler) DeepCopy() *ScheduledPodScaler {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(ScheduledPodScaler)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *SchedulingScalerSpec) DeepCopy() *SchedulingScalerSpec {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(SchedulingSca...
[ "0.7813591", "0.68805146", "0.65664226", "0.64651406", "0.61906093", "0.6134313", "0.6045399", "0.5950982", "0.57670134", "0.5747594", "0.57069665", "0.547154", "0.5444904", "0.536201", "0.53037184", "0.528185", "0.52285314", "0.52279866", "0.52279866", "0.50915116", "0.50893...
0.8583529
0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledPodScalerStatus.
DeepCopy — это автоматически сгенерированная функция глубокого копирования, копирующая получателя, создавая новый ScheduledPodScalerStatus.
func (in *ScheduledPodScalerStatus) DeepCopy() *ScheduledPodScalerStatus { if in == nil { return nil } out := new(ScheduledPodScalerStatus) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *SchedulingScalerStatus) DeepCopy() *SchedulingScalerStatus {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(SchedulingScalerStatus)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *ScheduledPodScaler) DeepCopy() *ScheduledPodScaler {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Sched...
[ "0.798133", "0.75455487", "0.6869868", "0.6523821", "0.640999", "0.626312", "0.62318623", "0.6178982", "0.61479557", "0.6132582", "0.61129105", "0.5976912", "0.58940923", "0.58825886", "0.5867689", "0.5855375", "0.5833105", "0.5830422", "0.5802052", "0.5787193", "0.57713723",...
0.86013246
0
PodmanImage provides access to an image reference from podman. same as github.com/google/gocontainerregistry/pkg/v1/daemon
PodmanImage предоставляет доступ к ссылке на образ из podman. аналогично github.com/google/gocontainerregistry/pkg/v1/daemon
func PodmanImage(ref name.Reference, options ...interface{}) (v1.Image, error) { var img v1.Image pr, pw := io.Pipe() go func() { opener := func() (io.ReadCloser, error) { return pr, nil } var err error tag := ref.(name.Digest).Tag() img, err = tarball.Image(opener, &tag) _ = pr.CloseWithError(err) }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (f *FakeRunner) podman(args []string, _ bool) (string, error) {\n\tswitch cmd := args[0]; cmd {\n\tcase \"--version\":\n\t\treturn \"podman version 1.6.4\", nil\n\n\tcase \"image\":\n\n\t\tif args[1] == \"inspect\" && args[2] == \"--format\" && args[3] == \"{{.Id}}\" {\n\t\t\tif args[3] == \"missing\" {\n\t\t...
[ "0.6808878", "0.66259", "0.6014489", "0.57632554", "0.57444906", "0.5724609", "0.56687987", "0.56613916", "0.56557065", "0.56465936", "0.56103295", "0.55788076", "0.555107", "0.55340725", "0.5532543", "0.5526531", "0.5525078", "0.5503822", "0.54514915", "0.5446481", "0.544018...
0.8102636
0
PodmanWrite saves the image into podman as the given tag. same as github.com/google/gocontainerregistry/pkg/v1/daemon
PodmanWrite сохраняет образ в podman с указанным тегом. аналогично github.com/google/gocontainerregistry/pkg/v1/daemon
func PodmanWrite(ref name.Reference, img v1.Image, opts ...tarball.WriteOption) (string, error) { pr, pw := io.Pipe() go func() { _ = pw.CloseWithError(tarball.Write(ref, img, pw, opts...)) }() // write the image in docker save format first, then load it cmd := exec.Command("sudo", "podman", "image", "load") c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func PodmanImage(ref name.Reference, options ...interface{}) (v1.Image, error) {\n\tvar img v1.Image\n\tpr, pw := io.Pipe()\n\tgo func() {\n\t\topener := func() (io.ReadCloser, error) {\n\t\t\treturn pr, nil\n\t\t}\n\t\tvar err error\n\t\ttag := ref.(name.Digest).Tag()\n\t\timg, err = tarball.Image(opener, &tag)\n...
[ "0.6227361", "0.5880108", "0.5780835", "0.5621885", "0.55258745", "0.5268894", "0.526887", "0.5263019", "0.5207825", "0.52056", "0.51899475", "0.51824105", "0.5133775", "0.50878125", "0.5065148", "0.50443953", "0.5037582", "0.503462", "0.5025062", "0.49834082", "0.4976932", ...
0.73809516
0
GenerateTestFile creates a file with the template values inserted into the template
GenerateTestFile создает файл с вставленными в шаблон значениями шаблона
func GenerateTestFile(testFileName string, templateValues *TemplateValues) error { outFile, err := os.Create(testFileName) if err != nil { fmt.Printf("Error creating test file named: %s\n", testFileName) } tmpl := template.Must(template.New("out").Parse(outputTemplate)) if err := tmpl.Execute(outFile, templateVa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CreateTestFile(fileName string) {\n\tif !strings.HasSuffix(fileName, \"_test.go\") {\n\t\treturn\n\t}\n\tcreateDir(fileName)\n\tif err := ioutil.WriteFile(fileName, []byte(mainttpl), 0644); err != nil {\n\t\tfmt.Printf(\"write file [%s] failed:%v\\n\", fileName, err)\n\t}\n}", "func GenerateWithTestFile(fil...
[ "0.70075065", "0.69138515", "0.6506305", "0.6493352", "0.63416076", "0.62526804", "0.61998314", "0.61942375", "0.61715287", "0.61503637", "0.61255413", "0.6116449", "0.61051226", "0.6090384", "0.60783386", "0.60713553", "0.60068524", "0.6002592", "0.5948072", "0.59080184", "0...
0.7975928
0
NewCredentialRepository instance of CredentialRepository
Экземпляр NewCredentialRepository класса CredentialRepository
func NewCredentialRepository(db *pgxpool.Pool) CredentialRepository { return &repo{ DB: db, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func New(c *config.Config) (*Repository, error) {\n\tDBURL := fmt.Sprintf(\"host=%s port=%d user=%s dbname=%s sslmode=disable password=%s\",\n\t\tc.Database.DBHost,\n\t\tc.Database.DBPort,\n\t\tc.Database.DBUser,\n\t\tc.Database.DBName,\n\t\tc.Database.DBPassword)\n\n\tdb, err := gorm.Open(dbDriver, DBURL)\n\tif e...
[ "0.59865445", "0.5940002", "0.59099764", "0.5908211", "0.58889973", "0.5883554", "0.58732665", "0.5836357", "0.58078223", "0.57829154", "0.5782139", "0.57490116", "0.5743227", "0.5730849", "0.5683967", "0.56299347", "0.5625149", "0.5606245", "0.55853844", "0.5578856", "0.5571...
0.7442926
0
GetCPUInfo reads the cpu info from the system
GetCPUInfo считывает информацию о процессоре с системы
func (info *RpiInfo) GetCPUInfo() error { file, err := os.Open("/proc/cpuinfo") if err != nil { return err } defer file.Close() info.readCPUInfo(file) return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s *Simple) CPUInfo(req *acomm.Request) (interface{}, *url.URL, error) {\n\tvar args CPUInfoArgs\n\tif err := req.UnmarshalArgs(&args); err != nil {\n\t\treturn nil, nil, err\n\t}\n\tif args.GuestID == \"\" {\n\t\treturn nil, nil, errors.New(\"missing guest_id\")\n\t}\n\n\tresult := &CPUInfoResult{\n\t\t&CPUI...
[ "0.78435516", "0.77686065", "0.75853837", "0.7222646", "0.718413", "0.7149646", "0.7146789", "0.7026387", "0.6978236", "0.67174673", "0.6629169", "0.65276617", "0.6524987", "0.6483721", "0.644528", "0.64240366", "0.6423062", "0.6414883", "0.6402341", "0.63637906", "0.6331547"...
0.817543
0
Deprecated: Use PbStatsSampleFeed.ProtoReflect.Descriptor instead.
Устарело: используйте PbStatsSampleFeed.ProtoReflect.Descriptor вместо этого.
func (*PbStatsSampleFeed) Descriptor() ([]byte, []int) { return file_stats_proto_rawDescGZIP(), []int{0} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*Sample) Descriptor() ([]byte, []int) {\n\treturn file_alameda_api_v1alpha1_datahub_common_metrics_proto_rawDescGZIP(), []int{0}\n}", "func (*RateLimitingSampler) Descriptor() ([]byte, []int) {\n\treturn file_github_com_solo_io_gloo_projects_gloo_api_external_envoy_config_trace_v3_opencensus_proto_rawDescG...
[ "0.688585", "0.6697076", "0.6658216", "0.6657251", "0.66076976", "0.6588843", "0.6540398", "0.646052", "0.64041436", "0.6333316", "0.6320216", "0.63077956", "0.6295664", "0.6284261", "0.6254959", "0.6246454", "0.6208883", "0.62084496", "0.6187565", "0.61792845", "0.6176941", ...
0.71332276
0
Deprecated: Use PbStatsSampleEntry.ProtoReflect.Descriptor instead.
Устарело: используйте PbStatsSampleEntry.ProtoReflect.Descriptor вместо этого.
func (*PbStatsSampleEntry) Descriptor() ([]byte, []int) { return file_stats_proto_rawDescGZIP(), []int{1} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*PbStatsSampleValue) Descriptor() ([]byte, []int) {\n\treturn file_stats_proto_rawDescGZIP(), []int{2}\n}", "func (*Sample) Descriptor() ([]byte, []int) {\n\treturn file_alameda_api_v1alpha1_datahub_common_metrics_proto_rawDescGZIP(), []int{0}\n}", "func (*PbStatsSampleFeed) Descriptor() ([]byte, []int) ...
[ "0.68787944", "0.67939395", "0.66097397", "0.6603801", "0.65751487", "0.6460975", "0.64265966", "0.6382489", "0.635776", "0.6314068", "0.6217413", "0.6216349", "0.6167733", "0.6165071", "0.60689914", "0.60576195", "0.6048943", "0.6048222", "0.60278815", "0.6014108", "0.600062...
0.71390134
0
Deprecated: Use PbStatsSampleValue.ProtoReflect.Descriptor instead.
Устарело: используйте PbStatsSampleValue.ProtoReflect.Descriptor вместо этого.
func (*PbStatsSampleValue) Descriptor() ([]byte, []int) { return file_stats_proto_rawDescGZIP(), []int{2} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*Sample) Descriptor() ([]byte, []int) {\n\treturn file_alameda_api_v1alpha1_datahub_common_metrics_proto_rawDescGZIP(), []int{0}\n}", "func (*PbStatsSampleEntry) Descriptor() ([]byte, []int) {\n\treturn file_stats_proto_rawDescGZIP(), []int{1}\n}", "func (*RateLimitingSampler) Descriptor() ([]byte, []int...
[ "0.66029704", "0.64383894", "0.63857913", "0.6335666", "0.62955904", "0.6280039", "0.62591803", "0.62557894", "0.6178983", "0.6160721", "0.6110993", "0.6035262", "0.6015043", "0.6011451", "0.59461766", "0.591946", "0.59136045", "0.5894612", "0.5889398", "0.5886022", "0.587540...
0.7226101
0
Deprecated: Use PbStatsIndexList.ProtoReflect.Descriptor instead.
Устарело: используйте PbStatsIndexList.ProtoReflect.Descriptor.
func (*PbStatsIndexList) Descriptor() ([]byte, []int) { return file_stats_proto_rawDescGZIP(), []int{3} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*PbStatsIndexFeed) Descriptor() ([]byte, []int) {\n\treturn file_stats_proto_rawDescGZIP(), []int{4}\n}", "func (*BulkIndexRequest) Descriptor() ([]byte, []int) {\n\treturn file_protobuf_index_proto_rawDescGZIP(), []int{14}\n}", "func (*BulkIndexResponse) Descriptor() ([]byte, []int) {\n\treturn file_pro...
[ "0.67219293", "0.65016353", "0.64582133", "0.64516765", "0.6328381", "0.63209164", "0.62839967", "0.62610024", "0.62606573", "0.6250601", "0.6246428", "0.62199354", "0.61826485", "0.617517", "0.6156711", "0.61428595", "0.61351675", "0.6117465", "0.6112063", "0.61055773", "0.6...
0.74354684
0
Deprecated: Use PbStatsIndexFeed.ProtoReflect.Descriptor instead.
Устарело: используйте PbStatsIndexFeed.ProtoReflect.Descriptor вместо этого.
func (*PbStatsIndexFeed) Descriptor() ([]byte, []int) { return file_stats_proto_rawDescGZIP(), []int{4} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*PbStatsIndexList) Descriptor() ([]byte, []int) {\n\treturn file_stats_proto_rawDescGZIP(), []int{3}\n}", "func (*PbStatsSampleFeed) Descriptor() ([]byte, []int) {\n\treturn file_stats_proto_rawDescGZIP(), []int{0}\n}", "func (*Stats) Descriptor() ([]byte, []int) {\n\treturn file_ligato_configurator_stat...
[ "0.6839277", "0.6659184", "0.65105623", "0.6504708", "0.6449082", "0.6407179", "0.64059883", "0.6391535", "0.6383989", "0.63711065", "0.6368005", "0.6338368", "0.63329124", "0.6324471", "0.6310324", "0.63043153", "0.62913704", "0.6273191", "0.6263567", "0.6243064", "0.6239559...
0.7314186
0
NewTree yields a tree corresponding to the given list of symbol frequencies
NewTree возвращает дерево, соответствующее заданному списку частот символов
func NewTree(fs []SymbolFreq) Tree { // Sort frequencies sort.Sort(byFreq(fs)) wrkList := []node{} for _, f := range fs { wrkList = append(wrkList, f) } for { if len(wrkList) < 2 { break } newNode := makeNewNode(wrkList[0], wrkList[1]) wrkList = insertItem(wrkList[2:], newNode) } return Tree{w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewEncodingTree(freq map[uint8]uint) *Node {\n\tvar head Node // Fictitious head\n\n\tfor i, v := range freq {\n\t\tnode := &Node{\n\t\t\tvalue: i,\n\t\t\tweight: v,\n\t\t}\n\t\thead.insert(node)\n\t}\n\n\tfor head.next != nil && head.next.next != nil {\n\t\tl := head.popFirst()\n\t\tr := head.popFirst()\n\n...
[ "0.6538434", "0.6366622", "0.62743187", "0.58552384", "0.55338293", "0.55299264", "0.5499571", "0.526624", "0.5263907", "0.5207011", "0.5103051", "0.50884753", "0.50820345", "0.50712985", "0.5066273", "0.50051606", "0.49906793", "0.49906793", "0.49438584", "0.49127695", "0.49...
0.79281396
0
NewTreeFromBS yields a tree from a bitstream encoding of a tree
NewTreeFromBS возвращает дерево из битового потока, кодирующего дерево
func NewTreeFromBS(bs *bitstream.BitStream) Tree { root := newTreeFromBS(bs) return Tree{root: root} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewTree() *BPTree {\n\treturn &BPTree{LastAddress: 0, keyPosMap: make(map[string]int64), enabledKeyPosMap: false}\n}", "func NewBTree(\n\tctx context.Context,\n\tobjStore *objstore.ObjectStore,\n\tencConf pbobject.EncryptionConfig,\n) (*BTree, error) {\n\trootNode := &Node{}\n\trootNode.Leaf = true\n\trootR...
[ "0.62798727", "0.6265652", "0.6131476", "0.60316855", "0.598983", "0.5987959", "0.586644", "0.57734203", "0.5725015", "0.56773776", "0.5623112", "0.5601665", "0.5570188", "0.55306107", "0.54862183", "0.5454313", "0.5434976", "0.5397777", "0.53739434", "0.5341786", "0.53324336...
0.8195643
0
Valid returns if the current type is one of AllTypes
Возвращает значение, если текущий тип является одним из AllTypes
func (t Type) Valid() bool { for _, typ := range AllTypes() { if t == typ { return true } } return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (t Type) IsValid() bool {\n\tfor _, knownType := range allKnownTypes {\n\t\tif t == knownType {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}", "func (t Type) Valid() bool {\n\treturn EvNone < t && t < EvCount\n}", "func (i ImageType) Valid() bool {\n\tswitch string(i) {\n\tcase \"\", \"local\", \"all...
[ "0.6825694", "0.6371591", "0.62264395", "0.6162184", "0.61585903", "0.61412436", "0.6111977", "0.61091393", "0.6106575", "0.6102013", "0.60669553", "0.6064694", "0.60605884", "0.604936", "0.59423536", "0.59300756", "0.59161454", "0.5910387", "0.5899794", "0.5895834", "0.58766...
0.7091641
0
ConcatSlice Returns a Concatenanted byte array into string
ConcatSlice Возвращает конкатенированный байтовый массив в строку
func ConcatSlice(sliceToConcat []byte) string { var dummy string for index := 0; index < len(sliceToConcat)-1; index++ { dummy = dummy + string(sliceToConcat[index]) + "-" } dummy = dummy + string(sliceToConcat[len(sliceToConcat)-1]) return dummy }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ConcatSlice(sliceToConcat []byte) string {\n\tstringRep := \"\"\n\n\tfor index := 0; index < len(sliceToConcat); index++ {\n\t\tstringRep = stringRep + string(sliceToConcat[index])\n\n\t\tif index+1 != len(sliceToConcat) {\n\t\t\tstringRep = stringRep + \"-\"\n\t\t}\n\t}\n\n\treturn stringRep\n}", "func Con...
[ "0.77931696", "0.7339889", "0.7212358", "0.6981443", "0.6410898", "0.63878906", "0.6327533", "0.61192644", "0.60112464", "0.5952378", "0.59362984", "0.59355867", "0.5909852", "0.589257", "0.58814573", "0.5867457", "0.5865077", "0.5848797", "0.58426183", "0.58351725", "0.57663...
0.776643
1
UseHTTPClient allows the default http client to be overriden for calls to the flow service. This function must be called prior to flows.WithFlow to take effect (e.g. from an init method)
UseHTTPClient позволяет переопределить стандартный http-клиент для вызовов к службе потока. Эта функция должна быть вызвана до вызова flows.WithFlow, чтобы изменения вступили в силу (например, из метода инициализации)
func UseHTTPClient(client *http.Client) { httpClient = client }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func UseHttpClient(client *http.Client) {\n\tdefaultHttpClient = client\n}", "func (o *GetTaskStatesDeprecatedParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}", "func (c *Client) SetHTTPClient(client *http.Client) {\n\tif client == nil {\n\t\tc.httpClient = http.DefaultClient\n\t\tretur...
[ "0.75783104", "0.7506294", "0.7492137", "0.74902767", "0.7485698", "0.7479744", "0.7455541", "0.7439341", "0.7431533", "0.74264723", "0.7426049", "0.7418902", "0.7417015", "0.7413888", "0.74032027", "0.73680377", "0.7363684", "0.7361882", "0.7361576", "0.7346382", "0.73421276...
0.8034563
0
RegisterAction registers a go function so it can be used as an action in a flow stage
RegisterAction регистрирует функцию go, чтобы она могла использоваться в качестве действия в этапе потока
func RegisterAction(actionFunc interface{}) { if reflect.TypeOf(actionFunc).Kind() != reflect.Func { panic("Action must be a function!") } actions[getActionKey(actionFunc)] = actionFunc }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Controller) RegisterAction(a *Action) {\n\tc.Actions = append(c.Actions, a)\n}", "func Register(name string, initFunc InitFunc) error {\n\tif _, exists := actions[name]; exists {\n\t\treturn fmt.Errorf(\"action name already registered %s\", name)\n\t}\n\tactions[name] = initFunc\n\n\treturn nil\n}", "...
[ "0.6698025", "0.6472137", "0.6467746", "0.63274443", "0.6133895", "0.61160654", "0.6039291", "0.5966115", "0.5854066", "0.57691675", "0.5761604", "0.56988126", "0.55745447", "0.5440735", "0.54097164", "0.5360043", "0.5345845", "0.525743", "0.52016634", "0.52012056", "0.517592...
0.75820374
0
unionRegexp separates values with a | operator to create a string representing a union of regexp patterns.
unionRegexp разделяет значения оператором | для создания строки, представляющей объединение шаблонов регулярных выражений.
func unionRegexp(values []string) string { if len(values) == 0 { // As a regular expression, "()" and "" are equivalent so this // condition wouldn't ordinarily be needed to distinguish these // values. But, our internal search engine assumes that "" // implies "no regexp" (no values), while "()" implies "matc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewUnion(l, r Regex) Regex {\n\tswitch l.(type) {\n\tcase *empty:\n\t\treturn r\n\tdefault:\n\t\treturn &union{\n\t\t\tl: l,\n\t\t\tr: r,\n\t\t}\n\t}\n}", "func RegexpSimplify(re *syntax.Regexp,) *syntax.Regexp", "func CombinedPatternsGiven(patterns []*regexp.Regexp) *regexp.Regexp {\n\tvar allPatterns []...
[ "0.61462075", "0.5724693", "0.54109585", "0.5389475", "0.5352758", "0.5311938", "0.5296446", "0.52079266", "0.509988", "0.5068835", "0.50166506", "0.4883824", "0.48613974", "0.48101395", "0.476411", "0.47462666", "0.4721221", "0.47110087", "0.4707788", "0.4707788", "0.4707788...
0.8219543
0
langToFileRegexp converts a lang: parameter to its corresponding file patterns for file filters. The lang value must be valid, cf. validate.go
langToFileRegexp преобразует параметр lang: в соответствующие шаблоны файлов для фильтров файлов. Значение lang должно быть корректным, см. validate.go
func langToFileRegexp(lang string) string { lang, _ = enry.GetLanguageByAlias(lang) // Invariant: lang is valid. extensions := enry.GetLanguageExtensions(lang) patterns := make([]string, len(extensions)) for i, e := range extensions { // Add `\.ext$` pattern to match files with the given extension. patterns[i] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func FileExtFilterForLang(lang string) (regex, glob string) {\n\tswitch strings.ToLower(lang) {\n\tcase \"go\", \"golang\":\n\t\treturn \".*\\\\.go\", \"*.go\"\n\t}\n\treturn \".*\", \"*\"\n}", "func FileExtToLanguage(ext string) (Language, error) {\n\tswitch {\n\tcase ext == \"c\":\n\t\treturn LangC, nil\n\tcas...
[ "0.6439551", "0.5576716", "0.5206838", "0.51490414", "0.50916624", "0.5010436", "0.49206352", "0.48391092", "0.47405547", "0.46976352", "0.46198", "0.45917705", "0.45901117", "0.45758092", "0.45268458", "0.45258516", "0.4491104", "0.44281682", "0.4424431", "0.4423438", "0.440...
0.8471336
0
ToTextPatternInfo converts a an atomic query to internal values that drive text search. An atomic query is a Basic query where the Pattern is either nil, or comprises only one Pattern node (hence, an atom, and not an expression). See TextPatternInfo for the values it computes and populates.
ToTextPatternInfo преобразует атомарный запрос в внутренние значения, которые управляют текстовым поиском. Атомарный запрос — это базовый запрос, где шаблон либо равен nil, либо состоит только из одного узла шаблона (поэтому он является атомом, а не выражением). См. TextPatternInfo для сведений о значениях, которые выч...
func ToTextPatternInfo(q query.Basic, p Protocol, transform query.BasicPass) *TextPatternInfo { q = transform(q) // Handle file: and -file: filters. filesInclude, filesExclude := IncludeExcludeValues(q, query.FieldFile) // Handle lang: and -lang: filters. langInclude, langExclude := IncludeExcludeValues(q, query.F...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func make_pattern_text(T int, // size of text\n\tP int, // size of pattern.\n\tN int, // number of pattern repetitions\n) ([]byte, []byte) {\n\n\tM := int(T / P) // Max # patterns that fit in text\n\tif M < N {\n\t\tpanic(fmt.Sprintf(\"make_pattern_text M < N. T=%d,P=%d,N=%d,M=%d\", T, P, N, M))\n\t}\n\tD := int(M...
[ "0.44653547", "0.40759063", "0.4058076", "0.40355238", "0.4020524", "0.4006181", "0.39993784", "0.39698073", "0.39609438", "0.3935596", "0.3901916", "0.39011815", "0.38950545", "0.38773555", "0.386563", "0.3861176", "0.38457578", "0.3833284", "0.3831979", "0.38072672", "0.380...
0.7166795
0
NewAddRemoteRDSNodeDefault creates a AddRemoteRDSNodeDefault with default headers values
NewAddRemoteRDSNodeDefault создает AddRemoteRDSNodeDefault с значениями заголовков по умолчанию
func NewAddRemoteRDSNodeDefault(code int) *AddRemoteRDSNodeDefault { return &AddRemoteRDSNodeDefault{ _statusCode: code, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (client IdentityClient) createTagDefault(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) {\n\n\thttpRequest, err := request.HTTPRequest(http.MethodPost, \"/tagDefaults\", binaryReqBody, extraHeaders)\n\tif err...
[ "0.5712152", "0.5362989", "0.5276561", "0.5187505", "0.5171736", "0.50459373", "0.49836302", "0.4941398", "0.4921797", "0.49036473", "0.48980224", "0.48975933", "0.48868924", "0.48832646", "0.48829064", "0.4865941", "0.4848242", "0.4837145", "0.48303595", "0.48179057", "0.480...
0.7135118
0
Code gets the status code for the add remote RDS node default response
Код получает код состояния для стандартного ответа на добавление удаленного узла RDS
func (o *AddRemoteRDSNodeDefault) Code() int { return o._statusCode }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *AddClusterV5Default) Code() int {\n\treturn o._statusCode\n}", "func (o *CreateAntivirusServerDefault) Code() int {\n\treturn o._statusCode\n}", "func (o *CreateServerSwitchingRuleDefault) Code() int {\n\treturn o._statusCode\n}", "func (o *ReplaceServerDefault) Code() int {\n\treturn o._statusCode\...
[ "0.692362", "0.6842809", "0.6776764", "0.6746196", "0.67214376", "0.6714648", "0.67118406", "0.6705345", "0.6704429", "0.6689789", "0.66794825", "0.6672727", "0.663601", "0.66230243", "0.6620177", "0.6610653", "0.6598204", "0.65737337", "0.6566433", "0.65617335", "0.65522105"...
0.80228853
0
Validate validates this add remote RDS node body
Проверяет этот add remote RDS node body
func (o *AddRemoteRDSNodeBody) Validate(formats strfmt.Registry) error { return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *AddRemoteRDSNodeOKBody) Validate(formats strfmt.Registry) error {\n\tvar res []error\n\n\tif err := o.validateRemoteRDS(formats); err != nil {\n\t\tres = append(res, err)\n\t}\n\n\tif len(res) > 0 {\n\t\treturn errors.CompositeValidationError(res...)\n\t}\n\treturn nil\n}", "func (o *AddRemoteRDSNodeOKB...
[ "0.68498296", "0.67687345", "0.61033916", "0.51745284", "0.5173281", "0.5138812", "0.5095825", "0.50670433", "0.50491786", "0.50297546", "0.5026576", "0.50178283", "0.49751574", "0.496253", "0.49549386", "0.49383596", "0.49335337", "0.49203494", "0.48882163", "0.48774028", "0...
0.7425289
0
wsMessage handles browser requests to /msg/
wsMessage обрабатывает запросы браузера по адресу /msg/
func wsMessage(w http.ResponseWriter, r *http.Request) { // Get session, continue only if authenticated sok, vok := checkLogin(r, cfgMap["session name"], "user") if !sok || !vok { http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) return } cc := make(chan bool) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (w *BaseWebsocketClient) OnWsMessage(payload []byte, isBinary bool) {}", "func handleMessage(msg *game.InMessage, ws *websocket.Conn, board *game.Board) {\n\tfmt.Println(\"Message Got: \", msg)\n\n}", "func (ctx *Context) MessageHandler(w http.ResponseWriter, r *http.Request) {\n\t//get the current user\n...
[ "0.71633077", "0.7148145", "0.6686693", "0.6623083", "0.6605026", "0.64997613", "0.6431778", "0.6405488", "0.63879466", "0.6301808", "0.62788296", "0.62768406", "0.62759316", "0.6266679", "0.6266447", "0.6254338", "0.6254338", "0.62163866", "0.6205541", "0.6175806", "0.617447...
0.8022294
0
wsChanSend build and send messages to connected browsers, the channel is shared between connections
wsChanSend отправляет сообщения подключенным браузерам, канал используется несколькими соединениями
func wsChanSend() { log.Println("wschan running...") i := 1 for { // send stuff to clients // TODO: solve multiple clients connecting wsChan <- "test: " + strconv.Itoa(i) i++ } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ws_SendMsg(ws *websocket.Conn, send_channel SendChannel) {\n\tfor {\n\t\tselect {\n\t\tcase send_msg := <-send_channel.containers:\n\t\t\tlog.Printf(\"[%s] containers sendMessage= \", __FILE__, send_msg)\n\t\t\twebsocket.JSON.Send(ws, send_msg)\n\t\tcase send_msg := <-send_channel.updateinfo:\n\t\t\tlog.Print...
[ "0.74745584", "0.7103419", "0.67399025", "0.6642084", "0.65906745", "0.6417173", "0.63003063", "0.6281131", "0.6261049", "0.6223444", "0.61551064", "0.6148204", "0.6134059", "0.6101055", "0.60894996", "0.60782266", "0.60752773", "0.6044252", "0.6042677", "0.6040374", "0.60394...
0.77143115
0
NewQuotaRateLimit registers a new resource with the given unique name, arguments, and options.
NewQuotaRateLimit регистрирует новый ресурс с указанным уникальным именем, аргументами и опциями.
func NewQuotaRateLimit(ctx *pulumi.Context, name string, args *QuotaRateLimitArgs, opts ...pulumi.ResourceOption) (*QuotaRateLimit, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Rate == nil { return nil, errors.New("invalid value for required argument 'Rat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewRateLimit(client curator.CuratorFramework, username string,\n\ttotalAllowedQuota, baseQuota int64, lockTimeout time.Duration, refreshWindow time.Duration,\n\tenableOptimization bool, optimizationPctAsk float64, optimizationPctLeft float64) (*RateLimit, error) {\n\tvar err error\n\trl := &RateLimit{\n\t\tus...
[ "0.70255303", "0.6392232", "0.6372643", "0.6265869", "0.62243545", "0.61384356", "0.6130965", "0.61270595", "0.6043387", "0.58570546", "0.58482", "0.5845201", "0.57947737", "0.57201415", "0.5692513", "0.56593245", "0.56315416", "0.559504", "0.55927944", "0.55651486", "0.55472...
0.7799792
0
GetQuotaRateLimit gets an existing QuotaRateLimit resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
GetQuotaRateLimit получает состояние существующего ресурса QuotaRateLimit с указанным именем, идентификатором и необязательными свойствами состояния, которые используются для однозначного определения поиска (nil, если это не требуется).
func GetQuotaRateLimit(ctx *pulumi.Context, name string, id pulumi.IDInput, state *QuotaRateLimitState, opts ...pulumi.ResourceOption) (*QuotaRateLimit, error) { var resource QuotaRateLimit err := ctx.ReadResource("vault:index/quotaRateLimit:QuotaRateLimit", name, id, state, &resource, opts...) if err != nil { re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (p *WorkerPool) GetRateLimit(ctx context.Context, rlRequest *RateLimitReq) (retval *RateLimitResp, reterr error) {\n\t// Delegate request to assigned channel based on request key.\n\tworker := p.getWorker(rlRequest.UniqueKey)\n\thandlerRequest := &request{\n\t\tctx: ctx,\n\t\tresp: make(chan *response,...
[ "0.63732344", "0.61184627", "0.6054561", "0.5927608", "0.59067774", "0.5875768", "0.5850694", "0.5722346", "0.5709863", "0.57009006", "0.55981433", "0.55607927", "0.5511379", "0.5488253", "0.545794", "0.545549", "0.5450386", "0.5448698", "0.54485756", "0.5434681", "0.5430217"...
0.7855245
0
NewEC2RemoteClient creates and initialise a new EC2RemoteClient object, given an AWS Instance ID
NewEC2RemoteClient создает и инициализирует новый объект EC2RemoteClient, заданный идентификатором AWS Instance
func NewEC2RemoteClient(InstanceID *string, credentials *sshCmdClient.SSHCredentials) (*EC2RemoteClient, error) { ins := new(EC2RemoteClient) ins.InstanceID = *InstanceID session, err := session.NewSession() if err != nil { return nil, err } ec2Client := ec2.New(session) ins.session = session ins.ec2Client...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewEC2Client(config EC2ClientConfig) (*AwsEC2, error) {\n\tif config.ControllerID == \"\" {\n\t\treturn nil, fmt.Errorf(\"ControllerID is a required parameter\")\n\t}\n\tif config.Nametag == \"\" {\n\t\treturn nil, fmt.Errorf(\"Nametag is a required parameter\")\n\t}\n\tec2Client, err := getEC2Client(config.E...
[ "0.6973776", "0.632608", "0.63121355", "0.6163207", "0.616059", "0.60730475", "0.6012531", "0.6009894", "0.5945188", "0.59106356", "0.5863934", "0.5777015", "0.57581896", "0.57090247", "0.569607", "0.5663689", "0.56583476", "0.5648572", "0.55632263", "0.55631524", "0.55515754...
0.7414689
0
startInstance starts an EC2 instance, and waits for it to become ready
startInstance запускает экземпляр EC2 и ожидает, пока он не станет готовым
func (ins *EC2RemoteClient) startInstance() error { log.Printf("Starting EC2 Instance %s", ins.InstanceID) _, err := ins.ec2Client.StartInstances(&ec2.StartInstancesInput{InstanceIds: aws.StringSlice([]string{ins.InstanceID})}) if err != nil { return fmt.Errorf("Error starting instance : %s", err) } log.Printf("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func startInstance(ec2Service *ec2.EC2, instance *ec2.Instance) error {\n\tinstanceState, err := getInstanceState(*instance)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif instanceState == \"shutting-down\" || instanceState == \"terminated\" || instanceState == \"stopping\" || instanceState == \"stopped\" {\n\t\tfm...
[ "0.7815959", "0.7357949", "0.727267", "0.6916077", "0.67272824", "0.67272824", "0.6538799", "0.6479852", "0.6445755", "0.64103496", "0.63575953", "0.6284689", "0.6194204", "0.61448747", "0.6061127", "0.6014265", "0.5959917", "0.59404624", "0.5913093", "0.5892486", "0.5862958"...
0.819455
0
getIPAddress retrieves the public IP address from AWS. Returns error if no address found
getIPAddress получает публичный IP-адрес из AWS. Возвращает ошибку, если адрес не найден
func (ins *EC2RemoteClient) getIPAddress() error { result, err := ins.ec2Client.DescribeInstances(&ec2.DescribeInstancesInput{InstanceIds: aws.StringSlice([]string{ins.InstanceID})}) if err != nil { return fmt.Errorf("Error getting instance details : %s", err) } ins.instanceIP = net.ParseIP(*result.Reservations[0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func GetPublicIPAddress() (string, error) {\n\tresp, err := http.Get(\"http://checkip.amazonaws.com/\")\n\tif resp != nil {\n\t\tdefer resp.Body.Close()\n\t\tresp.Close = true\n\t}\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdata, err := ioutil.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\...
[ "0.7920907", "0.72071975", "0.71239483", "0.6998655", "0.69610465", "0.6900017", "0.67306906", "0.67055154", "0.667737", "0.6630442", "0.65781665", "0.65764624", "0.65495", "0.65411216", "0.6536848", "0.6535142", "0.6501289", "0.64331317", "0.6390965", "0.6369778", "0.634591"...
0.7475399
1
makeReady prepares an EC2 instance for running remote SSH commands
makeReady готовит экземпляр EC2 для выполнения удаленных команд SSH
func (ins *EC2RemoteClient) makeReady() error { // Check Instance is running - will error if instance doesn't exist result, err := ins.ec2Client.DescribeInstanceStatus(&ec2.DescribeInstanceStatusInput{InstanceIds: aws.StringSlice([]string{ins.InstanceID})}) if err != nil { return fmt.Errorf("Error getting instanc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func setupServer(c *cli.Context) {\n started := time.Now()\n\n config := deployConfig()\n logger := &logger{Prefix: config.Host}\n ssh := newSSHClient(config.Host, config.User)\n\n ssh.execute(fmt.Sprintf(\"mkdir -p %s\", config.DeployTo))\n\n for _, t := range config.Setup {\n ssh.execute(t)\n }\n\n ss...
[ "0.61722517", "0.6099489", "0.5970563", "0.5950927", "0.5914715", "0.58060163", "0.57204074", "0.56962776", "0.5693759", "0.5692265", "0.5665352", "0.5654342", "0.5614", "0.5586875", "0.55865085", "0.5542265", "0.5467121", "0.5443552", "0.53783226", "0.5374821", "0.53677905",...
0.824867
0
RunCommand is a wrapper around the SSH client to run a command abstracts the SSH connection details from the EC2 client interface RunCommandWithOutput discards the stdout and stderr from the command
RunCommand — это обертка вокруг клиента SSH для выполнения команды, абстрагирующая детали подключения SSH от интерфейса клиента EC2. RunCommandWithOutput отбрасывает stdout и stderr команды.
func (ins *EC2RemoteClient) RunCommand(cmd string) (exitStatus int, err error) { exitStatus, err = ins.cmdClient.RunCommand(cmd) return exitStatus, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (ins *EC2RemoteClient) RunCommandWithOutput(cmd string) (exitStatus int, stdoutBuf bytes.Buffer, stderrBuf bytes.Buffer, err error) {\n\texitStatus, stdoutBuf, stderrBuf, err = ins.cmdClient.RunCommandWithOutput(cmd)\n\treturn exitStatus, stdoutBuf, stderrBuf, err\n}", "func (client *Client) Run(command str...
[ "0.76657516", "0.7013193", "0.69211733", "0.6870896", "0.6709051", "0.6662063", "0.6636994", "0.66365516", "0.6481154", "0.641191", "0.638604", "0.6359089", "0.62244153", "0.6218016", "0.6202877", "0.6187682", "0.6128655", "0.6123047", "0.6107656", "0.6102932", "0.6080359", ...
0.70666355
1
RunCommandWithOutput is a wrapper around the SSH client to run a command abstracts the SSH connection details from the EC2 client interface RunCommandWithOutput provides the stdout and stderr from the command
RunCommandWithOutput — это обертка вокруг клиента SSH для выполнения команды, абстрагирующая детали соединения SSH от интерфейса клиента EC2. RunCommandWithOutput предоставляет stdout и stderr от команды
func (ins *EC2RemoteClient) RunCommandWithOutput(cmd string) (exitStatus int, stdoutBuf bytes.Buffer, stderrBuf bytes.Buffer, err error) { exitStatus, stdoutBuf, stderrBuf, err = ins.cmdClient.RunCommandWithOutput(cmd) return exitStatus, stdoutBuf, stderrBuf, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *Host) ExecWithOutput(cmd string) (string, error) {\n\tsession, err := h.sshClient.NewSession()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer session.Close()\n\n\toutput, err := session.CombinedOutput(cmd)\n\tif err != nil {\n\t\treturn \"\", nil\n\t}\n\n\treturn strings.TrimSpace(string(output)),...
[ "0.6952449", "0.6858897", "0.6641178", "0.6570179", "0.64580804", "0.64087915", "0.6398316", "0.63903344", "0.6342059", "0.62891215", "0.621401", "0.6113792", "0.61105305", "0.6021509", "0.60071635", "0.5958194", "0.5943652", "0.5935481", "0.58707535", "0.5860281", "0.5839429...
0.8034174
0
BackgroundCommand is a wrapper around the SSH client to run a command abstracts the SSH connection details from the EC2 client interface
BackgroundCommand — это обертка вокруг клиента SSH для выполнения команды, абстрагирующая детали соединения SSH от интерфейса клиента EC2
func (ins *EC2RemoteClient) BackgroundCommand(cmd string, discardOutput bool) (int, error) { exitStatus, err := ins.cmdClient.BackgroundCommand(cmd, discardOutput) return exitStatus, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func cmdSSH() {\n\tswitch state := status(B2D.VM); state {\n\tcase vmUnregistered:\n\t\tlog.Fatalf(\"%s is not registered.\", B2D.VM)\n\tcase vmRunning:\n\t\tcmdParts := append(strings.Fields(B2D.SSHPrefix), fmt.Sprintf(\"%d\", B2D.SSHPort), \"docker@localhost\")\n\t\tif err := cmd(cmdParts[0], cmdParts[1:]...); e...
[ "0.5552612", "0.5394377", "0.5374934", "0.5220337", "0.51360375", "0.5109867", "0.5089216", "0.5080416", "0.50411", "0.5035837", "0.5011521", "0.50001675", "0.4995725", "0.49885878", "0.4986906", "0.4981291", "0.4974931", "0.49558264", "0.4928265", "0.49180338", "0.4910491", ...
0.7470312
0
CopyFile copies a file from the local filesystem to that on the EC2 instance
CopyFile копирует файл с локальной файловой системы на файловую систему EC2-инстанса
func (ins *EC2RemoteClient) CopyFile(source string, destination string) error { err := ins.cmdClient.CopyFile(source, destination) return err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func copyFile(srcFile string, destFile string) error {\n\tsrcReader, err := assets.FS.Open(srcFile)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error opening %s file: %w\", srcFile, err)\n\t}\n\tdefer srcReader.Close()\n\n\tdestReader, err := os.Create(destFile)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error cr...
[ "0.7557772", "0.7409318", "0.7393557", "0.73781157", "0.73433125", "0.72831494", "0.7226255", "0.7216362", "0.7208918", "0.7180465", "0.7172702", "0.7170716", "0.7159853", "0.71534693", "0.71534246", "0.7148969", "0.7106985", "0.7104262", "0.70982164", "0.7090298", "0.7056388...
0.7871186
0
WriteBytesToFile writes a []byte to a specified file on the EC2 instance
WriteBytesToFile записывает []byte в указанный файл на экземпляре EC2
func (ins *EC2RemoteClient) WriteBytesToFile(source []byte, destination string) error { err := ins.cmdClient.WriteBytesToFile(source, destination) return err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func WriteBytes(ctx context.Context, data []byte, filename string) error {\n\tif strings.HasPrefix(filename, \"gs://\") {\n\t\treturn writeGCSObject(ctx, data, filename)\n\t}\n\treturn ioutil.WriteFile(filename, data, os.ModePerm)\n}", "func SaveBytesToFile(content []byte, outputFile string, overwrite bool) erro...
[ "0.70434415", "0.6866407", "0.6832017", "0.68032885", "0.66986525", "0.6693543", "0.65425426", "0.64673275", "0.6426073", "0.6332181", "0.6302297", "0.6260653", "0.6243535", "0.6230753", "0.61927813", "0.6178638", "0.61687887", "0.61561227", "0.61376625", "0.61336935", "0.612...
0.80710757
0
Deprecated: Use SecretVersion.ProtoReflect.Descriptor instead.
Устарело: используйте SecretVersion.ProtoReflect.Descriptor вместо этого.
func (*SecretVersion) Descriptor() ([]byte, []int) { return file_google_cloud_secrets_v1beta1_resources_proto_rawDescGZIP(), []int{1} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*CredentialsKVProto) Descriptor() ([]byte, []int) {\n\treturn file_Security_proto_rawDescGZIP(), []int{1}\n}", "func (*SecretPayload) Descriptor() ([]byte, []int) {\n\treturn file_google_cloud_secrets_v1beta1_resources_proto_rawDescGZIP(), []int{3}\n}", "func (*TokenProto) Descriptor() ([]byte, []int) {\...
[ "0.6847484", "0.6715793", "0.6695759", "0.66937315", "0.6623736", "0.6599705", "0.65578085", "0.65053517", "0.6492708", "0.6484372", "0.6433935", "0.64155066", "0.64061314", "0.63588876", "0.6358342", "0.6349531", "0.6346874", "0.6325663", "0.6314042", "0.63127357", "0.629627...
0.705888
0
Deprecated: Use Replication_UserManaged_Replica.ProtoReflect.Descriptor instead.
Устарело: используйте Replication_UserManaged_Replica.ProtoReflect.Descriptor вместо этого.
func (*Replication_UserManaged_Replica) Descriptor() ([]byte, []int) { return file_google_cloud_secrets_v1beta1_resources_proto_rawDescGZIP(), []int{2, 1, 0} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*ReplicaInfo) Descriptor() ([]byte, []int) {\n\treturn file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_rawDescGZIP(), []int{0}\n}", "func (ReplicaInfo_ReplicaType) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_rawDescGZIP(...
[ "0.6919288", "0.67240775", "0.66489303", "0.6557044", "0.63410616", "0.63238233", "0.6313102", "0.6294632", "0.62538755", "0.6247766", "0.6238576", "0.6229779", "0.6208036", "0.6207874", "0.6207713", "0.61889184", "0.6183292", "0.61792266", "0.6175798", "0.61689883", "0.61688...
0.71663374
0
NewDeployment converts BOSH deployment information into a deployment view for the dashboard
NewDeployment преобразует информацию о развертывании BOSH в представление развертывания для панели управления
func NewDeployment(configTier config.Tier, configSlot config.Slot, boshDeployment *data.Deployment) (deployment *Deployment) { tierName := configTier.Name slotName := configSlot.Name name := fmt.Sprintf("%s / %s - %s", tierName, slotName, boshDeployment.Name) releases := make([]DisplayNameVersion, len(boshDeploym...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func newDeployment(apployment *appscodev1alpha1.Apployment) *appsv1.Deployment {\n\tlabels := map[string]string{\n\t\t\"app\": \"Appscode\",\n\t\t\"controller\": apployment.Name,\n\t}\n\treturn &appsv1.Deployment{\n\t\tObjectMeta: metav1.ObjectMeta{\n\t\t\tName: apployment.Spec.ApploymentName,\n\t\t\tN...
[ "0.7245263", "0.7115578", "0.69355154", "0.688241", "0.68323797", "0.67257977", "0.66148096", "0.64859754", "0.6411792", "0.6330559", "0.6227838", "0.6215856", "0.6212143", "0.6204911", "0.61451054", "0.6140682", "0.6136553", "0.61164033", "0.61146384", "0.61137414", "0.61049...
0.7144714
1
ContainsFilterTag determines if a Deployment has a release matching filterTag
ContainsFilterTag определяет, имеет ли Deployment выпуск, соответствующий filterTag
func (deployment *Deployment) ContainsFilterTag(filterTag string) bool { if filterTag == "" { return true } for _, release := range deployment.Releases { if release.Name == filterTag { return true } } return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func isReleaseTag(eventType string, payload api.WebhookGithub) bool {\n\tif api.GithubWebhookPush == eventType {\n\t\tif nil != payload[api.GithubWebhookFlagRef] &&\n\t\t\tstrings.Contains(payload[api.GithubWebhookFlagRef].(string),\n\t\t\t\tapi.GithubWebhookFlagTags) {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn f...
[ "0.63597506", "0.5253143", "0.5221754", "0.5196398", "0.51056296", "0.50931746", "0.4982437", "0.49158007", "0.48898113", "0.48771313", "0.4853815", "0.48363844", "0.48362416", "0.48145217", "0.4810747", "0.47806767", "0.47804633", "0.47619316", "0.4756543", "0.47478878", "0....
0.83583623
0
Init creates a new light string
Init создает новую строку света
func (ls *LightString) Init() { log.Infof("Creating %v pixel light string", ls.Count) ls.Last = ls.Count // default last pixel to count n := 0 for n < ls.Count { ls.Pixels = append(ls.Pixels, &Pixel{ Color: defaultPixelColor, Brightness: defaultPixelBrightness, }) n++ } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (td *TextDisplay)Init(){\r\n\tfontBytes, err := ioutil.ReadFile(\"Blockstepped.ttf\")\r\n\tif err != nil {\r\n\t\tlog.Println(err)\r\n\t\treturn\r\n\t}\r\n\tvar err2 error\r\n\ttd.font, err2 = truetype.Parse(fontBytes)\r\n\tif err2 != nil {\r\n\t\tlog.Fatal(err)\r\n\t}\r\n\ttd.mplusNormalFont = truetype.NewFa...
[ "0.5770172", "0.56220156", "0.55416876", "0.55140245", "0.54732513", "0.53269196", "0.52365375", "0.520851", "0.51928884", "0.5182738", "0.5087613", "0.5065547", "0.5049686", "0.5035323", "0.50059944", "0.49973142", "0.49936852", "0.4987295", "0.497426", "0.49706402", "0.4970...
0.7305143
0
FillString writes a color to all pixels
FillString записывает цвет во все пиксели
func (ls *LightString) FillString(color uint8) { log.Debugf("Filling pixels with color %v", color) n := 0 for n < ls.Last { ls.Pixels[n].Color = color log.Debugf("Coloring pixel %v %v", n, color) n++ } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func PaintFill(image [][]rune, row, col int, newColor rune) {\n\tpaintFillHelper(image, row, col, image[row][col], newColor)\n}", "func (tb *Textbox) Fill(u rune) error {\n\tif !utf8.ValidRune(u) {\n\t\treturn errors.New(\"invalid rune\")\n\t}\n\n\tfor i := range tb.pixels {\n\t\ttb.pixels[i] = u\n\t}\n\treturn ...
[ "0.63875264", "0.63263696", "0.6272358", "0.6254065", "0.60946006", "0.59574157", "0.5893883", "0.5891934", "0.58215666", "0.56947726", "0.5689455", "0.5674843", "0.56719476", "0.560667", "0.5572262", "0.5509258", "0.54924154", "0.5467268", "0.5448704", "0.5425666", "0.540781...
0.806296
0
NewDirectRequestSpec initializes a new DirectRequestSpec from a job.DirectRequestSpec
NewDirectRequestSpec инициализирует новый DirectRequestSpec из job.DirectRequestSpec
func NewDirectRequestSpec(spec *job.DirectRequestSpec) *DirectRequestSpec { return &DirectRequestSpec{ ContractAddress: spec.ContractAddress, MinIncomingConfirmations: spec.MinIncomingConfirmations, MinIncomingConfirmationsEnv: spec.MinIncomingConfirmationsEnv, MinContractPayment: spec....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewDirectRequestSpec(spec *job.DirectRequestSpec) *DirectRequestSpec {\n\treturn &DirectRequestSpec{\n\t\tContractAddress: spec.ContractAddress,\n\t\tOnChainJobSpecID: spec.OnChainJobSpecID.String(),\n\t\t// This is hardcoded to runlog. When we support other intiators, we need\n\t\t// to change this\n\t\tIni...
[ "0.81985295", "0.61109", "0.610836", "0.6104865", "0.60955787", "0.60782826", "0.60756934", "0.60756934", "0.6053734", "0.6053734", "0.6046308", "0.6046308", "0.60427433", "0.60427433", "0.6041208", "0.6038668", "0.6038668", "0.6030468", "0.60247654", "0.60017973", "0.599973"...
0.8256631
0
NewFluxMonitorSpec initializes a new DirectFluxMonitorSpec from a job.FluxMonitorSpec
NewFluxMonitorSpec инициализирует новый DirectFluxMonitorSpec из job.FluxMonitorSpec
func NewFluxMonitorSpec(spec *job.FluxMonitorSpec) *FluxMonitorSpec { var drumbeatSchedulePtr *string if spec.DrumbeatEnabled { drumbeatSchedulePtr = &spec.DrumbeatSchedule } var drumbeatRandomDelayPtr *string if spec.DrumbeatRandomDelay > 0 { drumbeatRandomDelay := spec.DrumbeatRandomDelay.String() drumbeat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewFluxMonitorSpec(spec *job.FluxMonitorSpec) *FluxMonitorSpec {\n\treturn &FluxMonitorSpec{\n\t\tContractAddress: spec.ContractAddress,\n\t\tPrecision: spec.Precision,\n\t\tThreshold: spec.Threshold,\n\t\tAbsoluteThreshold: spec.AbsoluteThreshold,\n\t\tPollTimerPeriod: spec.PollTimerPerio...
[ "0.7735614", "0.52191037", "0.51470137", "0.5015607", "0.49694467", "0.4964988", "0.49210796", "0.49060473", "0.49040398", "0.4856898", "0.48292074", "0.48211414", "0.4782509", "0.4765241", "0.47645527", "0.4729567", "0.4721767", "0.47063202", "0.46926945", "0.46776727", "0.4...
0.8116492
0
NewOffChainReportingSpec initializes a new OffChainReportingSpec from a job.OCROracleSpec
NewOffChainReportingSpec инициализирует новый OffChainReportingSpec из job.OCROracleSpec
func NewOffChainReportingSpec(spec *job.OCROracleSpec) *OffChainReportingSpec { return &OffChainReportingSpec{ ContractAddress: spec.ContractAddress, P2PBootstrapPeers: spec.P2PBootstrapPeers, P2PV2Bootstrappers: spec.P2PV2Bootstrappers, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewOffChainReportingSpec(spec *job.OffchainReportingOracleSpec) *OffChainReportingSpec {\n\treturn &OffChainReportingSpec{\n\t\tContractAddress: spec.ContractAddress,\n\t\tP2PPeerID: spec.P2PPeerID,\n\t\tP2PBootstrapPeers: spec.P2PBootst...
[ "0.76700133", "0.6786117", "0.5106095", "0.505037", "0.49529737", "0.4917524", "0.48303846", "0.48108968", "0.48050052", "0.4734925", "0.47245955", "0.46765545", "0.46355996", "0.4632689", "0.46127805", "0.46126866", "0.45519337", "0.45240414", "0.451157", "0.44827083", "0.44...
0.78592646
0
NewOffChainReporting2Spec initializes a new OffChainReportingSpec from a job.OCR2OracleSpec
NewOffChainReporting2Spec инициализирует новый OffChainReportingSpec из задания.OCR2OracleSpec
func NewOffChainReporting2Spec(spec *job.OCR2OracleSpec) *OffChainReporting2Spec { return &OffChainReporting2Spec{ ContractID: spec.ContractID, Relay: spec.Relay, RelayConfig: spec.RelayConfig, P2PV2Bootstrappers: spec.P2PV...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewOffChainReportingSpec(spec *job.OCROracleSpec) *OffChainReportingSpec {\n\treturn &OffChainReportingSpec{\n\t\tContractAddress: spec.ContractAddress,\n\t\tP2PBootstrapPeers: spec.P2PBootstrapPeers,\n\t\tP2PV2Bootstrappers: spec.P2PV2B...
[ "0.74342453", "0.7407351", "0.5452599", "0.52549857", "0.5217595", "0.4960075", "0.48198467", "0.4791364", "0.4668639", "0.46265647", "0.46166524", "0.46087602", "0.46001962", "0.4571639", "0.45662475", "0.4562123", "0.45615572", "0.45457885", "0.4515329", "0.451332", "0.4507...
0.7729383
0
NewPipelineSpec generates a new PipelineSpec from a pipeline.Spec
NewPipelineSpec генерирует новый PipelineSpec на основе pipeline.Spec
func NewPipelineSpec(spec *pipeline.Spec) PipelineSpec { return PipelineSpec{ ID: spec.ID, JobID: spec.JobID, DotDAGSource: spec.DotDagSource, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewPipelineSpec(spec *pipeline.Spec) PipelineSpec {\n\treturn PipelineSpec{\n\t\tID: spec.ID,\n\t\tDotDAGSource: spec.DotDagSource,\n\t}\n}", "func (in *PipelineSpec) DeepCopy() *PipelineSpec {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(PipelineSpec)\n\tin.DeepCopyInto(out)\n\treturn out...
[ "0.82939947", "0.7002424", "0.7002424", "0.7002424", "0.6526051", "0.636503", "0.6136273", "0.611253", "0.5635833", "0.56107116", "0.553662", "0.53617257", "0.5338917", "0.531994", "0.5294855", "0.527345", "0.5272532", "0.5264014", "0.52633154", "0.5214412", "0.52054584", "...
0.8225763
1
NewKeeperSpec generates a new KeeperSpec from a job.KeeperSpec
NewKeeperSpec генерирует новый KeeperSpec на основе job.KeeperSpec
func NewKeeperSpec(spec *job.KeeperSpec) *KeeperSpec { return &KeeperSpec{ ContractAddress: spec.ContractAddress, FromAddress: spec.FromAddress, CreatedAt: spec.CreatedAt, UpdatedAt: spec.UpdatedAt, EVMChainID: spec.EVMChainID, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewKeeperSpec(spec *job.KeeperSpec) *KeeperSpec {\n\treturn &KeeperSpec{\n\t\tContractAddress: spec.ContractAddress,\n\t\tFromAddress: spec.FromAddress,\n\t\tCreatedAt: spec.CreatedAt,\n\t\tUpdatedAt: spec.UpdatedAt,\n\t}\n}", "func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, pk ProtocolKe...
[ "0.81380135", "0.642263", "0.6284003", "0.61777276", "0.61743927", "0.6154568", "0.6145337", "0.61207503", "0.61089283", "0.6068348", "0.6050417", "0.60409606", "0.6033205", "0.5995373", "0.59891766", "0.5973247", "0.59710914", "0.5970534", "0.59357965", "0.5931972", "0.59264...
0.810713
1
NewWebhookSpec generates a new WebhookSpec from a job.WebhookSpec
NewWebhookSpec генерирует новый WebhookSpec на основе job.WebhookSpec
func NewWebhookSpec(spec *job.WebhookSpec) *WebhookSpec { return &WebhookSpec{ CreatedAt: spec.CreatedAt, UpdatedAt: spec.UpdatedAt, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewWebhook(timeout time.Duration) filters.Spec {\n\treturn WebhookWithOptions(WebhookOptions{Timeout: timeout, Tracer: opentracing.NoopTracer{}})\n}", "func (in *GitHubWebhookSpec) DeepCopy() *GitHubWebhookSpec {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(GitHubWebhookSpec)\n\tin.DeepCopyInto(out)...
[ "0.62817883", "0.60171837", "0.5866091", "0.5728155", "0.5688821", "0.5654436", "0.56526816", "0.55921936", "0.55623686", "0.55391085", "0.548519", "0.5471916", "0.5470614", "0.54071194", "0.5395845", "0.5376193", "0.5341764", "0.5336821", "0.53300333", "0.53069496", "0.52973...
0.8407555
0
NewCronSpec generates a new CronSpec from a job.CronSpec
NewCronSpec генерирует новый CronSpec на основе job.CronSpec
func NewCronSpec(spec *job.CronSpec) *CronSpec { return &CronSpec{ CronSchedule: spec.CronSchedule, CreatedAt: spec.CreatedAt, UpdatedAt: spec.UpdatedAt, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewCronFromJobSpec(\n\tjobSpec job.Job,\n\tpipelineRunner pipeline.Runner,\n) (*Cron, error) {\n\n\tcronSpec := jobSpec.CronSpec\n\tspec := jobSpec.PipelineSpec\n\n\tcronLogger := logger.CreateLogger(\n\t\tlogger.Default.With(\n\t\t\t\"jobID\", jobSpec.ID,\n\t\t\t\"schedule\", cronSpec.CronSchedule,\n\t\t),\n...
[ "0.74659383", "0.6873497", "0.6515948", "0.64865166", "0.64812636", "0.6299038", "0.62634075", "0.62484765", "0.60576093", "0.5970894", "0.59279096", "0.5879235", "0.58560973", "0.57060903", "0.56286716", "0.5588584", "0.55848086", "0.557354", "0.5539054", "0.55289936", "0.54...
0.81789845
0
NewBlockhashStoreSpec creates a new BlockhashStoreSpec for the given parameters.
NewBlockhashStoreSpec создает новый BlockhashStoreSpec для заданных параметров.
func NewBlockhashStoreSpec(spec *job.BlockhashStoreSpec) *BlockhashStoreSpec { return &BlockhashStoreSpec{ CoordinatorV1Address: spec.CoordinatorV1Address, CoordinatorV2Address: spec.CoordinatorV2Address, CoordinatorV2PlusAddress: spec.CoordinatorV2PlusAddress, WaitBlocks: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func newMockBlockHeaderStore() *mockBlockHeaderStore {\n\treturn &mockBlockHeaderStore{\n\t\theaders: make(map[chainhash.Hash]wire.BlockHeader),\n\t\theights: make(map[uint32]wire.BlockHeader),\n\t}\n}", "func newChainStore(r repo.Repo, genTS *types.TipSet) *CborBlockStore {\n\ttempBlock := r.Datastore()\n\tcbor...
[ "0.6099992", "0.56509185", "0.55223393", "0.5484488", "0.5479262", "0.5428878", "0.5401267", "0.5392514", "0.5379299", "0.53530794", "0.5318673", "0.52941626", "0.52702796", "0.52518064", "0.52428454", "0.5215994", "0.52090174", "0.5206185", "0.51709896", "0.5166824", "0.5156...
0.7850846
0
NewBlockHeaderFeederSpec creates a new BlockHeaderFeederSpec for the given parameters.
NewBlockHeaderFeederSpec создает новый BlockHeaderFeederSpec для заданных параметров.
func NewBlockHeaderFeederSpec(spec *job.BlockHeaderFeederSpec) *BlockHeaderFeederSpec { return &BlockHeaderFeederSpec{ CoordinatorV1Address: spec.CoordinatorV1Address, CoordinatorV2Address: spec.CoordinatorV2Address, CoordinatorV2PlusAddress: spec.CoordinatorV2PlusAddress, WaitBlocks: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (_Rootchain *RootchainFilterer) FilterNewHeaderBlock(opts *bind.FilterOpts, proposer []common.Address, headerBlockId []*big.Int, reward []*big.Int) (*RootchainNewHeaderBlockIterator, error) {\n\n\tvar proposerRule []interface{}\n\tfor _, proposerItem := range proposer {\n\t\tproposerRule = append(proposerRule...
[ "0.56433254", "0.53405935", "0.5309693", "0.52485263", "0.5207438", "0.52066755", "0.5181882", "0.51282775", "0.5117454", "0.50633496", "0.5005211", "0.4995157", "0.49901152", "0.4985155", "0.4977487", "0.49115044", "0.4903588", "0.4873314", "0.48645684", "0.48605022", "0.485...
0.7923484
0
NewBootstrapSpec initializes a new BootstrapSpec from a job.BootstrapSpec
NewBootstrapSpec инициализирует новый BootstrapSpec из job.BootstrapSpec
func NewBootstrapSpec(spec *job.BootstrapSpec) *BootstrapSpec { return &BootstrapSpec{ ContractID: spec.ContractID, Relay: spec.Relay, RelayConfig: spec.RelayConfig, BlockchainTimeout: spec.BlockchainTimeout, ContractCon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func newBootstrapTemplate(e2eCtx *E2EContext) *cfn_bootstrap.Template {\n\tBy(\"Creating a bootstrap AWSIAMConfiguration\")\n\tt := cfn_bootstrap.NewTemplate()\n\tt.Spec.BootstrapUser.Enable = true\n\tt.Spec.SecureSecretsBackends = []v1alpha3.SecretBackend{\n\t\tv1alpha3.SecretBackendSecretsManager,\n\t\tv1alpha3....
[ "0.5944629", "0.5933648", "0.59169173", "0.56426483", "0.5536578", "0.5498435", "0.54153734", "0.5258806", "0.51931775", "0.5177603", "0.514529", "0.5142841", "0.5117338", "0.5056667", "0.50183445", "0.5017194", "0.49952316", "0.49911648", "0.49311557", "0.49291143", "0.49195...
0.7841147
0
NewJobResource initializes a new JSONAPI job resource
NewJobResource инициализирует новый JSONAPI ресурс задачи
func NewJobResource(j job.Job) *JobResource { resource := &JobResource{ JAID: NewJAIDInt32(j.ID), Name: j.Name.ValueOrZero(), Type: JobSpecType(j.Type), SchemaVersion: j.SchemaVersion, GasLimit: j.GasLimit, ForwardingAllowed: j.ForwardingAllowed, MaxTas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewJobResource(j job.Job) *JobResource {\n\tresource := &JobResource{\n\t\tJAID: NewJAIDInt32(j.ID),\n\t\tName: j.Name.ValueOrZero(),\n\t\tType: JobSpecType(j.Type),\n\t\tSchemaVersion: j.SchemaVersion,\n\t\tMaxTaskDuration: j.MaxTaskDuration,\n\t\tPipelineSpec: NewPipeli...
[ "0.71115786", "0.6927896", "0.68013906", "0.6778276", "0.67617893", "0.6550171", "0.6489", "0.63859403", "0.63677716", "0.6361811", "0.63571984", "0.63510984", "0.634167", "0.6319448", "0.63165826", "0.62932074", "0.6272358", "0.62598807", "0.6237205", "0.6236662", "0.6225984...
0.7175808
0
WithGroupIDConsumerOption provides an option to modify the GroupID for a consumer Group
WithGroupIDConsumerOption предоставляет возможность изменить GroupID для потребителя Group
func WithGroupIDConsumerOption(groupID string) ConsumerOption { return func(c *Consumer) { c.config.GroupID = groupID } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func WithConsumerGroupID(groupID string) ConfigOpt {\n\treturn func(c *kafkalib.ConfigMap) {\n\t\t_ = c.SetKey(\"group.id\", groupID)\n\t}\n}", "func ConsumerSetGroupID(groupID string) model.Option {\n\treturn model.FuncOption(func(d *model.Dispatcher) { d.ConsumerGroupID = groupID })\n}", "func DeliverGroup(g...
[ "0.802058", "0.7819796", "0.61697775", "0.60025406", "0.5875389", "0.58104455", "0.57588154", "0.5694752", "0.5690244", "0.56404895", "0.5616615", "0.55349314", "0.55349314", "0.5481481", "0.5397696", "0.53932905", "0.53766704", "0.53226244", "0.5288298", "0.5288043", "0.5282...
0.82104796
0
WithTopicConsumerOption provides an option to modify the topic on which the Consumer will listen to
WithTopicConsumerOption предоставляет возможность изменить тему, на которой будет подписываться Consumer
func WithTopicConsumerOption(topic string) ConsumerOption { return func(c *Consumer) { c.config.Topic = topic } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Consumer) SetTopic(topic string) *Consumer {\n\tif topic != \"\" {\n\t\tc.mutex.Lock()\n\t\tc.bind.SetKey(topic)\n\t\tc.mutex.Unlock()\n\t\tc.SetQueueName(true, \"\")\n\t\tc.SetChannelKey(true, \"\")\n\t}\n\treturn c\n}", "func WithTopic(ctx context.Context, topic string) context.Context {\n\treturn con...
[ "0.6210682", "0.6181558", "0.5921562", "0.57679456", "0.57265645", "0.5627791", "0.56116796", "0.56046695", "0.5534199", "0.5490605", "0.5454656", "0.54239225", "0.5391212", "0.5385388", "0.53655887", "0.5318569", "0.53060013", "0.52522916", "0.5226082", "0.5217438", "0.51836...
0.79187584
0
WithMaxMinByteConsumerOption provides an option to modify the min/max byte that can written to kafka
WithMaxMinByteConsumerOption позволяет изменить минимальное/максимальное количество байтов, которые можно записать в Kafka
func WithMaxMinByteConsumerOption(min, max int) ConsumerOption { return func(c *Consumer) { c.config.MinBytes = min c.config.MaxBytes = max } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func WithMaxBytes(maxBytes int) ProducerOption {\n\treturn func(p *ProducerConfiguration) {\n\t\t_ = p.KafkaConfig.SetKey(\"message.max.bytes\", maxBytes)\n\t}\n}", "func MaxRequestMaxBytes(max int) ConsumerOption {\n\treturn func(o *api.ConsumerConfig) error {\n\t\to.MaxRequestMaxBytes = max\n\t\treturn nil\n\t...
[ "0.6460316", "0.6222933", "0.57933277", "0.5723617", "0.5691092", "0.55269736", "0.5415435", "0.52666736", "0.5261587", "0.5226586", "0.52105325", "0.5204843", "0.51837397", "0.5139786", "0.5101226", "0.5093622", "0.5091504", "0.50828505", "0.50730497", "0.50669616", "0.50474...
0.811482
0
WithAutoCommitConsumerOption sets the autocommit property of consumer
WithAutoCommitConsumerOption устанавливает свойство autocommit потребителя
func WithAutoCommitConsumerOption(flag bool) ConsumerOption { return func(c *Consumer) { c.autocommit = flag } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func WithAutoCommitTimeConsumerOption(dur time.Duration) ConsumerOption {\n\treturn func(c *Consumer) { c.config.CommitInterval = dur }\n}", "func (m *Eth) AutoCommit(toggle bool) {\n\tif toggle {\n\t\tm.StartMining()\n\t} else {\n\t\tm.StopMining()\n\t}\n}", "func CommitSync() OptionFunc {\n\treturn func(c *C...
[ "0.7708878", "0.62646776", "0.5866283", "0.5665535", "0.5649291", "0.56325513", "0.5467695", "0.5445847", "0.5381265", "0.53750414", "0.5210893", "0.5156814", "0.51398385", "0.51015705", "0.5085359", "0.49919894", "0.49556273", "0.48541895", "0.48460233", "0.4829172", "0.4811...
0.88928133
0
WithAutoCommitTimeConsumerOption sets the auto commit time for Consumer
WithAutoCommitTimeConsumerOption задает время автоматического коммита для Consumer
func WithAutoCommitTimeConsumerOption(dur time.Duration) ConsumerOption { return func(c *Consumer) { c.config.CommitInterval = dur } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func WithAutoCommitConsumerOption(flag bool) ConsumerOption {\n\treturn func(c *Consumer) { c.autocommit = flag }\n}", "func (m *Eth) AutoCommit(toggle bool) {\n\tif toggle {\n\t\tm.StartMining()\n\t} else {\n\t\tm.StopMining()\n\t}\n}", "func AutoCheckpoint(interval time.Duration) ConsumerOption {\n\treturn f...
[ "0.80161095", "0.5698739", "0.56289744", "0.55272317", "0.5302148", "0.52034277", "0.5149862", "0.5130434", "0.5120156", "0.5006398", "0.4895261", "0.48788273", "0.47227955", "0.47208133", "0.47032696", "0.46719334", "0.46237248", "0.46131718", "0.45893103", "0.45277336", "0....
0.8712708
0
WithDecoderConsumerOption sets the decoder for the Consumer Message
WithDecoderConsumerOption устанавливает декодер для сообщения Consumer
func WithDecoderConsumerOption(fn Decoder) ConsumerOption { return func(c *Consumer) { c.dec = fn } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func WithReaderConsumerOption(reader *kafgo.Reader) ConsumerOption {\n\treturn func(c *Consumer) { c.reader = reader }\n}", "func WithDecoder(key string, dec func(body io.ReadCloser) (io.ReadCloser, error)) ToServerOption {\n\treturn func(opts *toServerOptions) {\n\t\tif opts.decoders == nil {\n\t\t\topts.decode...
[ "0.6346354", "0.57452494", "0.5407947", "0.53981495", "0.539218", "0.53732616", "0.53729", "0.52718526", "0.5188233", "0.51518285", "0.510901", "0.50905174", "0.49296317", "0.49056286", "0.48400813", "0.48395008", "0.48391026", "0.4833951", "0.48156092", "0.479748", "0.478445...
0.83780915
0
WithBeforeFuncsConsumerOption provides a way to set BeforeFunc(s) to the consumer
WithBeforeFuncsConsumerOption позволяет задать BeforeFunc(s) для потребителя
func WithBeforeFuncsConsumerOption(fns ...BeforeFunc) ConsumerOption { return func(c *Consumer) { c.befores = append(c.befores, fns...) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func WithAfterFuncsConsumerOption(fns ...AfterFunc) ConsumerOption {\n\treturn func(c *Consumer) { c.afters = append(c.afters, fns...) }\n}", "func (response *Response) Before(fn func()) {\n\tresponse.beforeFuncs = append(response.beforeFuncs, fn)\n}", "func BeforeStart(fn func(context.Context) error) Option {...
[ "0.6618595", "0.5789044", "0.57522064", "0.5682141", "0.56307137", "0.54601324", "0.5457689", "0.54529136", "0.5351939", "0.52193326", "0.5124414", "0.50656784", "0.50458676", "0.49094933", "0.48592332", "0.4859097", "0.48306805", "0.48134655", "0.4813117", "0.48100883", "0.4...
0.87780225
0
WithAfterFuncsConsumerOption provides a way to set AfterFunc(s) to the consumer
WithAfterFuncsConsumerOption предоставляет способ установки AfterFunc(s) для потребителя
func WithAfterFuncsConsumerOption(fns ...AfterFunc) ConsumerOption { return func(c *Consumer) { c.afters = append(c.afters, fns...) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func WithBeforeFuncsConsumerOption(fns ...BeforeFunc) ConsumerOption {\n\treturn func(c *Consumer) { c.befores = append(c.befores, fns...) }\n}", "func (response *Response) After(fn func()) {\n\tresponse.afterFuncs = append(response.afterFuncs, fn)\n}", "func After(routines []func(), callback func()) {\n\tvar ...
[ "0.7024639", "0.6065201", "0.5984738", "0.5939588", "0.58868283", "0.5807153", "0.5745618", "0.5697903", "0.5637532", "0.5575202", "0.55675274", "0.55618495", "0.54770416", "0.5417393", "0.53260213", "0.52852386", "0.5212502", "0.51372826", "0.5116915", "0.5115929", "0.511328...
0.87876165
0
WithEndpointConsumerOption provides a way to set endpoint to the consumer
WithEndpointConsumerOption позволяет задать endpoint для потребителя
func WithEndpointConsumerOption(end endpoint.Endpoint) ConsumerOption { return func(c *Consumer) { c.end = end } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func WithEndpoint(e string) Option {\n\treturn func(o *Options) {\n\t\to.Endpoint = e\n\t}\n}", "func WithEndpoint(endpoint string) Option {\n\treturn wrappedOption{oconf.WithEndpoint(endpoint)}\n}", "func WithEndpoint(endpoint string) Option {\n\treturn func(o *options) {\n\t\to.endpoint = endpoint\n\t}\n}", ...
[ "0.70915824", "0.7042524", "0.69967586", "0.6994163", "0.6945915", "0.6737613", "0.67196137", "0.661804", "0.6488725", "0.6401157", "0.61127394", "0.6109585", "0.60376006", "0.60001093", "0.60001093", "0.59774673", "0.5949713", "0.58298445", "0.57701105", "0.57417226", "0.573...
0.8235426
0
WithReaderConsumerOption lets you set the reader for kafka
WithReaderConsumerOption позволяет задать читателя для kafka
func WithReaderConsumerOption(reader *kafgo.Reader) ConsumerOption { return func(c *Consumer) { c.reader = reader } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ConsumerReader(r StreamReader) ConsumerOptionsFn {\n\treturn func(o *Consumer) error {\n\t\to.reader = r\n\t\treturn nil\n\t}\n}", "func WithReader(r reader.Reader) Option {\n\treturn func(o *Options) {\n\t\to.Reader = r\n\t}\n}", "func WithReader(r reader.Reader) loader.Option {\n\treturn func(o *loader....
[ "0.721365", "0.63954514", "0.612182", "0.60554236", "0.5910244", "0.58986294", "0.56332886", "0.5478815", "0.54349446", "0.5386139", "0.52661705", "0.52229625", "0.52031034", "0.5185453", "0.51728", "0.5157714", "0.51267815", "0.51030433", "0.5096483", "0.50594753", "0.501666...
0.84777284
0
WithOffsetConsumerOption lets you set the kafka offset to read from
WithOffsetConsumerOption позволяет задать смещение Kafka для чтения
func WithOffsetConsumerOption(offset int64) ConsumerOption { return func(c *Consumer) { switch offset { case LastOffset: c.config.StartOffset = LastOffset case FirstOffset: c.config.StartOffset = FirstOffset default: c.config.StartOffset = FirstOffset } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (_options *ListTopicsOptions) SetOffset(offset int64) *ListTopicsOptions {\n\t_options.Offset = core.Int64Ptr(offset)\n\treturn _options\n}", "func WithOffset(offset int) eventsource.QueryOption {\n\treturn func(i interface{}) {\n\t\tif o, ok := i.(*options); ok {\n\t\t\to.offset = &offset\n\t\t}\n\t}\n}", ...
[ "0.65632766", "0.63940036", "0.6103379", "0.6010719", "0.5940324", "0.59126174", "0.59043145", "0.5897389", "0.58670217", "0.5842533", "0.5818599", "0.5817295", "0.58023596", "0.5781974", "0.5693429", "0.5672001", "0.5663549", "0.565853", "0.5648319", "0.56464297", "0.5642492...
0.8170133
0
NewConsumer returns kafka consumer for the given brokers
NewConsumer возвращает kafka consumer для заданных брокеров
func NewConsumer( brokers []string, logger log.Logger, options ...ConsumerOption, ) (*Consumer, error) { // default values cfg := kafgo.ReaderConfig{ Brokers: brokers, GroupID: defaultConsumerGroupID, Topic: defaultTopic, Logger: kafka.LoggerFunc(logger.Debugf), } cs := &Consumer{ reader: nil, co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewConsumer(addrs, zookeepers []string, group, topic string, config *Config) (*Consumer, error) {\n\tif config == nil {\n\t\tconfig = new(Config)\n\t}\n\n\tclient, err := sarama.NewClient(addrs, config.Config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tc, err := NewConsumerFromClient(client, zookeepers...
[ "0.76603764", "0.7496496", "0.7483704", "0.7291043", "0.72738576", "0.7219477", "0.71694016", "0.7165526", "0.70556706", "0.69840354", "0.6961893", "0.69204885", "0.6916017", "0.6884798", "0.6840952", "0.6827434", "0.6750205", "0.66685456", "0.6647801", "0.66370124", "0.65723...
0.7759017
0
InnerJoin selects records that have matching values in both tables. tables[0] is used as reference datatable.
InnerJoin выбирает записи, которые имеют совпадающие значения в обоих таблицах. tables[0] используется в качестве справочного datatable.
func InnerJoin(tables []*DataTable, on []JoinOn) (*DataTable, error) { return newJoinImpl(innerJoin, tables, on).Compute() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (left *DataTable) InnerJoin(right *DataTable, on []JoinOn) (*DataTable, error) {\n\treturn newJoinImpl(innerJoin, []*DataTable{left, right}, on).Compute()\n}", "func (sd *SelectDataset) InnerJoin(table exp.Expression, condition exp.JoinCondition) *SelectDataset {\n\treturn sd.joinTable(exp.NewConditionedJoi...
[ "0.6751454", "0.65702766", "0.64586174", "0.6028002", "0.60178965", "0.59976506", "0.597665", "0.59714115", "0.59106946", "0.58595383", "0.58453965", "0.57453084", "0.56433755", "0.5607307", "0.56053597", "0.55745494", "0.5502053", "0.54919076", "0.54228294", "0.5411585", "0....
0.7018755
0
LeftJoin the tables. tables[0] is used as reference datatable.
Соедините таблицы. tables[0] используется в качестве справочной таблицы.
func LeftJoin(tables []*DataTable, on []JoinOn) (*DataTable, error) { return newJoinImpl(leftJoin, tables, on).Compute() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (stmt *statement) LeftJoin(table, on string) Statement {\n\tstmt.join(\"LEFT JOIN \", table, on)\n\treturn stmt\n}", "func (left *DataTable) LeftJoin(right *DataTable, on []JoinOn) (*DataTable, error) {\n\treturn newJoinImpl(leftJoin, []*DataTable{left, right}, on).Compute()\n}", "func (w *Wrapper) LeftJo...
[ "0.7873163", "0.76610047", "0.7514192", "0.7485381", "0.7484619", "0.7296211", "0.7200829", "0.7158153", "0.7113473", "0.71128154", "0.66189706", "0.6592026", "0.65634686", "0.6533419", "0.6475337", "0.6456779", "0.64426446", "0.63812834", "0.6122921", "0.60929805", "0.607487...
0.8205081
0
RightJoin the tables. tables[0] is used as reference datatable.
Соедините таблицы. tables[0] используется в качестве справочного datatable.
func RightJoin(tables []*DataTable, on []JoinOn) (*DataTable, error) { return newJoinImpl(rightJoin, tables, on).Compute() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (stmt *statement) RightJoin(table, on string) Statement {\n\tstmt.join(\"RIGHT JOIN \", table, on)\n\treturn stmt\n}", "func (left *DataTable) RightJoin(right *DataTable, on []JoinOn) (*DataTable, error) {\n\treturn newJoinImpl(rightJoin, []*DataTable{left, right}, on).Compute()\n}", "func (w *Wrapper) Ri...
[ "0.78055537", "0.7420944", "0.741076", "0.7111573", "0.7041436", "0.69916314", "0.6970857", "0.68913996", "0.68234277", "0.6683218", "0.6154301", "0.61236024", "0.61003006", "0.6057328", "0.6012464", "0.6009745", "0.5808238", "0.5495906", "0.53983474", "0.51418346", "0.513336...
0.7857376
0
OuterJoin the tables. tables[0] is used as reference datatable.
Соедините таблицы по внешнему соединению. tables[0] используется в качестве справочного datatable.
func OuterJoin(tables []*DataTable, on []JoinOn) (*DataTable, error) { return newJoinImpl(outerJoin, tables, on).Compute() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (left *DataTable) OuterJoin(right *DataTable, on []JoinOn) (*DataTable, error) {\n\treturn newJoinImpl(outerJoin, []*DataTable{left, right}, on).Compute()\n}", "func (mySelf SQLJoin) Outer() SQLJoin {\n\tmySelf.outer = true\n\treturn mySelf\n}", "func (sd *SelectDataset) FullOuterJoin(table exp.Expression...
[ "0.72591054", "0.6385042", "0.6179653", "0.60917306", "0.5798085", "0.56046575", "0.5532318", "0.5531475", "0.5526659", "0.5441862", "0.52743226", "0.5258402", "0.5223004", "0.5183927", "0.51464397", "0.5036838", "0.49458668", "0.49448958", "0.4925887", "0.4893099", "0.488200...
0.7889248
0
GetOrders retrieves paginated orders from the Mesh DB at a specific snapshot in time. Passing an empty string as `snapshotID` creates a new snapshot and returns the first set of results. To fetch all orders, continue to make requests supplying the `snapshotID` returned from the first request. After 1 minute of not rece...
GetOrders получает пагинированные заказы из Mesh DB в конкретный момент времени снимка. Передача пустой строки в качестве `snapshotID` создает новый снимок и возвращает первый набор результатов. Чтобы получить все заказы, продолжайте делать запросы, указывая `snapshotID`, возвращенный из первого запроса. После 1 минуты...
func (app *App) GetOrders(page, perPage int, snapshotID string) (*rpc.GetOrdersResponse, error) { ordersInfos := []*zeroex.AcceptedOrderInfo{} if perPage <= 0 { return &rpc.GetOrdersResponse{ OrdersInfos: ordersInfos, SnapshotID: snapshotID, }, nil } var snapshot *db.Snapshot if snapshotID == "" { //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func GetOrders(c *gin.Context) {\n\tid := c.Params.ByName(\"id\")\n\n\tif id == \"\" {\n\t\terrors.ErrRequiredParam(c.Writer, http.StatusBadRequest, \"order id is required\")\n\t\treturn\n\t}\n\n\torder, err := s.client.GetOrder(id)\n\tif err != nil {\n\t\ts.l.Printf(\"failed to request order information: %s\\n\",...
[ "0.62642765", "0.6221663", "0.6110406", "0.6087194", "0.60676306", "0.6066977", "0.58781767", "0.5827594", "0.57684326", "0.57366395", "0.5724347", "0.57100785", "0.570299", "0.56688213", "0.56568563", "0.56561035", "0.56210774", "0.55994815", "0.559785", "0.55757976", "0.557...
0.8332623
0
AddOrders can be used to add orders to Mesh. It validates the given orders and if they are valid, will store and eventually broadcast the orders to peers.
AddOrders может использоваться для добавления заказов в Mesh. Он проверяет предоставленные заказы, и если они корректны, сохраняет их и в дальнейшем рассылает заказы узлам.
func (app *App) AddOrders(signedOrdersRaw []*json.RawMessage) (*zeroex.ValidationResults, error) { allValidationResults := &zeroex.ValidationResults{ Accepted: []*zeroex.AcceptedOrderInfo{}, Rejected: []*zeroex.RejectedOrderInfo{}, } schemaValidOrders := []*zeroex.SignedOrder{} for _, signedOrderRaw := range si...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (handler *rpcHandler) AddOrders(orders []*zeroex.SignedOrder) (*zeroex.ValidationResults, error) {\n\tlog.Debug(\"received AddOrders request via RPC\")\n\tvalidationResults, err := handler.app.AddOrders(orders)\n\tif err != nil {\n\t\t// We don't want to leak internal error details to the RPC client.\n\t\tlog...
[ "0.8132826", "0.7341831", "0.6482184", "0.64495546", "0.6072182", "0.60590833", "0.6049601", "0.6042386", "0.5945999", "0.5942374", "0.5904764", "0.5832294", "0.58172303", "0.57699704", "0.5737549", "0.57374513", "0.5730064", "0.5726372", "0.5662563", "0.56367064", "0.5607419...
0.7472578
1
AddPeer can be used to manually connect to a new peer.
AddPeer может быть использован для ручного подключения к новому узлу.
func (app *App) AddPeer(peerInfo peerstore.PeerInfo) error { ctx, cancel := context.WithTimeout(context.Background(), peerConnectTimeout) defer cancel() return app.node.Connect(ctx, peerInfo) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func AddPeer(w http.ResponseWriter, r *http.Request) {\n\t// Connect to the peer\n\tvar newPeers peerStr\n\n\terr := json.NewDecoder(r.Body).Decode(&newPeers)\n\tif err != nil {\n\t\tlog.Println(\"AddPeer: could not decode peer\")\n\t}\n\tlog.Println(newPeers)\n\tlog.Printf(\"AddPeer: adding=%s\", newPeers.Peer)\n...
[ "0.8037111", "0.7986729", "0.7840991", "0.77524346", "0.7725641", "0.7709996", "0.76176715", "0.7593478", "0.73779005", "0.73482287", "0.7329669", "0.7313278", "0.7286379", "0.7278531", "0.7213862", "0.71712655", "0.71476495", "0.7099289", "0.7071857", "0.70617026", "0.705819...
0.81139016
0
SubscribeToOrderEvents let's one subscribe to order events emitted by the OrderWatcher
SubscribeToOrderEvents позволяет подписаться на события заказов, отправляемые OrderWatcher
func (app *App) SubscribeToOrderEvents(sink chan<- []*zeroex.OrderEvent) event.Subscription { subscription := app.orderWatcher.Subscribe(sink) return subscription }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (handler *rpcHandler) SubscribeToOrders(ctx context.Context) (*ethRpc.Subscription, error) {\n\tlog.Debug(\"received order event subscription request via RPC\")\n\tsubscription, err := SetupOrderStream(ctx, handler.app)\n\tif err != nil {\n\t\tlog.WithField(\"error\", err.Error()).Error(\"internal error in `m...
[ "0.6924018", "0.6784168", "0.6600295", "0.6304606", "0.59060335", "0.5901376", "0.58783144", "0.58025783", "0.56605494", "0.5610966", "0.55999756", "0.55674213", "0.5540953", "0.55338764", "0.5472549", "0.5441667", "0.53214586", "0.52938116", "0.52710706", "0.5252714", "0.525...
0.80939853
0
ServeHTTP populates the status page template with data and serves it when there is a request.
ServeHTTP заполняет шаблон страницы статуса данными и отправляет его при получении запроса.
func (s *StatusPageHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { if s.Authenticator != nil { _, err := s.Authenticator.Authenticate(r.Context(), w, r) if errors.Is(err, oidc.ErrRedirectRequired) { return } if err != nil { http.Error(w, "Error: Authentication failed", http.StatusInternalSer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s *StatusPageHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\tlog.Logger.Info(\"Applier status request\", \"time\", s.Clock.Now().String())\n\tif s.Template == nil {\n\t\thttp.Error(w, \"Error: Unable to load HTML template\", http.StatusInternalServerError)\n\t\tlog.Logger.Error(\"Request fail...
[ "0.76141816", "0.72446615", "0.7142075", "0.65824634", "0.65734637", "0.6462746", "0.6404384", "0.6377613", "0.63453937", "0.63208884", "0.63116246", "0.6259271", "0.62566614", "0.6254522", "0.6246605", "0.62242675", "0.6213871", "0.62105876", "0.62009305", "0.61627513", "0.6...
0.73742574
1
Shutdown gracefully shuts the webserver down.
Graceful shutdown завершает работу веб-сервера.
func (ws *WebServer) Shutdown() error { err := ws.server.Shutdown(context.Background()) ws.server = nil return err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (sw *SimpleWebServer) Shutdown(ctx context.Context) error {\n\tif !sw.running {\n\t\treturn fmt.Errorf(\"not started\")\n\t}\n\tsw.running = false\n\treturn sw.Server.Shutdown(ctx)\n}", "func (p *Proxy) Shutdown() {\n\tlog.Info(\"Shutting down server gracefully\")\n\tclose(p.shutdown)\n\tgraceful.Shutdown()...
[ "0.7640571", "0.7272516", "0.7171907", "0.7166998", "0.7069365", "0.70634085", "0.69620883", "0.69575524", "0.69446343", "0.6941636", "0.6906725", "0.6897182", "0.6874807", "0.6861194", "0.684571", "0.6753442", "0.6734881", "0.67202586", "0.6720189", "0.6679935", "0.66797376"...
0.78245765
0
WithHTTPTimeout returns an HTTPCheckerOption that specifies the timeout for HTTP requests. Setting a timeout is highly recommended, but it needs to be carefully chosen to avoid false results.
WithHTTPTimeout возвращает HTTPCheckerOption, который задает таймаут для HTTP-запросов. Установка таймаута настоятельно рекомендуется, но она должна быть тщательно выбрана, чтобы избежать ложных результатов.
func WithHTTPTimeout(timeout time.Duration) HTTPCheckerOption { return func(c *HTTPChecker) { c.timeout = timeout } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func HTTPTimeout(duration time.Duration) HTTPOption {\n\treturn func(c *HTTPCollector) { c.client.Timeout = duration }\n}", "func WithTimeout(t time.Duration) Option {\n\treturn func(c *Client) { c.httpClient.Timeout = t }\n}", "func OptTLSHandshakeTimeout(d time.Duration) Option {\n\treturn func(r *Request) e...
[ "0.7159275", "0.69684875", "0.6743757", "0.66001695", "0.65526265", "0.6522622", "0.64707696", "0.64276093", "0.64276093", "0.6423289", "0.6418356", "0.6373808", "0.63530564", "0.6339308", "0.63357085", "0.6263725", "0.6263725", "0.62461066", "0.6234871", "0.6172803", "0.6101...
0.8700442
0
WithHTTPMethod returns an HTTPCheckerOption that specifies the method for HTTP requests. The default method is "GET" which works in most of the cases, but another popular choice is "HEAD".
WithHTTPMethod возвращает HTTPCheckerOption, который указывает метод для HTTP-запросов. По умолчанию используется метод "GET", который работает в большинстве случаев, но другой популярный выбор — "HEAD".
func WithHTTPMethod(method string) HTTPCheckerOption { return func(c *HTTPChecker) { c.method = method } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func WithMethod(method string) Option {\n\treturn func(p *Protocol) error {\n\t\tif p == nil {\n\t\t\treturn fmt.Errorf(\"http method option can not set nil protocol\")\n\t\t}\n\t\tmethod = strings.TrimSpace(method)\n\t\tif method != \"\" {\n\t\t\tif p.RequestTemplate == nil {\n\t\t\t\tp.RequestTemplate = &nethttp...
[ "0.7333683", "0.68030214", "0.67774516", "0.6632889", "0.6376519", "0.6234125", "0.59104705", "0.57998", "0.5736446", "0.5736446", "0.5700958", "0.56578785", "0.56539893", "0.5588941", "0.55525637", "0.5535288", "0.5522277", "0.5516675", "0.5490813", "0.5489231", "0.54805845"...
0.85374355
0
NewHTTPChecker creates a new HTTPChecker with a URL and optional configuration. Example: checker := healthz.NewHTTPChecker(" healthz.WithHTTPTimeout(3time.Second))
NewHTTPChecker создает новый HTTPChecker с URL и необязательной конфигурацией. Пример: checker := healthz.NewHTTPChecker(" healthz.WithHTTPTimeout(3time.Second))
func NewHTTPChecker(url string, opts ...HTTPCheckerOption) *HTTPChecker { checker := &HTTPChecker{ url: url, method: http.MethodGet, } for _, opt := range opts { opt(checker) } return checker }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewHTTPCheck(name, endpoint string) (Check, error) {\n\tep, err := url.Parse(endpoint)\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\thc := &httpCheck{\n\t\tcheck: newCheck(name, ep.Hostname(), CheckTypeHTTP),\n\t\tURL: ep.Path,\n\t}\n\n\tif ep.Scheme == \"https\" {\n\t\thc.Encryption = true\n\t}\n\n\t...
[ "0.77532184", "0.6886548", "0.6650926", "0.59350383", "0.5832938", "0.5832938", "0.57598746", "0.57598746", "0.5694342", "0.5670222", "0.5615457", "0.55585825", "0.555668", "0.5455581", "0.5411418", "0.5404947", "0.54013574", "0.5372818", "0.5300099", "0.5285249", "0.5270361"...
0.8291445
0
Check implements the Checker interface and checks the HTTP endpoint status.
Check реализует интерфейс Checker и проверяет статус HTTP-конечной точки.
func (c *HTTPChecker) Check() error { client := &http.Client{ Timeout: c.timeout, } req, err := http.NewRequest(c.method, c.url, nil) if err != nil { return err } resp, err := client.Do(req) if err != nil { return err } if resp.StatusCode != http.StatusOK { return ErrCheckFailed } return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (e *Endpoint) Check(ctx echo.Context) error {\n\thealthData := e.service.HealthCheck()\n\n\tif !healthData.Database {\n\t\treturn ctx.JSON(http.StatusServiceUnavailable, healthData)\n\t}\n\treturn ctx.JSON(http.StatusOK, healthData)\n}", "func (h *HealthImpl) Check(ctx context.Context, req *grpc_health_v1.H...
[ "0.70563394", "0.69536537", "0.68326074", "0.6758303", "0.6734101", "0.6721828", "0.67087394", "0.66680324", "0.6665401", "0.6655878", "0.66553265", "0.6563348", "0.65447074", "0.6539294", "0.6532304", "0.65218896", "0.64806414", "0.64593005", "0.6453134", "0.6451852", "0.642...
0.76647353
0
Given a string, this tests variants of buffer conversion: string with trailing 0's, string exactly filling the slice passed to CFieldString (simulating an exactlyfull field), and first character (exactly filling the field).
Данная строка проверяет различные варианты преобразования буфера: строка с нулями в конце, строка, полностью заполняющая срез, переданный в CFieldString (имитирует поле exactlyfull), и первый символ (полностью заполняющий поле).
func teststring(t *testing.T, s string) { buf := toint8(s) r := kstat.CFieldString(buf[:]) if r != s { t.Fatalf("full buf mismatch: %q vs %q", s, r) } r = kstat.CFieldString(buf[:len(s)]) if r != s { t.Fatalf("exact buf mismatch: %q vs %q", s, r) } r = kstat.CFieldString(buf[:len(s)+1]) if r != s { t.Fat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestCFieldString(t *testing.T) {\n\tteststring(t, \"this is a test string\")\n\tteststring(t, \"\")\n\tbuf := toint8(\"abc\\x00def\")\n\tr := kstat.CFieldString(buf[:])\n\tif r != \"abc\" {\n\t\tt.Fatalf(\"embedded null not properly handled: %q\", r)\n\t}\n}", "func cString(b []byte) string {\n\tn := 0\n\tf...
[ "0.71062356", "0.61365825", "0.5933366", "0.5675437", "0.5614959", "0.55958104", "0.5578647", "0.55673254", "0.54978114", "0.5477876", "0.5457079", "0.5457079", "0.5457079", "0.5429246", "0.53562295", "0.5353006", "0.5353006", "0.5353006", "0.5353006", "0.53007644", "0.529628...
0.7072567
1
StartEventSource starts an event source
StartEventSource запускает источник события
func (ese *GitlabEventSourceExecutor) StartEventSource(eventSource *gateways.EventSource, eventStream gateways.Eventing_StartEventSourceServer) error { defer gateways.Recover(eventSource.Name) log := ese.Log.WithEventSource(eventSource.Name) log.Info("operating on event source") config, err := parseEventSource(ev...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (ese *SlackEventSourceExecutor) StartEventSource(eventSource *gateways.EventSource, eventStream gateways.Eventing_StartEventSourceServer) error {\n\tdefer gateways.Recover(eventSource.Name)\n\n\tlog := ese.Log.WithEventSource(eventSource.Name)\n\tlog.Info(\"operating on event source\")\n\n\tconfig, err := par...
[ "0.7883973", "0.77757585", "0.77590185", "0.7744084", "0.7744084", "0.7744084", "0.71178484", "0.610572", "0.5880223", "0.5854096", "0.58206666", "0.57460594", "0.5692862", "0.5670011", "0.55274093", "0.5522732", "0.54867756", "0.54613596", "0.5384841", "0.53692126", "0.53460...
0.7849933
1
FetchOrganization provides a mock function with given fields: filters
FetchOrganization предоставляет функцию-мок с заданными полями: filters
func (_m *OrganizationFetcher) FetchOrganization(filters []services.QueryFilter) (models.Organization, error) { ret := _m.Called(filters) var r0 models.Organization if rf, ok := ret.Get(0).(func([]services.QueryFilter) models.Organization); ok { r0 = rf(filters) } else { r0 = ret.Get(0).(models.Organization) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Test_OrganizationsRepo_Filter(t *testing.T) {\n\tq := query.NewQuery()\n\tresult, _, err := tc.organizationsRepo.Filter(context.Background(), q)\n\trequire.Nil(t, err, \"unexpected error\")\n\tassert.Len(t, result, len(f.Organizations), \"unexpected number of rows returned\")\n}", "func (m *MockOrganization...
[ "0.6240677", "0.6059997", "0.58044446", "0.5616137", "0.55219644", "0.5459781", "0.5447272", "0.54235154", "0.54216474", "0.53972083", "0.53289837", "0.5325005", "0.5287012", "0.5278028", "0.5263327", "0.5252575", "0.52465487", "0.5238369", "0.51930016", "0.5192341", "0.51545...
0.738788
0
pingLoop periodically sends a ping to all remote clusters.
pingLoop периодически отправляет пинг всем удаленным кластерам.
func (rcs *Service) pingLoop(done <-chan struct{}) { pingChan := make(chan *model.RemoteCluster, MaxConcurrentSends*2) // create a thread pool to send pings concurrently to remotes. for i := 0; i < MaxConcurrentSends; i++ { go rcs.pingEmitter(pingChan, done) } go rcs.pingGenerator(pingChan, done) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func pingLoop(results chan Host, hostRegistry *HostRegistry, interval time.Duration, timeout time.Duration) {\n\tfor {\n\t\thostAddresses := hostRegistry.GetHostAddresses()\n\n\t\tlog.Info(\"Pinging these addresses: %q\\n\", hostAddresses)\n\n\t\tfor _, address := range hostAddresses {\n\t\t\tlog.Debug(\"Pinging: ...
[ "0.8008959", "0.73642355", "0.7354216", "0.716509", "0.6779733", "0.67345625", "0.6406868", "0.63669646", "0.6331098", "0.63261425", "0.626655", "0.6236336", "0.621892", "0.61981124", "0.60962933", "0.6069212", "0.6055444", "0.604405", "0.59858143", "0.5978686", "0.59705174",...
0.8445327
0
pingEmitter pulls Remotes from the ping queue (pingChan) and pings them. Pinging a remote cannot take longer than PingTimeoutMillis.
pingEmitter извлекает Remote из очереди пингов (pingChan) и отправляет пинг этим удаленным. Отправка пинга удаленному узлу не может занять больше времени, чем PingTimeoutMillis.
func (rcs *Service) pingEmitter(pingChan <-chan *model.RemoteCluster, done <-chan struct{}) { for { select { case rc := <-pingChan: if rc == nil { return } online := rc.IsOnline() if err := rcs.pingRemote(rc); err != nil { rcs.server.Log().Log(mlog.LvlRemoteClusterServiceWarn, "Remote cluster...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (rcs *Service) pingLoop(done <-chan struct{}) {\n\tpingChan := make(chan *model.RemoteCluster, MaxConcurrentSends*2)\n\n\t// create a thread pool to send pings concurrently to remotes.\n\tfor i := 0; i < MaxConcurrentSends; i++ {\n\t\tgo rcs.pingEmitter(pingChan, done)\n\t}\n\n\tgo rcs.pingGenerator(pingChan,...
[ "0.5540986", "0.5505406", "0.5427127", "0.5427127", "0.5427127", "0.5284718", "0.5107711", "0.50829035", "0.5076376", "0.50560343", "0.4966862", "0.49452683", "0.49294308", "0.4921673", "0.49036264", "0.48855567", "0.48285797", "0.47991693", "0.47748682", "0.47645676", "0.474...
0.74014896
0
pingRemote make a synchronous ping to a remote cluster. Return is error if ping is unsuccessful and nil on success.
pingRemote выполняет синхронный пинг удаленного кластера. Возвращается ошибка, если пинг неудачен, и nil в случае успеха.
func (rcs *Service) pingRemote(rc *model.RemoteCluster) error { frame, err := makePingFrame(rc) if err != nil { return err } url := fmt.Sprintf("%s/%s", rc.SiteURL, PingURL) resp, err := rcs.sendFrameToRemote(PingTimeout, rc, frame, url) if err != nil { return err } ping := model.RemoteClusterPing{} err ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (rn *RemoteNode) Ping() error {\n\tmsg, err := NewPingMessage()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t_, err = rn.SendMessageSync(msg)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}", "func (a *Client) Ping(params *PingParams, authInfo runtime.ClientAuthInfoWriter) (*PingOK, error) {\n\t/...
[ "0.5757455", "0.54401505", "0.54391694", "0.53251994", "0.532496", "0.53082156", "0.5287487", "0.523717", "0.52331144", "0.52265793", "0.5207792", "0.51742476", "0.5154612", "0.51186514", "0.5075052", "0.5067131", "0.5061404", "0.5061404", "0.5060334", "0.5044561", "0.5040924...
0.7208622
0
IsUserInProtectBranchWhitelist returns true if given user is in the whitelist of a branch in a repository.
IsUserInProtectBranchWhitelist возвращает true, если заданный пользователь находится в белом списке ветки в репозитории.
func IsUserInProtectBranchWhitelist(repoID, userID int64, branch string) bool { has, err := x.Where("repo_id = ?", repoID).And("user_id = ?", userID).And("name = ?", branch).Get(new(ProtectBranchWhitelist)) return has && err == nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (cfg *Config) inWhitelist(addr net.Addr) bool {\n\tif len(cfg.Whitelists) == 0 {\n\t\treturn false\n\t}\n\n\thost, _, err := net.SplitHostPort(addr.String())\n\tif err != nil {\n\t\tlog.Warnf(\"Unable to SplitHostPort on '%s': %v\", addr, err)\n\t\treturn false\n\t}\n\tip := net.ParseIP(host)\n\tif ip == nil ...
[ "0.56163293", "0.5373006", "0.52983207", "0.5277685", "0.5266368", "0.5255747", "0.51754534", "0.5144733", "0.51208335", "0.50630087", "0.5051098", "0.4973124", "0.4966368", "0.49533182", "0.4888079", "0.4856383", "0.48513022", "0.4842797", "0.48176417", "0.4758936", "0.47584...
0.89497715
0
GetProtectBranchOfRepoByName returns ProtectBranch by branch name in given repository.
GetProtectBranchOfRepoByName возвращает ProtectBranch по имени ветки в заданном репозитории.
func GetProtectBranchOfRepoByName(repoID int64, name string) (*ProtectBranch, error) { protectBranch := &ProtectBranch{ RepoID: repoID, Name: name, } has, err := x.Get(protectBranch) if err != nil { return nil, err } else if !has { return nil, ErrBranchNotExist{args: map[string]any{"name": name}} } ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func GetBranchProtection(ctx *context.APIContext) {\n\t// swagger:operation GET /repos/{owner}/{repo}/branch_protections/{name} repository repoGetBranchProtection\n\t// ---\n\t// summary: Get a specific branch protection for the repository\n\t// produces:\n\t// - application/json\n\t// parameters:\n\t// - name: ow...
[ "0.563166", "0.56300473", "0.54814917", "0.53906345", "0.52956754", "0.5287144", "0.5120009", "0.5038256", "0.5038108", "0.5026133", "0.49994874", "0.49632233", "0.49617618", "0.49427322", "0.49369785", "0.49321407", "0.49279362", "0.48991442", "0.48990035", "0.4890306", "0.4...
0.8605521
0
IsBranchOfRepoRequirePullRequest returns true if branch requires pull request in given repository.
IsBranchOfRepoRequirePullRequest возвращает true, если ветка требует запроса на слияние в заданном репозитории.
func IsBranchOfRepoRequirePullRequest(repoID int64, name string) bool { protectBranch, err := GetProtectBranchOfRepoByName(repoID, name) if err != nil { return false } return protectBranch.Protected && protectBranch.RequirePullRequest }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Client) IsPullRequestMerged(owner, repo string, index int64) (bool, *Response, error) {\n\tif err := escapeValidatePathSegments(&owner, &repo); err != nil {\n\t\treturn false, nil, err\n\t}\n\tstatus, resp, err := c.getStatusCode(\"GET\", fmt.Sprintf(\"/repos/%s/%s/pulls/%d/merge\", owner, repo, index), n...
[ "0.60033196", "0.56456953", "0.5529143", "0.55012417", "0.5406795", "0.5382219", "0.53821987", "0.5308959", "0.5265178", "0.5258808", "0.52289414", "0.52288187", "0.5203953", "0.5083942", "0.506576", "0.50482285", "0.50422275", "0.5011587", "0.500566", "0.49848372", "0.498483...
0.87552845
0