dd-trace-go.v1: gopkg.in/DataDog/dd-trace-go.v1/contrib/google.golang.org/api/internal Index | Files

package internal

import "gopkg.in/DataDog/dd-trace-go.v1/contrib/google.golang.org/api/internal"


Package Files


type Endpoint Uses

type Endpoint struct {
    Hostname     string
    HTTPMethod   string
    PathTemplate string
    PathMatcher  *regexp.Regexp

    ServiceName  string
    ResourceName string

An Endpoint is an API endpoint associated with a (host, method, path)

func (Endpoint) String Uses

func (e Endpoint) String() string

String returns a constructor without field names.

type Tree Uses

type Tree struct {
    // contains filtered or unexported fields

A Tree is a prefix tree for matching endpoints based on http requests.

func NewTree Uses

func NewTree(es ...Endpoint) *Tree

NewTree creates a new Tree. You can optionally pass endpoints to add to the tree.

func (*Tree) Add Uses

func (t *Tree) Add(es ...Endpoint)

Add adds zero or more endpoints to the tree.

func (*Tree) Get Uses

func (t *Tree) Get(hostname string, httpMethod string, httpPath string) (Endpoint, bool)

Get attempts to find the endpoints associated with the given hostname, http http method and http path. It returns false if no endpoints matched.

Package internal imports 3 packages (graph) and is imported by 1 packages. Updated 2020-04-06. Refresh now. Tools for package owners.