repo_name stringlengths 1 52 | repo_creator stringclasses 6
values | programming_language stringclasses 4
values | code stringlengths 0 9.68M | num_lines int64 1 234k |
|---|---|---|---|---|
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package xray
import (
"bytes"
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/xray/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/encoding/httpbinding"
smithyjson "github.com/aws/smithy-go/encoding/json"
"github.com/aws/smithy-go/mi... | 2,760 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package xray
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/xray/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/middleware"
)
type validateOpBatchGetTraces struct {
}
func (*validateOpBatchGetTraces) ID() string {
return "... | 1,019 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package endpoints
import (
"github.com/aws/aws-sdk-go-v2/aws"
endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2"
"github.com/aws/smithy-go/logging"
"regexp"
)
// Options is the endpoint resolver configuration options
type Options struct {
// Logger... | 486 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package endpoints
import (
"testing"
)
func TestRegexCompile(t *testing.T) {
_ = defaultPartitions
}
| 12 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package types
type EncryptionStatus string
// Enum values for EncryptionStatus
const (
EncryptionStatusUpdating EncryptionStatus = "UPDATING"
EncryptionStatusActive EncryptionStatus = "ACTIVE"
)
// Values returns all known values for EncryptionStatus. Note tha... | 110 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package types
import (
"fmt"
smithy "github.com/aws/smithy-go"
)
// A policy revision id was provided which does not match the latest policy
// revision. This exception is also if a policy revision id of 0 is provided via
// PutResourcePolicy and a policy with th... | 278 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package types
import (
smithydocument "github.com/aws/smithy-go/document"
"time"
)
// An alias for an edge.
type Alias struct {
// The canonical name of the alias.
Name *string
// A list of names for the alias, including the canonical name.
Names []string
... | 1,277 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package types_test
import (
"fmt"
"github.com/aws/aws-sdk-go-v2/service/xray/types"
)
func ExampleAnnotationValue_outputUsage() {
var union types.AnnotationValue
// type switches can be used to check the union value
switch v := union.(type) {
case *types.Anno... | 35 |
aws-secretsmanager-caching-go | aws | Go | package scintegtests
import (
"bytes"
"math/rand"
"regexp"
"testing"
"time"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/secretsmanager"
"github.com/aws/aws-sdk-go/service/secretsmanager/secretsmanageriface"
"github.com/aws/aws-secretsmana... | 389 |
aws-secretsmanager-caching-go | aws | Go | // Copyright 2019 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" fil... | 157 |
aws-secretsmanager-caching-go | aws | Go | // Copyright 2019 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" fil... | 41 |
aws-secretsmanager-caching-go | aws | Go | // Copyright 2019 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" fil... | 27 |
aws-secretsmanager-caching-go | aws | Go | // Copyright 2019 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" fil... | 95 |
aws-secretsmanager-caching-go | aws | Go | // Copyright 2019 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" fil... | 211 |
aws-secretsmanager-caching-go | aws | Go | // Copyright 2019 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" fil... | 60 |
aws-secretsmanager-caching-go | aws | Go | // Copyright 2019 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" fil... | 105 |
aws-secretsmanager-caching-go | aws | Go | // Copyright 2019 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" fil... | 116 |
aws-secretsmanager-caching-go | aws | Go | // Copyright 2019 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" fil... | 392 |
aws-secretsmanager-caching-go | aws | Go | // Copyright 2019 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" fil... | 43 |
aws-secretsmanager-caching-go | aws | Go | // Copyright 2019 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" fil... | 131 |
aws-secretsmanager-caching-go | aws | Go | // Copyright 2019 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" fil... | 209 |
aws-secretsmanager-caching-go | aws | Go | // Copyright 2019 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" fil... | 97 |
aws-secretsmanager-caching-go | aws | Go | // Copyright 2019 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" fil... | 32 |
aws-sigv4-auth-cassandra-gocql-driver-plugin | aws | Go | /*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* ... | 109 |
aws-sigv4-auth-cassandra-gocql-driver-plugin | aws | Go | /*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* ... | 71 |
aws-sigv4-auth-cassandra-gocql-driver-plugin | aws | Go | /*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* ... | 114 |
aws-sigv4-auth-cassandra-gocql-driver-plugin | aws | Go | /*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* ... | 103 |
aws-toolkit-jetbrains | aws | Go | // NOTE this is flat because of VGO mapping
package main
import (
"github.com/aws/aws-lambda-go/lambda"
"strings"
)
func handler(request string) (string, error) {
return strings.ToUpper(request), nil
}
func main() {
lambda.Start(handler)
}
| 16 |
aws-toolkit-vscode | aws | Go | package main
import (
"errors"
"fmt"
"io/ioutil"
"net/http"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
)
var (
// DefaultHTTPGetAddress Default Address
DefaultHTTPGetAddress = "https://checkip.amazonaws.com"
// ErrNoIP No IP found in response
ErrNoIP = errors.New("No IP in... | 52 |
aws-toolkit-vscode | aws | Go | package main
import (
"fmt"
"net/http"
"net/http/httptest"
"testing"
"github.com/aws/aws-lambda-go/events"
)
func TestHandler(t *testing.T) {
t.Run("Unable to get IP", func(t *testing.T) {
DefaultHTTPGetAddress = "http://127.0.0.1:12345"
_, err := handler(events.APIGatewayProxyRequest{})
if err == nil {... | 65 |
aws-toolkit-vscode | aws | Go | package main
import (
"errors"
"fmt"
"io/ioutil"
"net/http"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
)
var (
// DefaultHTTPGetAddress Default Address
DefaultHTTPGetAddress = "https://checkip.amazonaws.com"
// ErrNoIP No IP found in response
ErrNoIP = errors.New("No IP in... | 52 |
aws-toolkit-vscode | aws | Go | package main
import (
"fmt"
"net/http"
"net/http/httptest"
"testing"
"github.com/aws/aws-lambda-go/events"
)
func TestHandler(t *testing.T) {
t.Run("Unable to get IP", func(t *testing.T) {
DefaultHTTPGetAddress = "http://127.0.0.1:12345"
_, err := handler(events.APIGatewayProxyRequest{})
if err == nil {... | 65 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 361 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 40 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 67 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 112 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 159 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 398 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 728 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 94 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 224 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 307 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 426 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 93 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 150 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 58 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 124 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 186 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 193 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 284 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 49 |
aws-xray-daemon | aws | Go | // Package proxy provides an http server to act as a signing proxy for SDKs calling AWS X-Ray APIs
package proxy
import (
"bytes"
"errors"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"net/http/httputil"
"net/url"
"os"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/endpoints"
"github.c... | 170 |
aws-xray-daemon | aws | Go | package proxy
import (
"io"
"io/ioutil"
"net/http"
"net/http/httputil"
"net/url"
"strings"
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-xray-daemon/pkg/cfg"
"github.com/stretchr/testify/assert"
)
// Asser... | 206 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 98 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 168 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 20 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 56 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 359 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 157 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 55 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 103 |
aws-xray-daemon | aws | Go | // Copyright 2018-2018 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" ... | 35 |
aws-xray-daemon | aws | Go | package util
import (
"bytes"
log "github.com/cihub/seelog"
)
// SplitHeaderBody separates header and body of buf using provided separator sep, and stores in returnByte.
func SplitHeaderBody(buf, sep *[]byte, returnByte *[][]byte) [][]byte {
if buf == nil {
log.Error("Buf to split passed nil")
return nil
}
... | 55 |
aws-xray-daemon | aws | Go | package util
import (
"strings"
"testing"
"github.com/aws/aws-xray-daemon/pkg/util/test"
"github.com/stretchr/testify/assert"
)
func TestSplitHeaderBodyWithSeparatorExists(t *testing.T) {
str := "Header\nBody"
separator := "\n"
buf := []byte(str)
separatorArray := []byte(separator)
result := make([][]byte, ... | 84 |
aws-xray-daemon | aws | Go | package test
import (
log "github.com/cihub/seelog"
)
// LogWriter defines structure for log writer.
type LogWriter struct {
Logs []string
}
// Write writes p bytes to log writer.
func (sw *LogWriter) Write(p []byte) (n int, err error) {
sw.Logs = append(sw.Logs, string(p))
return len(p), nil
}
// LogSetup init... | 28 |
aws-xray-daemon | aws | Go | package test
import (
"sync"
"sync/atomic"
"time"
)
type timer struct {
start time.Time
duration time.Duration
repeat bool
fired bool
c chan time.Time
}
// MockTimerClient contains mock timer client.
type MockTimerClient struct {
sync.RWMutex
current time.Time
timers []*timer
afterCalle... | 96 |
aws-xray-daemon | aws | Go | package test
import (
"fmt"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
type EmptyStruct struct {
}
func ChannelHasData(c chan EmptyStruct) bool {
var ok bool
select {
case <-c:
ok = true
default:
ok = false
}
return ok
}
// This function is used so that test cases will not freeze if cha... | 244 |
aws-xray-daemon | aws | Go | package timer
import "time"
// Timer interface
type Timer interface {
Tick(d time.Duration) <-chan time.Time
After(d time.Duration) <-chan time.Time
}
// Client is an empty timer client.
type Client struct{}
// Tick is wrapper to time.Tick().
func (t *Client) Tick(d time.Duration) <-chan time.Time {
return time.... | 23 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 48 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 118 |
aws-xray-sdk-go | aws | Go | package ec2
import (
"io/ioutil"
"net/http"
"net/http/httptest"
"testing"
"github.com/stretchr/testify/assert"
)
const testMetadata = `{
"accountId" : "123367104812",
"architecture" : "x86_64",
"availabilityZone" : "us-west-2a",
"billingProducts" : null,
"devpayProductCodes" : null,
"marketplaceProd... | 134 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 39 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 183 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 348 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 137 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 85 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 89 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 244 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2021 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" ... | 23 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 79 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 84 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 62 |
aws-xray-sdk-go | aws | Go | package lambda
import (
"strings"
"github.com/aws/aws-lambda-go/events"
)
func IsSampled(sqsMessge events.SQSMessage) bool {
value, ok := sqsMessge.Attributes["AWSTraceHeader"]
if !ok {
return false
}
return strings.Contains(value, "Sampled=1")
}
| 18 |
aws-xray-sdk-go | aws | Go | package lambda
import (
"testing"
"github.com/aws/aws-lambda-go/events"
"github.com/stretchr/testify/assert"
)
func TestSQSMessageHelper(t *testing.T) {
testTrue(t, "Root=1-632BB806-bd862e3fe1be46a994272793;Sampled=1")
testTrue(t, "Root=1-5759e988-bd862e3fe1be46a994272793;Sampled=1")
testTrue(t, "Root=1-5759e9... | 34 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 75 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 189 |
aws-xray-sdk-go | aws | Go | // Code generated by go-bindata. DO NOT EDIT.
// sources:
// resources/AWSWhitelist.json (11.191kB)
// resources/DefaultSamplingRules.json (97B)
// resources/ExampleSamplingRules.json (609B)
package resources
import (
"bytes"
"compress/gzip"
"crypto/sha256"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"string... | 320 |
aws-xray-sdk-go | aws | Go | package main
import (
"context"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-xray-sdk-go/xray"
"golang.org/x/net/context/ctxhttp"
"log"
"net/http"
"os"
)
func webServer() {
http.Handle("/", http.HandlerFunc(func(w http.Res... | 60 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 19 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 51 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 74 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 242 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 19 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 167 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 28 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 522 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 295 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 843 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 2,766 |
aws-xray-sdk-go | aws | Go | // Copyright 2017-2017 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" ... | 75 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.