text
stringlengths
3.08k
10.4k
package replica import ( "bufio" "github.com/gomodule/redigo/redis" "log" "net" "os" "redis-g/command" "redis-g/io" "redis-g/utils/numbers" "strconv" "strings" "sync/atomic" "time" ) type replica struct { Source string SourceAuth string Target string TargetAuth string replicaId ...
/* * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
package pullrequests import ( "errors" "sort" "strconv" "strings" "time" ) var ( Columns = []string{ "RepoName", "URL", "CreatedAt", "UpdatedAt", "Author", "TotalReviews", "Approved", "ChangesRequested", "Reviewers", } ) type PullRequestContainer []PullRequest func (c *PullRequestContainer)...
// Copyright 2019 tree xie // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wri...
package zeekparse import ( "errors" "fmt" log "github.com/sirupsen/logrus" "strconv" "time" ) // ssl log format described in https://docs.zeek.org/en/master/scripts/base/files/x509/main.zeek.html#type-X509::Info // and https://docs.zeek.org/en/master/scripts/base/init-bare.zeek.html#type-X509::Certificate // --...
package main import ( "encoding/json" "errors" "fmt" "io" "net" "net/url" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/lambda" "github.com/jedisct1/dlog" "github.com/miekg/dns" ) type PluginLambdaEntry struct { domain s...
package handler import ( "io/ioutil" "net/http" "net/http/httptest" "reflect" "sort" "testing" "github.com/go-openapi/spec" json "github.com/json-iterator/go" yaml "gopkg.in/yaml.v2" ) var returnedSwagger = []byte(`{ "swagger": "2.0", "info": { "title": "Kubernetes", "version": "v1.11.0" }}`) f...
/* * Poly2Tri Copyright (c) 2009-2011, Poly2Tri Contributors * http://code.google.com/p/poly2tri/ * * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * * Redistributions of source code mu...
// Copyright The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ingore // Package doc extracts source code documentation from a Go AST. package doc var IllegalPrefixes = []string{ "copyright", "all rights", "author...
//go:build releaser package main // This file is a script which generates the .goreleaser.yaml file for all // supported OpenTelemetry Collector distributions. // // Run it with `make generate-goreleaser`. import ( "flag" "fmt" "log" "os" "path" "strings" "github.com/goreleaser/goreleaser/pkg/config" "githu...
package nolol import ( "fmt" "strings" "github.com/dbaumgarten/yodk/pkg/nolol/nast" "github.com/dbaumgarten/yodk/pkg/parser" "github.com/dbaumgarten/yodk/pkg/parser/ast" ) // getMacro is a case-insensitive getter for c.macros func (c *Converter) getMacro(name string) (*nast.MacroDefinition, bool) { name = stri...
package main import ( "context" "database/sql" "flag" "io/ioutil" "strings" "time" "github.com/go-sql-driver/mysql" "github.com/golang/glog" "github.com/google/uuid" "github.com/hb9tf/spectre/collection/hackrf" "github.com/hb9tf/spectre/collection/rtlsdr" "github.com/hb9tf/spectre/export" "github.com/hb...
package main import ( "bufio" "flag" "fmt" "io/ioutil" "os" "strings" "time" "github.com/shepheb/tc-dcpu/common" "github.com/shepheb/tc-dcpu/dcpu" "github.com/shepheb/tc-dcpu/mocha" "github.com/shepheb/tc-dcpu/rq" ) func usage() { flag.PrintDefaults() } func dumpDeviceList() { for name, desc := range d...
package main import ( "bytes" "context" "fmt" "os" "path/filepath" "runtime" "strings" "sync" "text/template" "github.com/containerd/containerd" "github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/platforms" "github.com/containerd/containerd/remotes/docker" "github.com/cpuguy...
package tests import ( cfg "github.com/carbonblack/cb-event-forwarder/pkg/config" "github.com/carbonblack/cb-event-forwarder/pkg/protobufmessageprocessor" "github.com/streadway/amqp" "io/ioutil" "os" "path" "testing" ) var theConfig = cfg.Configuration{CbServerURL: "https://cbtests/", EventMap: ALLRAWEVENTS} ...
package chclient import ( "bytes" "context" "fmt" "github.com/valyala/tsvreader" "io/ioutil" "net/http" "net/url" "strings" "time" ) // Client is http client for clickhouse. // // The client is optimized for SELECT queries. // // Best used with github.com/Vertamedia/chproxy. type Client struct { // Addr is ...
package storage import ( "context" "fmt" "github.com/eleme/lindb/config" "github.com/eleme/lindb/constants" "github.com/eleme/lindb/coordinator/discovery" task "github.com/eleme/lindb/coordinator/storage" "github.com/eleme/lindb/models" "github.com/eleme/lindb/pkg/logger" "github.com/eleme/lindb/pkg/server" ...
package ssdp import ( "bufio" "bytes" "errors" "fmt" "log" "net" "net/http" "net/url" "runtime" "strconv" "time" ) const ( MulticastIPv4Addr = "172.16.31.10:1900" MTU = 8192 AliveInterval = 15 * time.Minute CacheControlDirective = "max-age=1800" ServerName = ru...
//go:generate mockery -name CLI package cli import ( "fmt" "strings" "github.com/monitoror/monitoror/cli/version" coreModels "github.com/monitoror/monitoror/models" "github.com/labstack/gommon/color" ) const ( website = "https://monitoror.com" developmentGuides = "https://monitoror.com/guides/#dev...
package wire import ( "io" "github.com/nikandfor/errors" ) const ( eUnexpectedEOF = -1 - iota eBadFormat eBadSpecial ) type StreamDecoder struct { io.Reader b []byte i int ref int64 } func NewStreamDecoder(r io.Reader) *StreamDecoder { return &StreamDecoder{ Reader: r, } } func (d *StreamDecoder...
package testutils import ( "encoding/json" "github.com/julienschmidt/httprouter" template2 "gunship/httpimpl/execution" "gunship/utils" "io/ioutil" "math/rand" "net/http" "net/http/cookiejar" "net/http/httptest" "strconv" ) func GetExhchanges1() []*template2.HttpRawExchange { // login test login := templa...
package app var ReadmeTmpl = ` # {{.AppName}} ` var ModTmpl = ` module {{.Mod}} go 1.12 ` var ConfigYAMLTmpl = ` debug: true ` var MainTmpl = ` package main import ( "context" "flag" "fmt" "os" "os/signal" "syscall" "github.com/kpango/glg" "github.com/pkg/errors" "github.com/spf13/pflag" "{{.Mod}}/pkg...
package syncer import ( "strings" "github.com/Nerzal/gocloak/v5" userv1 "github.com/openshift/api/user/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/validation" redhatcopv1alpha1 "github.com/redhat-cop/group-sync-operator/api/v1alpha1" "github.com/redhat-cop/group-sync-operator/p...
package common import ( "bytes" "fmt" "io" "log" "os" "time" ) const ( BUF_MAX = 8192 CHAN_BUF = 1 ) type LogWriter struct { events chan LogWriterEvent control chan LogWriterControl } type LogWriterEvent struct { closed bool err error ready bool } type LogWriterControl struct { data string ...
/* Copyright 2021 The Skaffold Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
package container import ( "context" "fmt" "path" "github.com/docker/distribution/reference" "github.com/pkg/errors" "github.com/tilt-dev/tilt/pkg/apis/core/v1alpha1" ) // RefSet describes the references for a given image: // 1. ConfigurationRef: ref as specified in the Tiltfile // 2. LocalRef(): ref as use...
package e2e import ( "encoding/json" "fmt" "io/ioutil" "net/http" "os" "path" "testing" "time" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/util/wait" meteringv1alpha1 "github.com/operator-framework/operator-metering/pkg/apis/metering/v1alpha1" cbutil "github.com/op...
/* * @Author: thepoy * @Email: <EMAIL> * @File Name: save_config.go * @Created: 2021-06-23 08:07:09 * @Modified: 2021-07-27 15:30:14 */ package commands import ( "errors" "fmt" "io/ioutil" "strconv" "strings" "github.com/mailru/easyjson" "github.com/spf13/cobra" "github.com/thep0y/go-logger/log" "git...
package httputil import ( "encoding/json" "fmt" "io" "io/ioutil" "net/http" "regexp" "strings" "github.com/sudo-suhas/xgo" "github.com/sudo-suhas/xgo/errors" ) // Error kinds. var ( ErrKindUnsupportedMediaType = errors.Kind{ Code: "UNSUPPORTED_MEDIA_TYPE", Status: http.StatusUnsupportedMediaType, } ...
package command import ( "fmt" "path/filepath" "regexp" //"github.com/kr/pretty" "golang.org/x/net/context" //"google.golang.org/grpc/metadata" authzv1 "k8s.io/api/authorization/v1" rpcapi "github.com/eparis/admin-rpc/api" "github.com/eparis/admin-rpc/operations/util" ) type argRegex []*regexp.Regexp func...
/* * Copyright 1999-2018 Alibaba Group. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
package commands import ( "github.com/enfabrica/enkit/astore/client/astore" "github.com/enfabrica/enkit/lib/kflags" "github.com/spf13/cobra" ) type Upload struct { *cobra.Command root *Root Suggest SuggestFlags Arch string Note string Tag []string } func NewUpload(root *Root) *Upload { command :...
package preprocessor import ( "bufio" "image" "image/draw" "image/gif" "io" "math" "mime" "strings" "github.com/pkg/errors" "golang.org/x/image/font" "golang.org/x/image/font/opentype" "golang.org/x/image/math/fixed" ) type FileConverter interface { Convert(r io.Reader) (interface{}, error) } type Imag...
package spec import ( "errors" "fmt" "net/http" "strings" "github.com/RussellLuo/kun/gen/util/openapi" "github.com/RussellLuo/kun/pkg/ifacetool" ) type Location string const ( InPath Location = "path" InQuery Location = "query" InHeader Location = "header" InCookie Location = "cookie" InBody Locatio...
package assets import ( "fmt" "github.com/everstake/teztracker/models" "github.com/jinzhu/gorm" ) type ( // Repository is the account repo implementation. Repository struct { db *gorm.DB } Repo interface { GetTokensList() (int64, []models.AssetInfo, error) GetTokenInfo(tokenID string) (models.AssetInfo,...
// nolint:lll // Generates the appidadpater's resource yaml. It contains the adapter's configuration, name, supported template // names (metric in this case), and whether it is session or no-session based. //go:generate $GOPATH/src/istio.io/istio/bin/mixer_codegen.sh -a mixer/adapter/github.com/ibm-cloud-security/app-i...
// Copyright 2017 The kubecfg authors // // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applica...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.24.0-devel // protoc v3.13.0 // source: wal.proto package pb import ( proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/prot...
package middleware import ( "crypto/md5" "encoding/hex" "github.com/google/uuid" "net/http" "github.com/tomoyane/grant-n-z/gnz/common" "github.com/tomoyane/grant-n-z/gnz/entity" "github.com/tomoyane/grant-n-z/gnz/log" "github.com/tomoyane/grant-n-z/gnzserver/service" ) const failedMigrationMsg = "Failed to n...
package fd_pool import ( "context" "net" "strings" "time" "github.com/schibsted/sebase/util/pkg/sbalance" "github.com/schibsted/sebase/vtree/pkg/bconf" ) type ServiceConfig struct { // Service name, this is used to determine what service to create. // Note that if you call AddConfig again with the same Servi...
package opentracingutils import ( "bytes" "encoding/json" "errors" "fmt" "strings" "sync" "github.com/Shopify/sarama" "github.com/sirupsen/logrus" jaeger "github.com/uber/jaeger-client-go" "github.com/uber/jaeger-client-go/thrift" "github.com/uber/jaeger-client-go/log" "github.com/uber/jaeger-client-go/t...
// Copyright 2016 ePoxy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
package main import ( "encoding/json" "errors" "fmt" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/client_golang/prometheus/push" log "github.com/sirupsen/logrus" flag "github.com/spf13/pflag" "io" "net/http" url2 "net/url" ...
package controllers import ( "encoding/json" "github.com/gin-gonic/gin" "net/http" "strconv" "time" "xapimanager/application/Services" "xapimanager/application/models" "xapimanager/config" ) //获取项目列表 func ProjectList(c *gin.Context) { //获取用户信息 var data string var err error var projects []models.QyProject...
/* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License ...
package win import ( "image" "syscall" "unsafe" "github.com/AllenDang/w32" wde "github.com/kirillDanshin/go-wde" ) const WDEM_UI_THREAD = w32.WM_APP type EventData struct { lastX, lastY int button wde.Button noX int trackMouse bool } func (this *EventData) InitEventData() { this.noX = 1<...
// 通过修改runtime, scaleInterval, isScale配置实验参数 package main import ( "bufio" "context" "flag" "fmt" "log" "os" "strconv" "sync" "time" "github.com/prometheus/common/model" pb "github.com/waterme7on/openGauss-operator/rpc/protobuf" "github.com/waterme7on/openGauss-operator/util/prometheusUtil" "google.gola...
// Code generated by entc, DO NOT EDIT. package ent import ( "encoding/json" "fmt" "strings" "time" "entgo.io/ent/dialect/sql" "github.com/google/uuid" "github.com/lbrictson/auditmon/ent/event" ) // Event is the model entity for the Event schema. type Event struct { config `json:"-"` // ID of the ent. ID ...
// Copyright (c) 2020 - for information on the respective copyright owner // see the NOTICE file and/or the repository at // https://github.com/hyperledger-labs/perun-node // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may...
// Copyright 2019, Pure Storage Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: data/buffer_data.proto package buffer_data import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // Thi...
package main import ( "flag" "fmt" "net/http" "os" "strconv" "time" "github.com/openshift/ci-tools/pkg/backporter" "github.com/prometheus/client_golang/prometheus" log "github.com/sirupsen/logrus" "k8s.io/test-infra/pkg/flagutil" prowConfig "k8s.io/test-infra/prow/config" "k8s.io/test-infra/prow/config/se...
package n3iwf_context import ( "crypto/rand" "crypto/rsa" "fmt" "math" "math/big" "net" "github.com/sirupsen/logrus" gtpv1 "github.com/wmnsk/go-gtp/v1" "golang.org/x/net/ipv4" "free5gc/lib/ngap/ngapType" "free5gc/src/n3iwf/logger" ) var contextLog *logrus.Entry var n3iwfContext = N3IWFContext{} var ranU...
// +build integration /* Copyright (C) 2017 Red Hat, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agree...
// Package ical2 provides a data model for the iCalendar specification. Marshalling // to the textual iCalendar ics format is implemented. Unmarshalling is not currently // supported. // // See // https://tools.ietf.org/html/rfc5545 // https://tools.ietf.org/html/rfc6868 // https://tools.ietf.org/html/rfc7986. // // Av...
package ff import ( "fmt" "log" "math" "math/rand" "testing" "time" "github.com/drakos74/go-ex-machina/xmachina/ml" "github.com/drakos74/go-ex-machina/xmachina/net" "github.com/drakos74/go-ex-machina/xmath" "github.com/rs/zerolog" "github.com/stretchr/testify/assert" ) func init() { zerolog.SetGlobalLeve...
package main // Resources: // - http://www.jokecamp.com/blog/examples-of-creating-base64-hashes-using-hmac-sha256-in-different-languages/ // - https://gobyexample.com/base64-encoding import ( "bufio" "crypto/tls" "crypto/x509" "encoding/base64" "flag" "fmt" "golang.org/x/net/http2" "io/ioutil" //"net" // Ne...
package config import ( "flag" "fmt" "github.com/go-yaml/yaml" "io/ioutil" "log" "os" "path/filepath" "strconv" "strings" "sync" "time" ) var cfgfile string = filepath.Dir(os.Args[0]) + "/../config/httpagent.yml" var Cfg = &Config{cLock: &sync.Mutex{}, Maxsesspool: 1000, Maxlifetime: 30 * time.Second, Tim...
// Unless explicitly stated otherwise all files in this repository are licensed // under the Apache License Version 2.0. // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2016-2020 Datadog, Inc. // +build !windows package nvidia import ( "bufio" "context" "github.co...
/* Copyright 2021. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed un...
package main import ( "encoding/json" "io/ioutil" "log" "net/http" "os" "strconv" "sync" "time" ) const ( timeLayout = "2006-01-02T15:04:05Z" concurrency = 8 ) type retention struct { Metrics []string `json:"metrics"` Seconds int `json:"seconds"` } type policy struct { Retentions []retention ...
package gql import ( "errors" "fmt" "strconv" "strings" "github.com/GannettDigital/graphql" "github.com/GannettDigital/graphql/language/ast" "github.com/GannettDigital/graphql/language/kinds" ) var ( // ListOperations is the set of list filters operations available for use by ResolveListField. // The string...
/* * Copyright 2020 The Knative Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
// Copyright 2015-2019 Bleemeo // // bleemeo.com an infrastructure monitoring solution in the Cloud // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LI...
package metrics import ( "log" lxd "github.com/lxc/lxd/client" lxdapi "github.com/lxc/lxd/shared/api" "github.com/prometheus/client_golang/prometheus" ) // Collector collects metrics to be sent to Prometheus. type collector struct { logger *log.Logger server lxd.InstanceServer } // NewCollector creates a new ...
package main import ( "context" _ "embed" "encoding/json" "fmt" "io/ioutil" "net/http" "net/url" "path/filepath" "strconv" "strings" "github.com/google/go-github/github" "github.com/mattermost/mattermost-plugin-apps/apps" "github.com/mattermost/mattermost-plugin-apps/utils/httputils" "github.com/pkg/er...
package connectivity import ( "fmt" "log" "encoding/json" "net/http" "strings" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" "github...
package go_thunder import ( "bytes" "github.com/clarketm/json" // "encoding/json" "io/ioutil" "util" ) type FwTemplateLogging struct { UUID FwTemplateLoggingInstance `json:"logging-instance,omitempty"` } type FwTemplateLoggingInstance struct { Facility string `json:"fac...
// Copyright (c) 2020, 2021, Oracle and/or its affiliates. // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. package verrazzano import ( "context" "testing" "github.com/stretchr/testify/assert" "github.com/verrazzano/verrazzano/platform-operator/constants" ...
package job import ( "context" "fmt" "sync" "time" "github.com/ab180/lrmr/cluster" "github.com/ab180/lrmr/coordinator" "github.com/airbloc/logger" "github.com/pkg/errors" "go.uber.org/atomic" ) type TaskReporter struct { clusterState cluster.State task TaskID job *Job status *TaskStatus flushM...
// Copyright 2019 <NAME> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, distribute...
// Copyright ©2011-2012 The bíogo Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package external allows uniform interaction with external tools based on a config struct. package external import ( "bytes" "errors" "fmt" "os/...
package Everything import ( "fmt" "runtime" "syscall" "github.com/juju/errors" ) // Description about this package var Description = ` ______ __ __ _ / ____/ _____ _______ __/ /_/ /_ (_)___ ______ / __/ | | / / _ \/ ___/ / / / __/ __ \/ / __ \/ __ / / /___ | |/ / __/ / ...
// Copyright (c) 2004-present Facebook All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package ocgql_test import ( "context" "errors" "sync" "testing" "time" "github.com/99designs/gqlgen/client" "github.com/99designs/gqlgen/graphql" ...
package basexx import ( "encoding/csv" "encoding/hex" "fmt" "io" "os" "testing" ) func TestLength(t *testing.T) { cases := []struct { from, to int64 n, want int }{ {from: 2, to: 10, n: 1, want: 1}, {from: 2, to: 10, n: 2, want: 1}, {from: 2, to: 10, n: 4, want: 2}, {from: 2, to: 10, n: 100, want:...
package testcluster import ( "crypto/tls" "io/ioutil" "net" "os" "testing" "time" "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "github.com/docker/swarmkit/agent/exec" "github.com/docker/swarmkit/api" "github.com/docker/swarmkit/ca" "github.com/docker/swarmkit...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package keycloak import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // This data source can be used to fetch properties of a Keycloak realm f...
package dchan import ( "bufio" "fmt" "net" "strings" "time" "github.com/chzyer/flow" "github.com/chzyer/logex" "github.com/chzyer/next/packet" "github.com/chzyer/next/statistic" ) var ( _ Channel = new(HttpChan) _ ChannelFactory = new(HttpChanFactory) ) // to simulate http interactive type HttpCha...
package recipe import ( "os" "testing" "github.com/stretchr/testify/assert" ) func TestRecipeValid(t *testing.T) { r, err := LoadRecipe("testdata/valid") assert.Nil(t, err) assert.Equal(t, 1, r.Version) assert.Equal(t, "foo", r.Name) assert.Equal(t, "a great description", r.Description) assert.Equal(t, "Fo...
package hystrix import ( "sort" "sync" "time" "github.com/efritz/glock" "github.com/efritz/overcurrent" ) type ( BreakerStats struct { config overcurrent.BreakerConfig state overcurrent.CircuitState buckets map[int64]*bucket mutex sync.RWMutex clock glock.Clock } bucket struct { counters ...
/* Copyright 2020 Elotl Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
package imaging import ( "image" "math" ) // Edge returns a new image that has had all the edges within the given // threshold set to 0xFFFFFFFF. // Img is the input image. // Image edges are detected using the Canny edge detection algorithm defined at // https://en.wikipedia.org/wiki/Canny_edge_detector . func Edg...
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. package web import ( "testing" "time" "github.com/mattermost/mattermost-server/api" "github.com/mattermost/mattermost-server/api4" "github.com/mattermost/mattermost-server/app" "github.com/mattermost...
package main import ( "encoding/json" "fmt" "github.com/BurntSushi/toml" "github.com/catsworld/qq-bot-api" "github.com/projectriri/bot-gateway/router" "github.com/projectriri/bot-gateway/types" "github.com/projectriri/bot-gateway/utils" log "github.com/sirupsen/logrus" "golang.org/x/net/websocket" ) var ( B...
// Copyright (c) 2019 Arista Networks, Inc. // Use of this source code is governed by the Apache License 2.0 // that can be found in the COPYING file. package gnmi import ( "context" "reflect" "sync" "testing" "time" "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/any" "github.com/openc...
package workspace import ( "errors" "io/fs" "os" "path/filepath" "github.com/warpfork/warpforge/wfapi" ) const ( magicWorkspaceDirname = ".warpforge" ) var homedir string func init() { var err error // Assign homedir. // Somewhat complicated by the fact we non-rooted paths internally for consistency // ...
/* Package repository implements repository for handling fast and efficient access to data required by the resolvers of the API server. Internally it utilizes RPC to access Opera/Lachesis full node for blockchain interaction. Mongo database for fast, robust and scalable off-chain data storage, especially for aggregate...
package alarm import ( "fmt" "time" "bytes" "sync" "golang.org/x/net/context" "net/http" "net" "runtime" "util/log" "encoding/json" "io/ioutil" "errors" ) var ( ErrInvalidUrl = errors.New("invalid url") ErrAlarmerBusy = errors.New("alarmer busy") ErrUnExpectedResponse = errors.New("unex...
package response import ( "github.com/spyroot/tcactl/lib/api_errors" errorsconst "github.com/spyroot/tcactl/pkg/errors" "strings" ) const ( // ExtensionTypeRepository Type Repository extension ExtensionTypeRepository = "Repository" // ExtensionEnabled extension state enabled ExtensionEnabled = "ENABLED" ) //...
package repositories import ( "context" "encoding/json" "errors" "fmt" "log" "strings" "github.com/codelieche/cronjob/backend/common" "github.com/codelieche/cronjob/backend/common/datamodels" "github.com/codelieche/cronjob/backend/common/datasources" "github.com/coreos/etcd/clientv3" "github.com/coreos/etc...
// Code generated by go-swagger; DO NOT EDIT. // Copyright 2017 The go-ovh Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 /...
package bitflow import ( "errors" "fmt" "github.com/antongulenko/golib" log "github.com/sirupsen/logrus" ) // SamplePipeline reads data from a source and pipes it through zero or more SampleProcessor instances. // The job of the SamplePipeline is to connect all the processing steps // in the Construct method. Af...
package proxy import ( "bytes" "context" "errors" "fmt" "io" "net" "net/http" "github.com/kazeburo/chocon/upstream" "github.com/rs/xid" "github.com/valyala/fasthttp" "go.uber.org/zap" ) const ( httpStatusClientClosedRequest = 499 ) var ( proxyVerHeader = []byte("X-Chocon-Ver") proxyIDHeader = []byte(...
package settings import ( "context" "errors" "fmt" "os" "strconv" "strings" "get.porter.sh/porter/pkg/porter" "github.com/cnabio/cnab-go/bundle" "github.com/cnabio/cnab-to-oci/remotes" "github.com/docker/cli/cli/config" "github.com/docker/distribution/reference" log "github.com/sirupsen/logrus" "github.c...
package main import ( "encoding/json" "fmt" "net/http" "os" "strings" "time" ) type NRCActivity struct { Id string `json:"id"` Type string `json:"type"` MetricTypes []string `json:"metric_types"` Metrics []Metric `json:"metrics"` Start int `json:"start_epoch_ms"` } type ...
// Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed ...
package main import ( "reflect" "testing" ) func TestBuildVolumeArgs(t *testing.T) { cases := []struct { path string targets []string wantVolumes []string }{ {"/foo", []string{"bar"}, []string{"/foo/bar:/tmp/dexec/build/bar"}}, } for _, c := range cases { gotVolumes := BuildVolumeArgs(c.pat...
// Code generated by go-swagger; DO NOT EDIT. package s_c_i_m // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/...
package kl import ( "fmt" "io" "os" "path" "runtime" ) type Evaluator struct { functionTable map[string]Obj Silence bool nativeFunc map[string]Obj } func NewEvaluator() *Evaluator { var e Evaluator e.functionTable = make(map[string]Obj, len(AllPrimitives)) for _, prim := range AllPrimitives { e....
package table import ( "context" "github.com/ydb-platform/ydb-go-sdk/v3/internal/errors" "github.com/ydb-platform/ydb-go-sdk/v3/retry" "github.com/ydb-platform/ydb-go-sdk/v3/table" "github.com/ydb-platform/ydb-go-sdk/v3/testutil" "github.com/ydb-platform/ydb-go-sdk/v3/trace" ) // SessionProvider is the interfa...