hop

package
v0.0.0-...-6472126 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHop

func NewHop(d, s, v string, h, g int) *framework.App

NewHop instantiates a framework.App to be used by framework.AppManager.

Types

type App

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

App contains both server and client for Hop App

func NewApp

func NewApp() *App

NewApp creates a new Hop App with default settings

func (App) Hop

func (a App) Hop(ctx context.Context, req *config.HopMessage) (*config.HopMessage, error)

Hop start a gRPC server for Hop App

func (App) MakeRequest

func (a App) MakeRequest(remotes []string) (*config.HopMessage, error)

MakeRequest will create a config.HopMessage proto and send requests to defined remotes hosts in a chain. Each Server is a client and will forward the call to the next hop.

func (App) ServeHTTP

func (a App) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServerHTTP starts a HTTP Server for Hop App

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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