text
stringlengths
3.08k
10.4k
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/extensions/filters/http/grpc_web/v3/grpc_web.proto package envoy_extensions_filters_http_grpc_web_v3 import ( fmt "fmt" _ "github.com/cncf/udpa/go/udpa/annotations" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to sup...
package partitionserver import ( "fmt" "io/ioutil" "net" "path" "strconv" "github.com/journeymidnight/autumn/manager/pmclient" "github.com/journeymidnight/autumn/manager/smclient" "github.com/journeymidnight/autumn/proto/pb" "github.com/journeymidnight/autumn/proto/pspb" "github.com/journeymidnight/autumn/r...
package elastic import ( "encoding/json" "fmt" "gopkg.in/olivere/elastic.v3" "github.com/unchartedsoftware/veldt" "github.com/unchartedsoftware/veldt/binning" jsonutil "github.com/unchartedsoftware/veldt/util/json" ) // DefaultMeta represents a meta data generator that produces default // metadata with proper...
package termite import ( "crypto" "fmt" "io" "log" "math/rand" "os" "path/filepath" "regexp" "strings" "time" ) func init() { rand.Seed(time.Now().UnixNano() ^ (int64(os.Getpid()) << 32)) } // TODO - move into fuse func SplitPath(name string) (dir, base string) { dir, base = filepath.Split(name) dir = s...
// Copyright 2018 Prometheus Team // 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 bagit_test import ( "archive/tar" "fmt" "os" "path" "strings" "testing" "github.com/APTrust/dart-runner/bagit" "github.com/APTrust/dart-runner/constants" "github.com/APTrust/dart-runner/util" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) var digestAlgs = []string{ c...
// Copyright 2021 <NAME>. All rights reserved. // // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. //go:generate go run gen-accessors.go package planhat import ( "context" "encoding/json" "errors" "fmt" "net/http" "net/url" "reflect" "time" "github.com...
// // 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 main import ( "fmt" "io/ioutil" "math" "os" "os/exec" "os/signal" "strconv" "strings" _ "embed" . "github.com/logrusorgru/aurora" ) //go:embed toptext.txt var topText string const tmpfile = "/tmp/slashnav-tomove.txt" func ClearScreen() { cmd := exec.Command("clear") cmd.Stdout = os.Stdout cmd...
package models import ( "errors" "gopkg.in/olivere/elastic.v3" . "github.com/eywa/utils" "regexp" "strconv" "strings" "time" ) var SeriesAggName = "series_agg" type SeriesQuery struct { Channel *Channel Device string Field string Tags map[string]string SummaryType string TimeS...
package livechathandler import ( "context" "errors" "fmt" "time" youtube "google.golang.org/api/youtube/v3" "github.com/umineko1996/livechathandler/internal/oauth2" ) type ( MessageHandler interface { MessageHandle(message *youtube.LiveChatMessage) } MessageHandlerFunc func(message *youtube.LiveChatMessa...
package cli import ( "bytes" "context" "fmt" "io" "regexp" "time" "github.com/pkg/errors" "github.com/imdario/mergo" ) // Session defines the API exposed by an SSH client. type Session interface { // Send writes the supplied value to the server and returns the response. // The behaviour can be modified by...
package tarfs import ( "archive/tar" "bytes" "errors" "fmt" "io" "strconv" ) // The value we should find in the "magic" position of the tar header. var ( magicPAX = []byte("ustar\x00") magicGNU = []byte("ustar ") magicOldGNU = []byte("ustar \x00") ) // FindSegments looks at a tar blockwise to establi...
package gluapp import ( "bytes" "errors" "fmt" "net/http" "regexp" "strings" "github.com/yuin/gopher-lua" "a4.io/blobstash/pkg/apps/luautil" ) const any = "any" var ( errMethodNotAllowed = errors.New("method not allowed") errNotFound = errors.New("not found") ) // route represents a registed rou...
// Copyright 2019 Istio 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...
// Copyright (c) 2020 Tailscale Inc & 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 cli import ( "context" "encoding/json" "flag" "fmt" "log" "os" "sort" "strings" "time" "github.com/peterbourgon/ff/v2/ffcli" "t...
package client import ( "bufio" "bytes" "encoding/hex" "errors" "fmt" rt "github.com/quantcast/g2/pkg/runtime" "io" "net" "os" "reflect" "strings" "testing" ) type snapshot struct { filenames map[string]map[string]string } func loadSnapshot(directory string) (s *snapshot, err error) { manifest, err := ...
/* 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 main import ( "fmt" "regexp" "strings" "github.com/anz-bank/sysl/pkg/diagrams" "github.com/anz-bank/sysl/pkg/sequencediagram" "github.com/anz-bank/sysl/pkg/cmdutils" "gopkg.in/alecthomas/kingpin.v2" sysl "github.com/anz-bank/sysl/pkg/sysl" "github.com/sirupsen/logrus" ) func generateDataModelsWit...
// Copyright 2019 Liquidata, 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...
package rtsp import ( "bufio" "bytes" "fmt" "strconv" ) // StatusCode is the status code of a RTSP response. type StatusCode int // standard status codes const ( StatusContinue StatusCode = 100 StatusOK StatusCode = 200 StatusMovedPermanently ...
/* 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 linux import ( "context" "github.com/quay/claircore" "github.com/quay/claircore/internal/indexer" ) // layerArifact aggregates the any artifacts found within a layer type layerArtifacts struct { hash claircore.Digest pkgs []*claircore.Package dist []*claircore.Distribution // each layer can only hav...
package multisig import ( fmt "fmt" tmcrypto "github.com/tendermint/tendermint/crypto" proto "github.com/gogo/protobuf/proto" "github.com/irisnet/core-sdk-go/common/codec/types" crypto "github.com/irisnet/core-sdk-go/common/crypto/types" multisigtypes "github.com/irisnet/core-sdk-go/common/crypto/types/multis...
// Copyright 2020 Coinbase, 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...
// http://blog.studygolang.com/2013/01/go%E5%8A%A0%E5%AF%86%E8%A7%A3%E5%AF%86%E4%B9%8Brsa/ // 密钥长度,1024觉得不够安全的话可以用2048,但是代价也相应增大 // openssl genrsa -out private.pem 1024 // 用于生成密钥。在Go中,可以查看encoding/pem包和crypto/x509包 // openssl rsa -in private.pem -pubout -out public.pem package main import ( "bytes" "crypto/cipher" ...
/* 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 main import ( "flag" "fmt" "io/ioutil" "os" "path/filepath" "strings" "github.com/fatih/color" "github.com/mgechev/dots" "github.com/mgechev/revive/config" "github.com/mgechev/revive/lint" "github.com/mitchellh/go-homedir" ) var ( version = "dev" commit = "none" date = "unknown" builtBy = ...
/* Copyright 2015 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 sdl // #include "SDL.h" import "C" import ( "unsafe" ) // WindowFlag is a window creation option. type WindowFlag uint32 // Window creation options. const ( WindowFullscreen WindowFlag = C.SDL_WINDOW_FULLSCREEN WindowOpenGL WindowFlag = C.SDL_WINDOW_OPENGL WindowShown Windo...
package repl import ( "bytes" "io" "io/ioutil" "os" "runtime" "strings" "testing" "github.com/google/go-cmp/cmp" "github.com/ktr0731/evans/config" "github.com/ktr0731/evans/cui" "github.com/ktr0731/evans/grpc" "github.com/ktr0731/evans/prompt" "github.com/ktr0731/evans/usecase" "github.com/pkg/errors" )...
package webm import ( "code.google.com/p/ebml-go/ebml" "io" "log" "time" ) const ( BadTC = time.Duration(-1000000000000000) shutdown = 2 * BadTC ) type Packet struct { Data []byte Timecode time.Duration TrackNumber uint Invisible bool Keyframe bool Discardable bool Rebase bool } ...
package launcher import ( "bytes" "path" "time" "github.com/Fantom-foundation/lachesis-base/inter/idx" "github.com/Fantom-foundation/lachesis-base/kvdb/table" "github.com/Fantom-foundation/lachesis-base/utils/simplewlru" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" "gi...
// *** 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 cloudformation import ( "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/go/pulumi" ) // Manages a CloudFormation Stack Set Instanc...
// Code generated by gotdgen, DO NOT EDIT. package tg 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 filesystem import ( "net/http" "os" "strconv" "strings" "sync" "github.com/userstyles-world/fiber/v2" ) // Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool ...
package models import ( "encoding/base64" "fmt" "io" "net/mail" "strings" "github.com/gophish/gomail" "github.com/gophish/gophish/config" log "github.com/gophish/gophish/logger" "github.com/gophish/gophish/mailer" ) // PreviewPrefix is the standard prefix added to the rid parameter when sending // test emai...
package expconf import ( "bytes" "encoding/json" "github.com/pkg/errors" "github.com/determined-ai/determined/master/pkg/schemas" ) // LegacyConfig represents a config that was once valid but might no longer be shimmable to the // current version of ExperimentConfig. Fortunately, the parts of the system that n...
// Copyright 2017 fatedier, <EMAIL> // // 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 ...
package main import ( "fmt" "github.com/shopspring/decimal" ) func main() { floatCalc() fmt.Println("") floatPrint() fmt.Println("") fmt.Println("") decimalCalc() fmt.Println("") decimalPrint() fmt.Println("") furtherDecimalCalc() fmt.Println("") // DivisionPrecision is the number of decimal places i...
// Copyright (c) 2019 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
/* Copyright Sonobuoy Contributors 2019 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 pango import ( "encoding/xml" "github.com/PaloAltoNetworks/pango/version" // Various namespace imports. "github.com/PaloAltoNetworks/pango/dev" "github.com/PaloAltoNetworks/pango/licen" "github.com/PaloAltoNetworks/pango/netw" "github.com/PaloAltoNetworks/pango/objs" "github.com/PaloAltoNetworks/pang...
// Copyright 2020 The PipeCD 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 deposit import ( "fmt" "github.com/loveandpeople-DAG/goClient/bundle" "github.com/loveandpeople-DAG/goClient/checksum" "github.com/loveandpeople-DAG/goClient/consts" "github.com/loveandpeople-DAG/goClient/curl" . "github.com/loveandpeople-DAG/goClient/trinary" "github.com/pkg/errors" "net/url" "strcon...
package gormtestsupport import ( "context" "fmt" "os" "testing" "github.com/stretchr/testify/require" "github.com/fabric8-services/fabric8-auth/application" factorymanager "github.com/fabric8-services/fabric8-auth/application/factory/manager" "github.com/fabric8-services/fabric8-auth/application/factory/wrap...
// Copyright © 2019 The Things Network Foundation, The Things Industries B.V. // // 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 // // Un...
// Copyright 2021 Matrix Origin // // 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 ...
// Code generated by smithy-go-codegen DO NOT EDIT. package iam import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" smithy "github.com/awslabs/smithy-go" "github.com/awslabs/smithy-go/middleware" smithyhttp "github.com/awslabs/smithy-go/tra...
/* Copyright 2018 The KubeSphere 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 dog import ( "time" "github.com/lindsaygelle/nook" "github.com/lindsaygelle/nook/animal" "github.com/lindsaygelle/nook/character" "github.com/lindsaygelle/nook/gender" "github.com/lindsaygelle/nook/personality" "golang.org/x/text/language" ) var ( maddieBirthday = nook.Birthday{ Day: 11, Month:...
/************************************************************************* * MIT License * Copyright (c) 2021 Model Rocket * * 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 rest...
// Copyright 2019 marmei. All rights reserved. // Use of this source code is governed by a MIT license that can be found in the // LICENSE file. // GitHub: https://github.com/xteve-project/xTeVe package main import ( "flag" "fmt" "os" "path/filepath" "runtime" "strings" "./src" ) // GitHubStruct : GitHub Acc...
package odoo import ( "fmt" ) // ProductSupplierinfo represents product.supplierinfo model. type ProductSupplierinfo struct { LastUpdate *Time `xmlrpc:"__last_update,omptempty"` CompanyId *Many2One `xmlrpc:"company_id,omptempty"` CreateDate *Time `xmlrpc:"create_date,omptempty"...
package permissions import ( "strings" "github.com/bwmarrin/discordgo" "github.com/gofiber/fiber/v2" "github.com/sarulabs/di/v2" "github.com/zekroTJA/shinpuru/internal/services/config" "github.com/zekroTJA/shinpuru/internal/services/database" "github.com/zekroTJA/shinpuru/internal/util/static" "g...
package http 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 // This is a compile-time assertion to ensure that this generated file // is compatible with the ...
package scan import ( "context" "fmt" "os" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/credentials/stscreds" "github.com/aws/aws-sdk-go-v2/service/sts" janitorconfig "github.com/lendi-au/helm-janitor/internal/config" client "github.com/lendi-au/helm-...
package gnparser import ( "bytes" "fmt" "runtime" "github.com/gnames/gnparser/pb" "github.com/gnames/gnparser/preprocess" "github.com/gnames/gnparser/grammar" "github.com/gnames/gnparser/output" ) // GNparser is responsible for parsing operations. type GNparser struct { // Format defines the output format o...
package main import ( "context" "database/sql" "flag" "fmt" "os" "os/signal" "runtime" "time" "github.com/erizocosmico/git2pg" "github.com/sirupsen/logrus" "github.com/src-d/go-borges" "github.com/src-d/go-borges/plain" "github.com/src-d/go-borges/siva" "gopkg.in/src-d/go-billy.v4/osfs" _ "github.com/...
// Copyright 2021 VMware, Inc. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package cli import ( "context" "fmt" "os" "strconv" "strings" "github.com/aunum/log" "github.com/spf13/cobra" cliv1alpha1 "github.com/vmware-tanzu/tanzu-framework/apis/cli/v1alpha1" "github.com/vmware-tanzu/tanzu-fra...
/* * Copyright 2017-2018 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 agree...
package util import ( "io" "net/http" "os" "path/filepath" "regexp" "strings" "gopkg.in/yaml.v2" "github.com/loft-sh/devspace/pkg/devspace/config/constants" "github.com/loft-sh/devspace/pkg/devspace/config/versions/latest" "github.com/loft-sh/devspace/pkg/util/git" "github.com/loft-sh/devspace/pkg/util/ha...
// Copyright 2020 The Prometheus 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...
// Code generated by smithy-go-codegen DO NOT EDIT. package ec2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ec2/types" smithy "github.com/awslabs/smithy-go" "github.com/awslabs/smithy-go/middlew...
package config import ( "crypto/rsa" "crypto/x509" "encoding/base64" "encoding/pem" "fmt" "github.com/caarlos0/env" "github.com/jmoiron/sqlx" "github.com/sirupsen/logrus" "reflect" "time" ) type ServiceConfig struct { BasePath string `env:"BASE_PATH"` ServiceVersion string `env:"SERIVCE_VERSION" envDefau...
package main import ( "encoding/xml" "fmt" "io" "io/ioutil" "os" "path" "sync" "time" "github.com/PuerkitoBio/goquery" "github.com/gocarina/gocsv" ) // AccountsFilingEntry is the source data structure for the accounts entry // in the output CSV file type AccountsFilingEntry struct { RegistrationID string ...
package skiplist import ( "bytes" "math" "math/bits" "strconv" ) const ( RecommendedEps = 1e-9 MaxLevel = 40 ) type SkipList struct { head *SkipItem tail *SkipItem itemNum int maxLevel int level int updated []*SkipItem levelSeed uint64 eps float64 } func NewSkipList(eps ...
package controllers import ( "context" k8skevingomezfrv1 "github.com/K-Phoen/dark/api/v1" "github.com/K-Phoen/dark/internal/pkg/grafana" "github.com/K-Phoen/grabana" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/tools/record" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/clie...
package traceutil import ( "bytes" "strings" "testing" "unicode" "github.com/stretchr/testify/assert" ) func TestNormalizeTag(t *testing.T) { for _, tt := range []struct{ in, out string }{ {in: "#test_starting_hash", out: "test_starting_hash"}, {in: "TestCAPSandSuch", out: "testcapsandsuch"}, {in: "Test ...
package boot import ( "context" "github.com/2345tech/apollo-agent/common" "log" "net/http" _ "net/http/pprof" "os" "sync" "time" ) const ( VERSION = "v4.2.1" AUTHOR = "lixy<<EMAIL>>; cinvanlee<<EMAIL>>" FilePerm = 0644 ) type AgentLauncher interface { Init(agent *Agent) error Run() error Stop() Shu...
// 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 ...
/* Copyright 2019 Splunk 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 wri...
package prad import ( "context" "crypto/tls" "encoding/base64" "encoding/json" "fmt" "log" "net/http" "net/url" "os" "regexp" "strconv" "strings" "sync" "sync/atomic" "time" "github.com/logrusorgru/aurora" "golang.org/x/time/rate" ) type Client struct { Wordlist []string Client *http.C...
/* 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 libs import ( "fmt" "strconv" "strings" "github.com/packetassailant/D2Deploy/models" "github.com/digitalocean/godo" "golang.org/x/oauth2" ) type DoDropletMarshaller struct{} type TokenSource struct { AccessToken string } func (t *TokenSource) Token() (*oauth2.Token, error) { token := &oauth2.Token...
package cmd import ( "encoding/json" "fmt" "testing" "github.com/stretchr/testify/require" "gitlab.com/accumulatenetwork/accumulate/internal/api/v2" "gitlab.com/accumulatenetwork/accumulate/protocol" ) func init() { testMatrix.addTest(testCase1_1) testMatrix.addTest(testCase1_2) testMatrix.addTest(testCase3...
// Copyright 2020 New Relic Corporation. All rights reserved. // SPDX-License-Identifier: Apache-2.0 // +build linux // +build harvest package harvest import ( "fmt" "github.com/newrelic/infrastructure-agent/pkg/entity" "os" "regexp" "strconv" "testing" "github.com/newrelic/infrastructure-agent/pkg/sysinfo/cl...
package cluster import ( c "configuration" "errors" "fmt" "net" "protocol" "time" log "code.google.com/p/log4go" ) const ( HEARTBEAT_TIMEOUT = 100 * time.Millisecond ) type ClusterServer struct { Id uint32 RaftName string State ServerState RaftCon...
package boji import ( "io" "os" "io/ioutil" "errors" "golang.org/x/crypto/openpgp" ) // Represents an encrypted file that is decrypted as it is read type encryptedFile struct { File *os.File path string key []byte encryptedReader io.Reader seekPos int64 plaintextSize int64 // optimization. Only set aft...
package berkeleydb // #cgo LDFLAGS: -ldb // #include <db.h> // #include <stdlib.h> // #include "bdb.h" import "C" import ( "errors" "fmt" "unsafe" ) const version string = "0.0.1" // Flags for opening a database or environment. const ( DbCreate = C.DB_CREATE DbExcl = C.DB_EXCL DbRdOnly = C.DB_RDONLY ...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package keys import ( "fmt" "strconv" "unicode/utf8" token2 "github.com/hyperledger-labs/fabric-token-sdk/token/token" "github.com/pkg/errors" ) const ( minUnicodeRuneValue = 0 // U+0000 MaxUnicodeRu...
package main import ( mkr "github.com/mackerelio/mackerel-client-go" mp "github.com/mackerelio/go-mackerel-plugin-helper" "fmt" "flag" "strings" "math" "os" ) func main() { optNodeName := flag.String("node", "", "Mackerel Node Name (default: use hostname)") optService := flag.String("service", "", "Service N...
package k8s import ( "context" "errors" "fmt" "sort" "strings" "sync" "github.com/blang/semver" "k8s.io/client-go/kubernetes" "github.com/datawire/dlib/dlog" "github.com/telepresenceio/telepresence/v2/pkg/client" "github.com/telepresenceio/telepresence/v2/pkg/k8sapi" ) const supportedKubeAPIVersion = "1....
// Copyright 2017 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 gps import ( "sort" "github.com/armon/go-radix" "github.com/golang/dep/internal/gps/pkgtree" ) // rootdata holds static data and constraining rule...
// Copyright 2021 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 main import ( "io/ioutil" "os" "os/exec" "path/filepath" "strings" "sync" "testing" ) func TestMain(m *testing.M) { if os.Getenv("GO_FILE2FUZZ...
//go:build !noasm && !appengine && gc // +build !noasm,!appengine,gc /* * MinIO Cloud Storage, (C) 2020 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....
package utils import ( "fmt" "net/url" "regexp" "strconv" "strings" "github.com/Azure/acs-engine/pkg/api" "github.com/Azure/azure-sdk-for-go/arm/compute" log "github.com/sirupsen/logrus" ) const ( // TODO: merge with the RP code k8sLinuxVMNamingFormat = "^[0-9a-zA-Z]{3}-(.+)-([0-9a-fA-F]{8})-{0,2}(...
// Copyright Amazon.com, Inc. or its affiliates. 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. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in the "license" file acc...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package storagegateway import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) // A JSON object containing a list of DescribeStorediSCSIVolumesInput$VolumeARNs. // Please also see https://docs.aws...
// Copyright 2015 The Prometheus 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...
package dev import ( "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "crypto/rsa" "crypto/tls" "crypto/x509" "crypto/x509/pkix" "encoding/pem" "fmt" "math/big" "os" "path/filepath" "sync" "time" "github.com/hashicorp/golang-lru" "github.com/tubbo/docker-dev/homedir" "github.com/vektra/errors" ) var C...
// Copyright 2016 The Chromium 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 main import ( "context" "testing" . "github.com/smartystreets/goconvey/convey" ds "go.chromium.org/gae/service/datastore" tq "go.chromium.o...
/* * Copyright 2021 The Gort 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 agre...
package gammacb import ( "fmt" "io" "io/ioutil" "math" "os" "path/filepath" "strconv" protobuf "github.com/golang/protobuf/proto" "github.com/tiglabs/raft/proto" "github.com/vearch/vearch/proto/vearchpb" "github.com/vearch/vearch/util/errutil" "github.com/vearch/vearch/util/fileutil" "github.com/vearch/v...
package spi import ( "time" "github.com/openshift/osde2e/pkg/common/metadata" ) // ClusterState is the state of the cluster. type ClusterState string const ( // ClusterStateError is the cluster error state. ClusterStateError ClusterState = "error" // ClusterStateInstalling the cluster is being isntalled. Clus...
package helm type Tracing struct { JaegerAgentHost interface{} `yaml:"jaegerAgentHost"` } type Kvstore struct { Store string `yaml:"store"` } type Ring struct { Kvstore *Kvstore `yaml:"kvstore"` ReplicationFactor int `yaml:"replication_factor"` } type Lifecycler struct { Ring *Ring `yaml:"ring"` } ...
// //Copyright [2016] [SnapRoute 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 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softw...
package leet import ( "fmt" "io/ioutil" "os" "path" "strings" ) func (th SaveOption) golang() (err error) { baseDir := th.SaveDir solutionDir := path.Join(baseDir, "solution") err = os.MkdirAll(solutionDir, 0755) if err != nil { return } code, ok := parseGoCode(th.CodeSnippet) if !ok { code = ` func ...
package agent import ( "context" "io" "time" "github.com/fnproject/fn/api/common" "github.com/fnproject/fn/api/common/singleflight" "github.com/fnproject/fn/api/models" "github.com/patrickmn/go-cache" ) // DataAccess abstracts the datastore and message queue operations done by the // agent, so that API nodes ...