router

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientFactory

type ClientFactory interface {
	GetLocalClient() interface{}
	MakeRemoteClient(client thrift.TChanClient) interface{}
}

A ClientFactory is able to provide an implementation of a TChan[Service] interface that can dispatch calls to the actual implementation. This could be both a local or a remote implementation of the interface based on the dest provided

type Router

type Router interface {
	GetClient(key string) (interface{}, error)
}

A Router creates instances of TChannel Thrift Clients via the help of the ClientFactory

func New

func New(rp ringpop.Interface, f ClientFactory, ch *tchannel.Channel) Router

New creates an instance that validates the Router interface. A Router will be used to get implementations of service interfaces that implement a distributed microservice.

Jump to

Keyboard shortcuts

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