internal

package
v1.0.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalizeHeaderKey

func CanonicalizeHeaderKey(k string) string

CanonicalizeHeaderKey canonicalizes the given header key for storage into the Headers map.

Types

type Headers

type Headers struct {
	// contains filtered or unexported fields
}

Headers provides the implementation of both, yarpc.Headers and transport.Headers.

Keys in the map are canonicalized using CanonicalizeHeaderKey.

func NewHeadersWithCapacity

func NewHeadersWithCapacity(capacity int) Headers

NewHeadersWithCapacity allocates a new Headers object. capacity specifies the initial capacity of the headers map. A capacity of zero or less is ignored.

func (Headers) Del

func (h Headers) Del(k string)

Del deletes the header with the given name.

func (Headers) Get

func (h Headers) Get(k string) (string, bool)

Get retrieves the value associated with the given key.

func (Headers) Items

func (h Headers) Items() map[string]string

Items returns the underlying map for this Headers object. The returned map MUST NOT be mutated. Doing so will result in undefined behavior.

This ALWAYS returns a non-nil result.

func (Headers) Len

func (h Headers) Len() int

Len returns the number of headers defined on this object.

func (Headers) With

func (h Headers) With(k, v string) Headers

With returns a Headers object with the given key-value pair added to it.

Returns a Headers object possibly backed by a different data store.

Directories

Path Synopsis
thrift/gen-go/echo
Package echo is generated code used to make or handle TChannel calls using Thrift.
Package echo is generated code used to make or handle TChannel calls using Thrift.
thrift/gen-go/gauntlet_tchannel
Package gauntlet_tchannel is generated code used to make or handle TChannel calls using Thrift.
Package gauntlet_tchannel is generated code used to make or handle TChannel calls using Thrift.
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL