tchannel

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: 15 Imported by: 58

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOutbound

func NewOutbound(ch Channel, options ...OutboundOption) transport.UnaryOutbound

NewOutbound builds a new TChannel outbound which uses the given Channel to make requests.

Types

type Channel added in v0.5.0

type Channel interface {
	BeginCall(
		ctx context.Context,
		hostPort, serviceName, methodName string,
		callOptions *tchannel.CallOptions,
	) (*tchannel.OutboundCall, error)
	Close()
	GetSubChannel(serviceName string, opts ...tchannel.SubChannelOption) *tchannel.SubChannel
	ListenAndServe(hostPort string) error
	PeerInfo() tchannel.LocalPeerInfo
	ServiceName() string
	State() tchannel.ChannelState
}

Channel is top-level TChannel.

See https://godoc.org/github.com/uber/tchannel-go#Channel for more information.

type Inbound

type Inbound interface {
	transport.Inbound

	// Returns the underlying Channel for this Inbound.
	Channel() Channel
}

Inbound is a TChannel Inbound.

func NewInbound

func NewInbound(ch Channel, opts ...InboundOption) Inbound

NewInbound builds a new TChannel inbound from the given Channel. Existing methods registered on the channel remain registered and are preferred when a call is received.

type InboundOption

type InboundOption func(*inbound)

InboundOption configures Inbound.

func ListenAddr

func ListenAddr(addr string) InboundOption

ListenAddr changes the address on which the TChannel server will listen for connections. By default, the server listens on an OS-assigned port.

This option has no effect if the Chanel provided to NewInbound is already listening for connections when Start() is called.

type OutboundOption

type OutboundOption func(*outbound)

OutboundOption configures Outbound.

func HostPort

func HostPort(hostPort string) OutboundOption

HostPort specifies that the requests made by this outbound should be to the given address.

By default, if HostPort was not specified, the Outbound will use the TChannel global peer list.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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