text stringlengths 3.08k 10.4k |
|---|
// Copyright 2019 OVO Technology
//
// 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 ... |
package master
import (
"context"
"encoding/json"
"fmt"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/mvcc/mvccpb"
"go-corntab/common"
"time"
)
//任务管理器
type JobMgr struct {
client *clientv3.Client `json:"client"`
kv clientv3.KV `json:"kv"`
lease clientv3.Lease `json:"lease"`
}
var (... |
package cli
// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Apache License, Version 2.0 <htt... |
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this fi... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
package services
import (
"context"
"fmt"
"sync"
"time"
"github.com/smartcontractkit/chainlink/core/assets"
"github.com/smartcontractkit/chainlink/core/logger"
"github.com/smartcontractkit/chainlink/core/service"
httypes "github.com/smartcontractkit/chainlink/core/services/headtracker/types"
"github.com/smar... |
// Copyright (c) 2021, <NAME> and the Choria Project contributors
//
// SPDX-License-Identifier: Apache-2.0
package tokens
import (
"crypto/ed25519"
"crypto/md5"
"crypto/rsa"
"encoding/hex"
"fmt"
"os"
"time"
"github.com/golang-jwt/jwt/v4"
)
type ClientPermissions struct {
// StreamsAdmin enables full acces... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package codeguruprofiler
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
"github.com/aws/aws-sdk-go-v2/private/protocol"
)
// The structure representing the removePermissionRequest.
type Re... |
// Copyright 2019 The Hugo Authors. All rights reserved.
// Some functions in this file (see comments) is based on the Go source code,
// copyright The Go Authors and governed by a BSD-style license.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance... |
package models
import (
"errors"
"fmt"
"strings"
"time"
"goADM/utils"
"github.com/astaxie/beego/orm"
)
// SaleConfig 销售设置
type SaleConfig struct {
ID int64 `orm:"column(id);pk;auto" json:"id"` //主键
CreateUser *User `orm:"rel(fk);null" json:"-"` //创建者
UpdateUser *User ... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package lambda
import (
"context"
"io"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
"github.com/aws/aws-sdk-go-v2/private/protocol"
)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015... |
package keeper
import (
"fmt"
"time"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
gammtypes "github.com/osmosis-labs/osmosis/x/gamm/types"
incentivestypes "github.com... |
package kafka_cluster
import (
"fmt"
"strings"
"sync"
"time"
"github.com/Shopify/sarama"
"github.com/eapache/go-resiliency/breaker"
"github.com/elastic/beats/v7/libbeat/common/fmtstr"
"github.com/elastic/beats/v7/libbeat/logp"
"github.com/elastic/beats/v7/libbeat/outputs"
"github.com/elastic/beats/v7/libbe... |
package connector
import (
"context"
"sort"
"github.com/datawire/ambassador/pkg/kates"
"github.com/datawire/dlib/derror"
"github.com/datawire/dlib/dgroup"
"github.com/datawire/dlib/dlog"
"github.com/telepresenceio/telepresence/rpc/v2/daemon"
)
// runWatchers runs a set of Kubernetes watchers that provide info... |
package driver
import (
"context"
"encoding/json"
"fmt"
"sort"
"sync/atomic"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/zrepl/zrepl/daemon/logging/trace"
"github.com/zrepl/zrepl/replication/report"
"github.com/stretchr/testify/assert"
jsondiff "github.com/yudai/gojsondiff"
json... |
package main
import (
"fmt"
"math/bits"
"os"
"strconv"
"github.com/jyggen/advent-of-go/internal/solver"
"github.com/jyggen/advent-of-go/internal/utils"
)
const (
a uint8 = 1 << iota
b
c
d
e
f
g
)
const (
zero = a | b | c | e | f | g
one = c | f
two = a | c | d | e | g
three = a | c | d | f | g... |
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
package main
// Example use:
// git clone https://skia.googlesource.com/skia.git
// cd skia
// SKIA=$PWD
// cd experimental/fiddle
// go get github.com/skia-dev/glog... |
package main
import (
"fmt"
"github.com/faiface/mainthread"
"github.com/gravestench/director/pkg/systems/scene"
"github.com/gravestench/mathlib"
"image/color"
"math"
"math/rand"
"time"
rl "github.com/gen2brain/raylib-go/raylib"
"github.com/gravestench/akara"
"github.com/gravestench/director/pkg/common"
)
... |
package gotransformer
import (
"fmt"
"reflect"
"strconv"
"time"
"github.com/360EntSecGroup-Skylar/excelize"
)
type XlxsTransform struct {
OutputObj interface{}
Title map[string]string
Row []string
ExcelName string
File *excelize.File
TimeFormat string
}
func NewXlxsTransform(outObj in... |
package main
import (
"flag"
"fmt"
"os"
"os/signal"
"syscall"
"text/template"
"github.com/drand/drand/common"
"github.com/drand/drand/common/scheme"
"github.com/drand/drand/demo/lib"
)
// Test plans:
// 1. startup with 4 old, 1 new, thr=4
// if fails:
// report; startup with all old nodes.
// 2. reshar... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package greengrass
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
"github.com/aws/aws-sdk-go-v2/private/protocol"
)
// Information about a bulk deployment. You cannot start a new bulk depl... |
// Copyright 2019 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, ... |
package chain_test
import (
"context"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/filecoin-project/go-filecoin/chain"
th "github.com/filecoin-project/go-filecoin/testhelpers"
tf "github.com/filecoin-project/go-filecoin/testhelpers/testflags"
"github.com/fi... |
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package pwr
import (
"bytes"
"fmt"
"io"
"github.com/itchio/wharf/pwr/drip"
"github.com/itchio/wharf/pwr/onclose"
"github.com/itchio/wharf/tlc"
"github.com/itchio/wharf/wsync"
"github.com/pkg/errors"
)
type OnCloseFunc func(fileIndex int64)
type WoundsFilterFunc func(wounds chan *Wound) chan *Wound
// A Val... |
package main
import (
"flag"
"log"
"path/filepath"
"strconv"
"strings"
"time"
sp "github.com/scipipe/scipipe"
)
// Define command line arguments
// Paths to exectuables
var jellyfishPath = flag.String("jellyfish",
"./jellyfish", "the path to the jellyfish executable")
var kleurenPath = flag.String("kleuren",... |
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mm
import (
"fmt"
"github.com/33cn/chain33/common/log/log15"
"github.com/holiman/uint256"
)
// Memory 内存操作封装,在EVM中使用此对象模拟物理内存
type Memory struct {
... |
package types
import (
"bytes"
"encoding/binary"
sdk "github.com/cosmos/cosmos-sdk/types"
)
const (
// ModuleName defines the module name
ModuleName = "cdp"
// StoreKey defines the primary module store key
StoreKey = ModuleName
// RouterKey is the message route for slashing
RouterKey = ModuleName
// Que... |
package tyVpnServer
import (
"crypto/tls"
"encoding/binary"
"errors"
"github.com/tachyon-protocol/udw/tyVpnProtocol"
"github.com/tachyon-protocol/udw/udwBinary"
"github.com/tachyon-protocol/udw/udwBytes"
"github.com/tachyon-protocol/udw/udwLog"
"github.com/tachyon-protocol/udw/udwRand"
"net"
"strconv"
"time... |
// Copyright 2013-2017 Aerospike, 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 t... |
// Copyright 2018-2019 Authors of Cilium
//
// 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 ag... |
// Copyright 2019 Istio Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applica... |
package procutil
import (
"context"
"fmt"
"io"
"runtime"
"sync"
"github.com/tkw1536/procutil/term"
)
// StreamingProcess represents a process that uses a streamer to connect to a remote process.
//
// It automatically initializes a local (tty, pty) pair when needed.
type StreamingProcess struct {
// environme... |
package malgo
// #include "malgo.h"
import "C"
import (
"sync"
"unsafe"
)
// DataProc type.
type DataProc func(pOutputSample, pInputSamples []byte, framecount uint32)
// StopProc type.
type StopProc func()
// DeviceCallbacks contains callbacks for one initialized device.
type DeviceCallbacks struct {
// Data is ... |
// Copyright (c) of parts are held by the various contributors
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
package lxr
import (
"bufio"
"fmt"
"io/ioutil"
"os"
"os/user"
"time"
)
// constants for building different sized lookup tables (ByteMap). Right no... |
package multitenant
import (
"fmt"
"net"
"sort"
"sync"
"time"
"context"
"github.com/bradfitz/gomemcache/memcache"
"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/logrus"
"github.com/weaveworks/common/instrument"
"github.com/weaveworks/scope/report"
)
var (
memcacheRequests = pr... |
package lib
import (
"context"
"encoding/json"
"net"
"regexp"
"strings"
"time"
"github.com/gobwas/ws"
"github.com/gobwas/ws/wsutil"
log "github.com/sirupsen/logrus"
"golang.org/x/net/idna"
)
// Result represents a catched certificate
type Result struct {
Domain string `json:"domain"`
IDN strin... |
package mashery
import (
"github.com/aliakseiyanchuk/mashery-v3-go-client/v3client"
"github.com/hashicorp/go-cty/cty"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
type PlanEndpointMethodIdentifier struct {
PlanEndpointIdentifier
MethodId stri... |
// Copyright 2018 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, ... |
// Copyright (c) 2019 Tigera, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applica... |
package mailz
import (
"context"
"net/url"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
awssesv2 "github.com/aws/aws-sdk-go-v2/service/sesv2"
"github.com/ibrt/golang-bites/numeric/uint16z"
"github.com/ibrt/golang-errors/errorz"
"github.com/ibrt/golang-inject/injectz"
"github.com/ibrt/golang-validation/vz"
"gop... |
package metadatahandler
import (
"context"
"strings"
grpc_ctxtags "github.com/grpc-ecosystem/go-grpc-middleware/tags"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/prometheus/client_golang/prometheus"
gitalyauth "gitlab.com/gitlab-org/gitaly/auth"
"gitlab.com/gitlab-org/gitaly/inte... |
// Copyright 2015 The Cockroach 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 ag... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package configtx
import (
"fmt"
"strings"
cb "github.com/sinochem-tech/fabric/protos/common"
"github.com/golang/protobuf/proto"
)
const (
groupPrefix = "[Group] "
valuePrefix = "[Value] "
policyPrefix = "[Policy] "
pat... |
// Copyright 2019 PingCAP, 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 i... |
package flagger
import (
"errors"
"fmt"
"strings"
)
var (
// ErrNoFlags is the error returned when no flags are passed.
// Useful as a check for when you want to proceed without flags.
ErrNoFlags = errors.New("No flags passed")
ErrBadFlag = errors.New("invalid flag")
ErrBadValue = errors.New("invalid value"... |
/*
Copyright 2021 The OpenYurt 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, so... |
package newrelic
import (
"net/http"
)
// SegmentStartTime is created by Transaction.StartSegmentNow and marks the
// beginning of a segment. A segment with a zero-valued SegmentStartTime may
// safely be ended.
type SegmentStartTime struct{ segment }
// Segment is used to instrument functions, methods, and blocks... |
// Copyright 2021 The LUCI 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... |
/*
* Minio Cloud Storage, (C) 2015, 2016 Minio, 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 applica... |
// Copyright 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
// shotchart: make NBA shotcharts
package main
import (
"encoding/json"
"flag"
"fmt"
"io"
"net/http"
"os"
"github.com/centrifugal/centrifugo/Godeps/_workspace/src/github.com/ajstarks/svgo"
)
// shotdata defines the shotchart JSON response from stats.nba.com
type shotdata struct {
Resource string `json:"res... |
package resource
import (
"fmt"
"reflect"
"sort"
"strings"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
kcorelisters "k8s.io/client-go/listers/core/v1"
configapi "github.com/openshift/api/config/v1"
co... |
package main
import "github.com/uuosio/chain"
//action initialize
func (c *Contract) Initialize() {
chain.RequireAuth(c.self)
db := NewAccountCacheDB(c.self, c.self)
item := db.Get()
check(item == nil, "Account cache already initialized")
item = &AccountCache{}
item.id = 0
item.account = GetAccountNameFromId(... |
/*
* MIT License
*
* Copyright (c) 2018 SmartestEE Co., Ltd..
*
* 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, ... |
// Code generated by gotdgen, DO NOT EDIT.
package tdapi
import (
"context"
"errors"
"fmt"
"sort"
"strings"
"go.uber.org/multierr"
"github.com/gotd/td/bin"
"github.com/gotd/td/tdjson"
"github.com/gotd/td/tdp"
"github.com/gotd/td/tgerr"
)
// No-op definition for keeping imports.
var (
_ = bin.Buffer{}
_... |
package http
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"strings"
"time"
applicationAPIClient "github.com/equinor/radix-cicd-canary/generated-client/client/application"
componentAPIClient "github.com/equinor/radix-cicd-canary/generated-client/client/component"
deploymentAPIClient "g... |
//
// Copyright 2020 IBM Corporation
//
// 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 ... |
package emitter
import (
"reflect"
"sync"
"time"
"github.com/cloudinsight/cloudinsight-agent/common/log"
"github.com/cloudinsight/cloudinsight-agent/common/metric"
)
const (
// DefaultMetricBatchSize is default size of metrics batch size.
DefaultMetricBatchSize = 2000
// DefaultMetricBufferLimit is default ... |
package responsetimeslo
import (
"time"
"sync"
"expvar"
"github.com/cep21/circuit/v3"
"github.com/cep21/circuit/v3/faststats"
)
// Tracker sets up a response time SLO that has a reasonable meaning for hystrix. Use it for an SLO like
// "99% of requests should respond correctly within 300 ms".
//
// Define a ... |
// Copyright 2009 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.
// Debug arguments, set by -d flag.
package base
import (
"fmt"
"log"
"os"
"reflect"
"strconv"
"strings"
)
// Debug holds the parsed debugging configur... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ssm
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInstanceInformationRequest
type Describ... |
// Copyright 2014 The Cayley Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ap... |
package zigbee
import (
"bytes"
"encoding/binary"
"fmt"
"net"
"time"
"github.com/gogo/protobuf/proto"
)
// ZStackServer holds the connection to one of the Z-Stack servers (nwkmgr, gateway and otasrvr)
type ZStackServer struct {
name string
subsystem uint8
conn net.Conn
outgoing chan *zStackP... |
package main
import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"runtime/debug"
"github.com/google/gopacket"
"github.com/google/gopacket/ip4defrag"
"github.com/google/gopacket/layers"
"github.com/google/gopacket/pcap"
"github.com/google/gopacket/reassembly"
)
func main() {
va... |
// Licensed to SolID under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. SolID licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compli... |
// Copyright 2016 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... |
// Copyright © 2020 <NAME>
//
// 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 github
import (
"context"
"encoding/json"
"net/http"
"net/http/httptest"
"net/url"
"testing"
"github.com/go-chi/chi"
"github.com/go-chi/chi/middleware"
"github.com/stretchr/testify/assert"
"github.com/pomerium/pomerium/internal/testutil"
)
type M = map[string]interface{}
func newMockAPI(t *testin... |
package configuration
import (
"fmt"
"io"
"io/ioutil"
"net/http"
"reflect"
"strings"
)
func (version *Version) UnmarshalYAML(unmarshal func(interface{}) error) error {
var versionString string
err := unmarshal(&versionString)
if err != nil {
return err
}
newVersion := Version(versionString)
if _, err :... |
/*
Copyright 2022 The KCP 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, softwar... |
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package parser
import (
"net/url"
"strconv"
"strings"
)
const (
URL_SCHEME_HTTPS = "https"
URL_SCHEME_HTTP = "http"
URL_SCHEME_MYSQL = "mysql"
URL_SCHEME_POSTGRES = "postgres"
URL_SCHEME_REDIS = "redis"
URL_SCHEME_ETCD = "etcd"
URL_SCHEME_KAFKA = "kafka"
URL_SCHEME_MSSQL = "m... |
package quality_evaluators_activity
import (
"fmt"
"github.com/mypurecloud/platform-client-sdk-cli/build/gc/logger"
"github.com/mypurecloud/platform-client-sdk-cli/build/gc/retry"
"github.com/mypurecloud/platform-client-sdk-cli/build/gc/services"
"github.com/mypurecloud/platform-client-sdk-cli/build/gc/utils"
"g... |
// Copyright 2020 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package events
import (
"fmt"
"io"
"strings"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/cli-runtime/pkg/genericclioptions"
"sigs.k8s.io/cli-utils/pkg/apply/event"
"sigs.k8s.io/cli-utils/pkg/common"
"sigs.k8s.io/cli-utils/p... |
/**
* 四则混合运算类
* *初始化的时候需要传入公式:
* *只支持加减乘除和括号
*
* *execute计算结算方法
* *参数一个变量和数值的字符串数组
* *AVAILABLE_PARAMETER_CODE(变量定义,只支持单字节变量)
* *例:公式a+b*4
* *参数String[]{"a","1","b","2"}
* *计算结果9
*
*/
package operate
import (
"errors"
"math"
"strconv"
"strings"
. "operate/stack"
)
const (
//四则运算符号
AVAILABLE_CODE =... |
// Copyright 2019, OpenCensus 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 agree... |
package apiclient
import (
//"bufio"
//"crypto/sha1"
//"encoding/hex"
"encoding/json"
//"fmt"
"io/ioutil"
"log"
"net/http"
"net/http/cookiejar"
//"net/http/httputil"
"net/url"
//"os"
"path/filepath"
"strings"
"time"
"golang.org/x/net/publicsuffix"
"github.com/pkg/errors"
"github.com/rclancey/cache"... |
package presign
import (
"crypto/rand"
"github.com/taurusgroup/multi-party-sig/internal/elgamal"
"github.com/taurusgroup/multi-party-sig/internal/round"
"github.com/taurusgroup/multi-party-sig/internal/types"
"github.com/taurusgroup/multi-party-sig/pkg/hash"
"github.com/taurusgroup/multi-party-sig/pkg/math/curv... |
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package par implements parallel execution helpers.
package par
import (
"math/rand"
"sync"
"sync/atomic"
)
// Work manages a set of work items to be exe... |
package network
import (
"fmt"
"net"
"runtime"
"github.com/lancs-net/netns/bridge"
"github.com/lancs-net/netns/netutils"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/sirupsen/logrus"
"github.com/vishvananda/netlink"
"github.com/vishvananda/netns"
bolt "go.etcd.io/bbolt"
)
// Create returns... |
// Package e2e contains end-to-end tests for the eventdb package. They test from
// the rest interface all the way down to the database layer.
package e2e
import (
"context"
"encoding/json"
"errors"
"fmt"
"net/http"
"net/http/httptest"
"strings"
"testing"
"time"
"github.com/findrandomevents/eventdb"
"githu... |
/*
Copyright NetFoundry, 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
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
... |
/*
Copyright 2020 Gravitational, 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, soft... |
package api
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
"github.com/porter-dev/porter/internal/analytics"
"github.com/porter-dev/porter/internal/models"
"gorm.io/gorm"
"github.com/porter-dev/porter/internal/oauth"
"golang.org/x/oauth2"
)
// HandleGoogleStartUser starts the o... |
package structure
import (
"golang/internal/support"
"bytes"
"errors"
"io"
)
// QuickAndDirtyMode flag. If set to true, the CRC checks on read are skipped.
// This results in faster reads, but corruption won't be found. Does not affect writes.
var QuickAndDirtyMode = false
const (
// PageRawSize is the size of ... |
// Copyright © 2021 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
// 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
//
// Unle... |
package committer
import (
"context"
"math/big"
"strings"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
ethcmn "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/pkg/errors"
"github.com/rs/zerolog"
"github.com/umee-networ... |
// Copyright 2020 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... |
// Package keycache provides the ability to hold active keys in memory
// for the Red October server.
//
// Copyright (c) 2013 CloudFlare, Inc.
package keycache
import (
"crypto/aes"
"crypto/ecdsa"
"crypto/rand"
"crypto/rsa"
"crypto/sha1"
"errors"
"log"
"time"
"github.com/cloudflare/redoctober/ecdh"
"githu... |
/*
Copyright 2019 The Kubeedge 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, so... |
/*
* Tencent is pleased to support the open source community by making 蓝鲸 available.
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the Li... |
package bot
import (
"errors"
"reflect"
"strconv"
"strings"
)
type argumentValueFn func(string) (reflect.Value, error)
// Parser implements a Parse(string) method for data structures that can be
// used as arguments.
type Parser interface {
Parse(string) error
}
// Usager is used in place of the automatically ... |
package main
import (
"fmt"
"github.com/twmb/algoimpl/go/graph"
"github.com/jackdanger/collectlinks"
"net/http"
"log"
"strings"
"sort"
"time"
)
var config struct {
url string
maxConcurrentRequests int
GETTries int
}
func removeDuplicates( links []string ) []string {
sort.Strings(links)
var ret []string
... |
// *** 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 redshift
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Information about Redshift Orderable Clusters a... |
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 Authors of Cilium
package certs
import (
"context"
"fmt"
"github.com/cloudflare/cfssl/cli/genkey"
"github.com/cloudflare/cfssl/config"
"github.com/cloudflare/cfssl/csr"
"github.com/cloudflare/cfssl/helpers"
"github.com/cloudflare/cfssl/initca"
"github.... |
//
// =========================================================================
// Copyright (C) 2017 by Yunify, Inc...
// -------------------------------------------------------------------------
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this work except in compliance with t... |
package fields
import (
"regexp"
"strconv"
"strings"
"github.com/pkg/errors"
)
// Components returns a Spanner which is a superset of one or more other Spanner
// which can used to describe the columns to be selected.
//
// Example: "1,-3:-4,5:"
func Components(s string) ([]Columns, error) {
splitComma := strin... |
package kuberesolver
import (
"fmt"
"google.golang.org/grpc/serviceconfig"
"log"
"strings"
"testing"
"google.golang.org/grpc/resolver"
)
func newTestBuilder() resolver.Builder {
cl := NewInsecureK8sClient("http://127.0.0.1:8001")
return NewBuilder(cl, kubernetesSchema)
}
type fakeConn struct {
cmp chan s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.